diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 8117d47a..d66baa10 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -10,6 +10,7 @@ docs/Model/ApiToken.md docs/Model/ApiTokenList.md docs/Model/ApiTokenTemporary.md docs/Model/AuthenticationPermission.md +docs/Model/GetBaseTokenWithApiToken200Response.md lib/ApiException.php lib/Auth/APITokenApi.php lib/Auth/AccessToken.php @@ -20,6 +21,7 @@ lib/Auth/ApiTokenList.php lib/Auth/ApiTokenTemporary.php lib/Auth/AuthenticationPermission.php lib/Auth/BaseTokenApi.php +lib/Auth/GetBaseTokenWithApiToken200Response.php lib/Auth/ModelInterface.php lib/Configuration.php lib/FormDataProcessor.php diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION index 368fd8fd..1b2d969d 100644 --- a/.openapi-generator/VERSION +++ b/.openapi-generator/VERSION @@ -1 +1 @@ -7.15.0 +7.18.0 diff --git a/README_Auth.md b/README_Auth.md index 976f70b3..6dc45592 100644 --- a/README_Auth.md +++ b/README_Auth.md @@ -12,12 +12,11 @@ Class | Method | HTTP request | Description *AccountTokenApi* | [**getAccountTokenfromUsername**](docs/Auth/Api/AccountTokenApi.md#getaccounttokenfromusername) | **POST** /api2/auth-token/ | Get Account-Token with Username and Password *BaseTokenApi* | [**getBaseTokenWithAccountToken**](docs/Auth/Api/BaseTokenApi.md#getbasetokenwithaccounttoken) | **GET** /api/v2.1/workspace/{workspace_id}/dtable/{base_name}/access-token/ | Get Base-Token with Account-Token *BaseTokenApi* | [**getBaseTokenWithApiToken**](docs/Auth/Api/BaseTokenApi.md#getbasetokenwithapitoken) | **GET** /api/v2.1/dtable/app-access-token/ | Get Base-Token with API-Token -*BaseTokenApi* | [**getBaseTokenWithExternLink**](docs/Auth/Api/BaseTokenApi.md#getbasetokenwithexternlink) | **GET** /api/v2.1/external-link-tokens/{external_link_token}/access-token/ | Get Base-Token with External-Link ## About this package This PHP package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: `6.0` +- API version: `6.1` - Build package: `org.openapitools.codegen.languages.PhpClientCodegen` \ No newline at end of file diff --git a/README_Base.md b/README_Base.md index c00830d1..eb91597b 100644 --- a/README_Base.md +++ b/README_Base.md @@ -32,7 +32,7 @@ Class | Method | HTTP request | Description *NotificationsApi* | [**listBaseNotifications**](docs/Base/Api/NotificationsApi.md#listbasenotifications) | **GET** /api-gateway/api/v2/dtables/{base_uuid}/notifications/ | List Base Notifications *NotificationsApi* | [**markBaseNotificationAsSeen**](docs/Base/Api/NotificationsApi.md#markbasenotificationasseen) | **PUT** /api-gateway/api/v2/dtables/{base_uuid}/notifications/{notification_id}/ | Mark Notification Read/Unread *NotificationsApi* | [**markBaseNotificationsAsSeen**](docs/Base/Api/NotificationsApi.md#markbasenotificationsasseen) | **PUT** /api-gateway/api/v2/dtables/{base_uuid}/notifications/ | Mark Base Notifications as seen -*NotificationsApi* | [**sendToastNotification**](docs/Base/Api/NotificationsApi.md#sendtoastnotification) | **POST** /api-gateway/api/v2/dtables/{base_uuid}/ui-toasts/ | Send toast notification +*NotificationsApi* | [**sendToastNotification**](docs/Base/Api/NotificationsApi.md#sendtoastnotification) | **POST** /api-gateway/api/v2/dtables/{base_uuid}/ui-toasts/ | Send Toast Notification *RowCommentsApi* | [**deleteComment**](docs/Base/Api/RowCommentsApi.md#deletecomment) | **DELETE** /api-gateway/api/v2/dtables/{base_uuid}/comments/{comment_id}/ | Delete Comment *RowCommentsApi* | [**getComment**](docs/Base/Api/RowCommentsApi.md#getcomment) | **GET** /api-gateway/api/v2/dtables/{base_uuid}/comments/{comment_id}/ | Get Comment *RowCommentsApi* | [**getNumberOfComments**](docs/Base/Api/RowCommentsApi.md#getnumberofcomments) | **GET** /api/v2.1/dtables/{base_uuid}/rows-comments-num/ | Get Number of Comments @@ -63,5 +63,5 @@ Class | Method | HTTP request | Description This PHP package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: `6.0` +- API version: `6.1` - Build package: `org.openapitools.codegen.languages.PhpClientCodegen` \ No newline at end of file diff --git a/README_File.md b/README_File.md index 12c80a4d..85337b70 100644 --- a/README_File.md +++ b/README_File.md @@ -19,5 +19,5 @@ Class | Method | HTTP request | Description This PHP package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: `6.0` +- API version: `6.1` - Build package: `org.openapitools.codegen.languages.PhpClientCodegen` \ No newline at end of file diff --git a/README_PythonScheduler.md b/README_PythonScheduler.md index 885ba855..a1ddf999 100644 --- a/README_PythonScheduler.md +++ b/README_PythonScheduler.md @@ -7,14 +7,14 @@ Class | Method | HTTP request | Description *RunsApi* | [**listRuns**](docs/PythonScheduler/Api/RunsApi.md#listruns) | **GET** /admin/runs/ | List Runs *StatisticsApi* | [**getStatisticsGroupedByBase**](docs/PythonScheduler/Api/StatisticsApi.md#getstatisticsgroupedbybase) | **GET** /admin/statistics/by-base/ | Grouped by Base *StatisticsApi* | [**getStatisticsGroupedByDay**](docs/PythonScheduler/Api/StatisticsApi.md#getstatisticsgroupedbyday) | **GET** /admin/statistics/by-day/ | Grouped by Day -*StatisticsApi* | [**scriptRunsPerBase**](docs/PythonScheduler/Api/StatisticsApi.md#scriptrunsperbase) | **GET** /admin/statistics/scripts-running/by-base/ | Script runs per base -*StatisticsApi* | [**scriptRunsPerTeam**](docs/PythonScheduler/Api/StatisticsApi.md#scriptrunsperteam) | **GET** /admin/statistics/scripts-running/by-org/ | Script runs per team -*StatisticsApi* | [**scriptRunsPerUser**](docs/PythonScheduler/Api/StatisticsApi.md#scriptrunsperuser) | **GET** /admin/statistics/scripts-running/by-user/ | Script runs per user +*StatisticsApi* | [**scriptRunsPerBase**](docs/PythonScheduler/Api/StatisticsApi.md#scriptrunsperbase) | **GET** /admin/statistics/scripts-running/by-base/ | Script Runs per Base +*StatisticsApi* | [**scriptRunsPerTeam**](docs/PythonScheduler/Api/StatisticsApi.md#scriptrunsperteam) | **GET** /admin/statistics/scripts-running/by-org/ | Script Runs per Team +*StatisticsApi* | [**scriptRunsPerUser**](docs/PythonScheduler/Api/StatisticsApi.md#scriptrunsperuser) | **GET** /admin/statistics/scripts-running/by-user/ | Script Runs per User ## About this package This PHP package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: `6.0` +- API version: `6.1` - Build package: `org.openapitools.codegen.languages.PhpClientCodegen` \ No newline at end of file diff --git a/README_SysAdmin.md b/README_SysAdmin.md index 0444f152..6be79478 100644 --- a/README_SysAdmin.md +++ b/README_SysAdmin.md @@ -19,12 +19,12 @@ Class | Method | HTTP request | Description *CommonDatasetApi* | [**deleteInvalidSyncs**](docs/SysAdmin/Api/CommonDatasetApi.md#deleteinvalidsyncs) | **DELETE** /api/v2.1/admin/common-dataset/invalid-syncs/ | Delete Invalid Syncs *CommonDatasetApi* | [**listCommonDataset**](docs/SysAdmin/Api/CommonDatasetApi.md#listcommondataset) | **GET** /api/v2.1/admin/common-datasets/ | List Common Dataset *CommonDatasetApi* | [**listCommonDatasetSyncs**](docs/SysAdmin/Api/CommonDatasetApi.md#listcommondatasetsyncs) | **GET** /api/v2.1/admin/common-dataset/periodical-syncs/ | List Common Dataset Syncs -*CommonDatasetApi* | [**listInvalidSyncs**](docs/SysAdmin/Api/CommonDatasetApi.md#listinvalidsyncs) | **GET** /api/v2.1/admin/common-dataset/invalid-syncs/ | List invalid Syncs +*CommonDatasetApi* | [**listInvalidSyncs**](docs/SysAdmin/Api/CommonDatasetApi.md#listinvalidsyncs) | **GET** /api/v2.1/admin/common-dataset/invalid-syncs/ | List Invalid Syncs *DepartmentsApi* | [**addDepartment**](docs/SysAdmin/Api/DepartmentsApi.md#adddepartment) | **POST** /api/v2.1/admin/address-book/groups/ | Add Department *DepartmentsApi* | [**deleteDepartment**](docs/SysAdmin/Api/DepartmentsApi.md#deletedepartment) | **DELETE** /api/v2.1/admin/address-book/groups/{department_id}/ | Delete Department *DepartmentsApi* | [**getDepartments**](docs/SysAdmin/Api/DepartmentsApi.md#getdepartments) | **GET** /api/v2.1/admin/address-book/groups/{department_id}/ | Get Department *DepartmentsApi* | [**listDepartments**](docs/SysAdmin/Api/DepartmentsApi.md#listdepartments) | **GET** /api/v2.1/admin/address-book/groups/{parent_department_id}/ | List Departments -*ExportApi* | [**exportBase**](docs/SysAdmin/Api/ExportApi.md#exportbase) | **GET** /api/v2.1/admin/dtables/{base_uuid}/synchronous-export/export-dtable/ | Export base +*ExportApi* | [**exportBase**](docs/SysAdmin/Api/ExportApi.md#exportbase) | **GET** /api/v2.1/admin/dtables/{base_uuid}/synchronous-export/export-dtable/ | Export Base *FormsApi* | [**deleteDataCollectionForms**](docs/SysAdmin/Api/FormsApi.md#deletedatacollectionforms) | **DELETE** /api/v2.1/admin/collection-tables/{collection_table_token}/ | Delete Data Collection Forms *FormsApi* | [**deleteForm**](docs/SysAdmin/Api/FormsApi.md#deleteform) | **DELETE** /api/v2.1/admin/forms/{form_token}/ | Delete Form *FormsApi* | [**listDataCollectionForms**](docs/SysAdmin/Api/FormsApi.md#listdatacollectionforms) | **GET** /api/v2.1/admin/collection-tables/ | List Data Collection Forms @@ -62,10 +62,11 @@ Class | Method | HTTP request | Description *StatisticsApi* | [**getActiveUsersPerDay**](docs/SysAdmin/Api/StatisticsApi.md#getactiveusersperday) | **GET** /api/v2.1/admin/statistics/active-users/ | Get Active Users (per Day) *StatisticsApi* | [**getAutomationRules**](docs/SysAdmin/Api/StatisticsApi.md#getautomationrules) | **GET** /api/v2.1/admin/statistics/auto-rules/ | Get Automation Rules *StatisticsApi* | [**getExternalApps**](docs/SysAdmin/Api/StatisticsApi.md#getexternalapps) | **GET** /api/v2.1/admin/statistics/external-apps/ | Get External Apps +*StatisticsApi* | [**getOwnerOrTeamAIStatistics**](docs/SysAdmin/Api/StatisticsApi.md#getownerorteamaistatistics) | **GET** /api/v2.1/admin/statistics/ai/ | Get AI Statistics by Owner/Team *StatisticsApi* | [**getScriptRunningCountByUser**](docs/SysAdmin/Api/StatisticsApi.md#getscriptrunningcountbyuser) | **GET** /api/v2.1/admin/statistics/scripts-running/ | Get Script Running Count by User *StatisticsApi* | [**listActiveUsersByDay**](docs/SysAdmin/Api/StatisticsApi.md#listactiveusersbyday) | **GET** /api/v2.1/admin/daily-active-users/ | List Active Users (one Day) *StatisticsApi* | [**listScriptTasks**](docs/SysAdmin/Api/StatisticsApi.md#listscripttasks) | **GET** /api/v2.1/admin/scripts-tasks/ | List Scripts Tasks -*SystemInfoCustomizingApi* | [**getSystemInformation**](docs/SysAdmin/Api/SystemInfoCustomizingApi.md#getsysteminformation) | **GET** /api/v2.1/admin/sysinfo/ | Get system information +*SystemInfoCustomizingApi* | [**getSystemInformation**](docs/SysAdmin/Api/SystemInfoCustomizingApi.md#getsysteminformation) | **GET** /api/v2.1/admin/sysinfo/ | Get System Information *SystemInfoCustomizingApi* | [**updateFavicon**](docs/SysAdmin/Api/SystemInfoCustomizingApi.md#updatefavicon) | **POST** /api/v2.1/admin/favicon/ | Update Favicon *SystemInfoCustomizingApi* | [**updateGeneralSettings**](docs/SysAdmin/Api/SystemInfoCustomizingApi.md#updategeneralsettings) | **PUT** /api/v2.1/admin/web-settings/ | Update General Settings *SystemInfoCustomizingApi* | [**updateLoginBackgroundImage**](docs/SysAdmin/Api/SystemInfoCustomizingApi.md#updateloginbackgroundimage) | **POST** /api/v2.1/admin/login-background-image/ | Update Login Background Image @@ -91,7 +92,7 @@ Class | Method | HTTP request | Description *UsersApi* | [**disableTwoFactor**](docs/SysAdmin/Api/UsersApi.md#disabletwofactor) | **DELETE** /api2/two-factor-auth/{user_id}/ | Disable 2FA *UsersApi* | [**enforceTwoFactor**](docs/SysAdmin/Api/UsersApi.md#enforcetwofactor) | **PUT** /api/v2.1/admin/users/{user_id}/two-factor-auth/ | Enforce 2FA *UsersApi* | [**getUser**](docs/SysAdmin/Api/UsersApi.md#getuser) | **GET** /api/v2.1/admin/users/{user_id}/ | Get User -*UsersApi* | [**importUsers**](docs/SysAdmin/Api/UsersApi.md#importusers) | **POST** /api/v2.1/admin/import-users/ | Import users +*UsersApi* | [**importUsers**](docs/SysAdmin/Api/UsersApi.md#importusers) | **POST** /api/v2.1/admin/import-users/ | Import Users *UsersApi* | [**listAdminUsers**](docs/SysAdmin/Api/UsersApi.md#listadminusers) | **GET** /api/v2.1/admin/admin-users/ | List Admin Users *UsersApi* | [**listBasesSharedToUser**](docs/SysAdmin/Api/UsersApi.md#listbasessharedtouser) | **GET** /api/v2.1/admin/users/{user_id}/shared-dtables/ | List Bases Shared to User *UsersApi* | [**listUserStorageObjects**](docs/SysAdmin/Api/UsersApi.md#listuserstorageobjects) | **GET** /api/v2.1/admin/users/{user_id}/storage/ | List User's Storage Objects @@ -107,5 +108,5 @@ Class | Method | HTTP request | Description This PHP package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: `6.0` +- API version: `6.1` - Build package: `org.openapitools.codegen.languages.PhpClientCodegen` \ No newline at end of file diff --git a/README_TeamAdmin.md b/README_TeamAdmin.md index 13225641..ba56b87c 100644 --- a/README_TeamAdmin.md +++ b/README_TeamAdmin.md @@ -4,17 +4,23 @@ Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- +*ActivitiesLogsApi* | [**listAutomationLogs**](docs/TeamAdmin/Api/ActivitiesLogsApi.md#listautomationlogs) | **GET** /api/v2.1/org/{org_id}/admin/automation-logs/ | List Automation Logs *ActivitiesLogsApi* | [**listFileAccessLogs**](docs/TeamAdmin/Api/ActivitiesLogsApi.md#listfileaccesslogs) | **GET** /api/v2.1/org/{org_id}/admin/file-access-logs/ | List File Access Logs *ActivitiesLogsApi* | [**listGroupMemberAuditLogs**](docs/TeamAdmin/Api/ActivitiesLogsApi.md#listgroupmemberauditlogs) | **GET** /api/v2.1/org/{org_id}/admin/group-member-audit/ | List Group Member Audit Logs +*ActivitiesLogsApi* | [**listPythonRuns**](docs/TeamAdmin/Api/ActivitiesLogsApi.md#listpythonruns) | **GET** /api/v2.1/org/{org_id}/admin/python-runs/ | List Python Runs *ActivitiesLogsApi* | [**listTeamLogins**](docs/TeamAdmin/Api/ActivitiesLogsApi.md#listteamlogins) | **GET** /api/v2.1/org/{org_id}/admin/login-logs/ | List Team Logins *ActivitiesLogsApi* | [**listTeamOperationLog**](docs/TeamAdmin/Api/ActivitiesLogsApi.md#listteamoperationlog) | **GET** /api/v2.1/org/{org_id}/admin/admin-logs/ | List Team Operations *ActivitiesLogsApi* | [**listUserLogins**](docs/TeamAdmin/Api/ActivitiesLogsApi.md#listuserlogins) | **GET** /api/v2.1/org/{org_id}/admin/login-logs/{user_id}/ | List User Logins *BasesApi* | [**clearTeamTrashBin**](docs/TeamAdmin/Api/BasesApi.md#clearteamtrashbin) | **DELETE** /api/v2.1/org/{org_id}/admin/trash-dtables/ | Clear Team Trash Bin +*BasesApi* | [**deleteApiToken**](docs/TeamAdmin/Api/BasesApi.md#deleteapitoken) | **DELETE** /api/v2.1/org/{org_id}/admin/dtables/{base_uuid}/api-tokens/{app_name}/ | Delete API-Token *BasesApi* | [**deleteBase**](docs/TeamAdmin/Api/BasesApi.md#deletebase) | **DELETE** /api/v2.1/org/{org_id}/admin/dtables/{base_uuid}/ | Delete Base *BasesApi* | [**getBase**](docs/TeamAdmin/Api/BasesApi.md#getbase) | **GET** /api/v2.1/org/{org_id}/admin/dtables/{base_uuid}/ | Get Base +*BasesApi* | [**listApiTokens**](docs/TeamAdmin/Api/BasesApi.md#listapitokens) | **GET** /api/v2.1/org/{org_id}/admin/dtables/{base_uuid}/api-tokens/ | List API-Tokens +*BasesApi* | [**listApiTokensOfAllBases**](docs/TeamAdmin/Api/BasesApi.md#listapitokensofallbases) | **GET** /api/v2.1/org/{org_id}/admin/api-tokens/ | List API-Tokens of All Bases *BasesApi* | [**listBaseSharings**](docs/TeamAdmin/Api/BasesApi.md#listbasesharings) | **GET** /api/v2.1/org/{org_id}/admin/dtables/{base_uuid}/shares/ | List Base Sharings *BasesApi* | [**listBases**](docs/TeamAdmin/Api/BasesApi.md#listbases) | **GET** /api/v2.1/org/{org_id}/admin/dtables/ | List Bases (Team) *BasesApi* | [**listTrashBases**](docs/TeamAdmin/Api/BasesApi.md#listtrashbases) | **GET** /api/v2.1/org/{org_id}/admin/trash-dtables/ | List Trash Bases +*BasesApi* | [**listUsersBases**](docs/TeamAdmin/Api/BasesApi.md#listusersbases) | **GET** /api/v2.1/org/{org_id}/admin/users/{user_id}/dtables/ | List User's Bases *BasesApi* | [**restoreBaseFromTrash**](docs/TeamAdmin/Api/BasesApi.md#restorebasefromtrash) | **PUT** /api/v2.1/org/{org_id}/admin/trash-dtables/{base_uuid}/ | Restore Base from Trash *BasesApi* | [**searchBase**](docs/TeamAdmin/Api/BasesApi.md#searchbase) | **GET** /api/v2.1/org/{org_id}/admin/search-dtables/ | Search Base *CustomizingApi* | [**deleteTeamLogo**](docs/TeamAdmin/Api/CustomizingApi.md#deleteteamlogo) | **DELETE** /api/v2.1/org/{org_id}/admin/org-logo/ | Delete Team Logo @@ -31,6 +37,7 @@ Class | Method | HTTP request | Description *GroupsApi* | [**removeGroupMembers**](docs/TeamAdmin/Api/GroupsApi.md#removegroupmembers) | **DELETE** /api/v2.1/org/{org_id}/admin/groups/{group_id}/members/{user_id}/ | Remove Group Members *GroupsApi* | [**updateGroup**](docs/TeamAdmin/Api/GroupsApi.md#updategroup) | **PUT** /api/v2.1/org/{org_id}/admin/groups/{group_id}/ | Update Group *GroupsApi* | [**updateGroupMemberRole**](docs/TeamAdmin/Api/GroupsApi.md#updategroupmemberrole) | **PUT** /api/v2.1/org/{org_id}/admin/groups/{group_id}/members/{user_id}/ | Update Group Member Role +*InfoSettingsApi* | [**deleteTeam**](docs/TeamAdmin/Api/InfoSettingsApi.md#deleteteam) | **DELETE** /api/v2.1/org/admin/ | Delete Team *InfoSettingsApi* | [**getTeamInfo**](docs/TeamAdmin/Api/InfoSettingsApi.md#getteaminfo) | **GET** /api/v2.1/org/admin/info/ | Get Team Info *InfoSettingsApi* | [**getTeamSettings**](docs/TeamAdmin/Api/InfoSettingsApi.md#getteamsettings) | **GET** /api/v2.1/org/admin/settings/ | Get Team Settings *InfoSettingsApi* | [**updateTeam**](docs/TeamAdmin/Api/InfoSettingsApi.md#updateteam) | **PUT** /api/v2.1/org/admin/info/ | Update Team @@ -44,8 +51,16 @@ Class | Method | HTTP request | Description *SharingLinksApi* | [**deleteViewExternalLink**](docs/TeamAdmin/Api/SharingLinksApi.md#deleteviewexternallink) | **DELETE** /api/v2.1/org/{org_id}/admin/view-external-links/{view_external_link_token}/ | Delete View External Link *SharingLinksApi* | [**listBaseExternalLinks**](docs/TeamAdmin/Api/SharingLinksApi.md#listbaseexternallinks) | **GET** /api/v2.1/org/{org_id}/admin/external-links/ | List Base External Links *SharingLinksApi* | [**listInviteLinks**](docs/TeamAdmin/Api/SharingLinksApi.md#listinvitelinks) | **GET** /api/v2.1/org/{org_id}/admin/invite-links/ | List Invite Links +*SharingLinksApi* | [**listShares**](docs/TeamAdmin/Api/SharingLinksApi.md#listshares) | **GET** /api/v2.1/org/{org_id}/admin/shares/ | List Shares *SharingLinksApi* | [**listViewExternalLinks**](docs/TeamAdmin/Api/SharingLinksApi.md#listviewexternallinks) | **GET** /api/v2.1/org/{org_id}/admin/view-external-links/ | List View External Links *SharingLinksApi* | [**updateInviteLink**](docs/TeamAdmin/Api/SharingLinksApi.md#updateinvitelink) | **PUT** /api/v2.1/org/{org_id}/admin/invite-links/{invite_link_token}/ | Update Invite Link +*StatisticsApi* | [**getAdminLogStatisticsByDay**](docs/TeamAdmin/Api/StatisticsApi.md#getadminlogstatisticsbyday) | **GET** /api/v2.1/org/{org_id}/admin/statistics/admin-logs/by-day/ | Admin Logs (by Day) +*StatisticsApi* | [**getAutomationLogStatisticsByBase**](docs/TeamAdmin/Api/StatisticsApi.md#getautomationlogstatisticsbybase) | **GET** /api/v2.1/org/{org_id}/admin/statistics/automation-logs/by-base/ | Automation Logs (by Base) +*StatisticsApi* | [**getAutomationLogStatisticsByDay**](docs/TeamAdmin/Api/StatisticsApi.md#getautomationlogstatisticsbyday) | **GET** /api/v2.1/org/{org_id}/admin/statistics/automation-logs/by-day/ | Automation Logs (by Day) +*StatisticsApi* | [**getLoginLogStatisticsByDay**](docs/TeamAdmin/Api/StatisticsApi.md#getloginlogstatisticsbyday) | **GET** /api/v2.1/org/{org_id}/admin/statistics/login-logs/by-day/ | Login Logs (by Day) +*StatisticsApi* | [**getPythonRunStatisticsByBase**](docs/TeamAdmin/Api/StatisticsApi.md#getpythonrunstatisticsbybase) | **GET** /api/v2.1/org/{org_id}/admin/statistics/python-runs/by-base/ | Python Runs (by Base) +*StatisticsApi* | [**getPythonRunStatisticsByDay**](docs/TeamAdmin/Api/StatisticsApi.md#getpythonrunstatisticsbyday) | **GET** /api/v2.1/org/{org_id}/admin/statistics/python-runs/by-day/ | Python Runs (by Day) +*StatisticsApi* | [**getUserOrBaseAIStatistics**](docs/TeamAdmin/Api/StatisticsApi.md#getuserorbaseaistatistics) | **GET** /api/v2.1/org/{org_id}/admin/statistics/ai/ | Get AI Statistics by User/Base *UsersApi* | [**addUser**](docs/TeamAdmin/Api/UsersApi.md#adduser) | **POST** /api/v2.1/org/{org_id}/admin/users/ | Add User *UsersApi* | [**deleteUser**](docs/TeamAdmin/Api/UsersApi.md#deleteuser) | **DELETE** /api/v2.1/org/{org_id}/admin/users/{user_id}/ | Delete User *UsersApi* | [**disableTwoFactor**](docs/TeamAdmin/Api/UsersApi.md#disabletwofactor) | **DELETE** /api/v2.1/org/{org_id}/admin/users/{user_id}/two-factor-auth/ | Disable 2FA @@ -60,5 +75,5 @@ Class | Method | HTTP request | Description This PHP package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: `6.0` +- API version: `6.1` - Build package: `org.openapitools.codegen.languages.PhpClientCodegen` \ No newline at end of file diff --git a/README_User.md b/README_User.md index 61698a02..d5f27da6 100644 --- a/README_User.md +++ b/README_User.md @@ -38,7 +38,7 @@ Class | Method | HTTP request | Description *BasesApi* | [**moveBaseIntoFolder**](docs/User/Api/BasesApi.md#movebaseintofolder) | **POST** /api/v2.1/workspace/{workspace_id}/folder-item-moving/ | Move Base into Folder *BasesApi* | [**restoreGroupTrashedBase**](docs/User/Api/BasesApi.md#restoregrouptrashedbase) | **PUT** /api/v2.1/groups/{group_id}/trash-dtables/{base_uuid}/ | Restore Group Trashed Base *BasesApi* | [**restoreTrashedBase**](docs/User/Api/BasesApi.md#restoretrashedbase) | **PUT** /api/v2.1/trash-dtables/{trashed_base_id}/ | Restore Trashed Base -*BasesApi* | [**searchBaseOrApps**](docs/User/Api/BasesApi.md#searchbaseorapps) | **GET** /api/v2.1/dtable/items-search/ | Search base or apps +*BasesApi* | [**searchBaseOrApps**](docs/User/Api/BasesApi.md#searchbaseorapps) | **GET** /api/v2.1/dtable/items-search/ | Search Base or Apps *BasesApi* | [**unfavoriteBase**](docs/User/Api/BasesApi.md#unfavoritebase) | **DELETE** /api/v2.1/starred-dtables/ | Unfavorite Base *BasesApi* | [**updateBase**](docs/User/Api/BasesApi.md#updatebase) | **PUT** /api/v2.1/workspace/{workspace_id}/dtable/ | Update Base *BasesApi* | [**updateFolder**](docs/User/Api/BasesApi.md#updatefolder) | **PUT** /api/v2.1/workspace/{workspace_id}/folders/{folder_id}/ | Update Folder @@ -90,7 +90,7 @@ Class | Method | HTTP request | Description *ImportExportApi* | [**importBasefromDTableFile**](docs/User/Api/ImportExportApi.md#importbasefromdtablefile) | **POST** /api/v2.1/workspace/{workspace_id}/import-dtable/ | Import Base from dtable file *ImportExportApi* | [**importBasefromFile**](docs/User/Api/ImportExportApi.md#importbasefromfile) | **POST** /api/v2.1/workspace/{workspace_id}/synchronous-import/import-excel-csv-to-base/ | Import Base from xlsx or csv *ImportExportApi* | [**importTableFromFile**](docs/User/Api/ImportExportApi.md#importtablefromfile) | **POST** /api/v2.1/workspace/{workspace_id}/synchronous-import/import-excel-csv-to-table/ | Import Table from xlsx or csv -*ImportExportApi* | [**updateFromFile**](docs/User/Api/ImportExportApi.md#updatefromfile) | **POST** /api/v2.1/workspace/{workspace_id}/synchronous-import/update-table-via-excel-csv/ | Update from xlsx or csv +*ImportExportApi* | [**updateFromFile**](docs/User/Api/ImportExportApi.md#updatefromfile) | **POST** /api/v2.1/workspace/{workspace_id}/synchronous-import/update-table-via-excel-csv/ | Update from XLSX or CSV *MaintenanceApi* | [**repairBase**](docs/User/Api/MaintenanceApi.md#repairbase) | **PUT** /api/v2.1/dtable/{base_uuid}/repair/ | Repair Base *NotificationsApi* | [**addNotificationRule**](docs/User/Api/NotificationsApi.md#addnotificationrule) | **POST** /api/v2.1/workspace/{workspace_id}/dtable/{base_name}/notification-rules/ | Add Notification Rule *NotificationsApi* | [**deleteNotificationRule**](docs/User/Api/NotificationsApi.md#deletenotificationrule) | **DELETE** /api/v2.1/workspace/{workspace_id}/dtable/{base_name}/notification-rules/{notification_rule_id}/ | Delete Notification Rule @@ -151,5 +151,5 @@ Class | Method | HTTP request | Description This PHP package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: `6.0` +- API version: `6.1` - Build package: `org.openapitools.codegen.languages.PhpClientCodegen` \ No newline at end of file diff --git a/docs/Auth/Api/APITokenApi.md b/docs/Auth/Api/APITokenApi.md index 65f2f5aa..900b9835 100644 --- a/docs/Auth/Api/APITokenApi.md +++ b/docs/Auth/Api/APITokenApi.md @@ -33,7 +33,7 @@ $apiInstance = new SeaTable\Client\Auth\APITokenApi( new GuzzleHttp\Client(), $config ); -$workspace_id = 127; // int | The id of the workspace. For an explanation how to get the *workspace_id*, check out this [help-article](https://seatable.com/help/workspace-id-einer-gruppe-ermitteln/). Alternatively the API endpoint [get metadata](/reference/getmetadata) can be used. +$workspace_id = 127; // int | The id of the workspace. For an explanation how to get the *workspace_id*, check out this [help-article](https://seatable.com/help/find-workspace-id-group/). Alternatively the API endpoint [get metadata](/reference/getmetadata) can be used. $base_name = My Projects; // string | The name of your base. $app_name = 'app_name_example'; // string | The name of your app. Every API-Token has a name to identify the purpose. The name of the app must be unique for every base. $permission = new \SeaTable\Client\Auth\AuthenticationPermission(); // \SeaTable\Client\Auth\AuthenticationPermission @@ -50,7 +50,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **workspace_id** | **int**| The id of the workspace. For an explanation how to get the *workspace_id*, check out this [help-article](https://seatable.com/help/workspace-id-einer-gruppe-ermitteln/). Alternatively the API endpoint [get metadata](/reference/getmetadata) can be used. | | +| **workspace_id** | **int**| The id of the workspace. For an explanation how to get the *workspace_id*, check out this [help-article](https://seatable.com/help/find-workspace-id-group/). Alternatively the API endpoint [get metadata](/reference/getmetadata) can be used. | | | **base_name** | **string**| The name of your base. | | | **app_name** | **string**| The name of your app. Every API-Token has a name to identify the purpose. The name of the app must be unique for every base. | | | **permission** | [**\SeaTable\Client\Auth\AuthenticationPermission**](../Model/AuthenticationPermission.md)| | | @@ -88,7 +88,7 @@ $apiInstance = new SeaTable\Client\Auth\APITokenApi( new GuzzleHttp\Client(), $config ); -$workspace_id = 127; // int | The id of the workspace. For an explanation how to get the *workspace_id*, check out this [help-article](https://seatable.com/help/workspace-id-einer-gruppe-ermitteln/). Alternatively the API endpoint [get metadata](/reference/getmetadata) can be used. +$workspace_id = 127; // int | The id of the workspace. For an explanation how to get the *workspace_id*, check out this [help-article](https://seatable.com/help/find-workspace-id-group/). Alternatively the API endpoint [get metadata](/reference/getmetadata) can be used. $base_name = My Projects; // string | The name of your base. try { @@ -103,7 +103,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **workspace_id** | **int**| The id of the workspace. For an explanation how to get the *workspace_id*, check out this [help-article](https://seatable.com/help/workspace-id-einer-gruppe-ermitteln/). Alternatively the API endpoint [get metadata](/reference/getmetadata) can be used. | | +| **workspace_id** | **int**| The id of the workspace. For an explanation how to get the *workspace_id*, check out this [help-article](https://seatable.com/help/find-workspace-id-group/). Alternatively the API endpoint [get metadata](/reference/getmetadata) can be used. | | | **base_name** | **string**| The name of your base. | | ### Return type @@ -125,7 +125,7 @@ deleteApiToken($workspace_id, $base_name, $app_name): object Delete API-Token -Delete one specific API token from a base. The token is identified by his *app_name*. +Delete one specific API token from a base. The token is identified by its *app_name*. ### Example @@ -139,7 +139,7 @@ $apiInstance = new SeaTable\Client\Auth\APITokenApi( new GuzzleHttp\Client(), $config ); -$workspace_id = 127; // int | The id of the workspace. For an explanation how to get the *workspace_id*, check out this [help-article](https://seatable.com/help/workspace-id-einer-gruppe-ermitteln/). Alternatively the API endpoint [get metadata](/reference/getmetadata) can be used. +$workspace_id = 127; // int | The id of the workspace. For an explanation how to get the *workspace_id*, check out this [help-article](https://seatable.com/help/find-workspace-id-group/). Alternatively the API endpoint [get metadata](/reference/getmetadata) can be used. $base_name = My Projects; // string | The name of your base. $app_name = My App; // string | The name of your app. Every API-Token has a name to identify the purpose. The name of the app must be unique for every base. @@ -155,7 +155,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **workspace_id** | **int**| The id of the workspace. For an explanation how to get the *workspace_id*, check out this [help-article](https://seatable.com/help/workspace-id-einer-gruppe-ermitteln/). Alternatively the API endpoint [get metadata](/reference/getmetadata) can be used. | | +| **workspace_id** | **int**| The id of the workspace. For an explanation how to get the *workspace_id*, check out this [help-article](https://seatable.com/help/find-workspace-id-group/). Alternatively the API endpoint [get metadata](/reference/getmetadata) can be used. | | | **base_name** | **string**| The name of your base. | | | **app_name** | **string**| The name of your app. Every API-Token has a name to identify the purpose. The name of the app must be unique for every base. | | @@ -192,7 +192,7 @@ $apiInstance = new SeaTable\Client\Auth\APITokenApi( new GuzzleHttp\Client(), $config ); -$workspace_id = 127; // int | The id of the workspace. For an explanation how to get the *workspace_id*, check out this [help-article](https://seatable.com/help/workspace-id-einer-gruppe-ermitteln/). Alternatively the API endpoint [get metadata](/reference/getmetadata) can be used. +$workspace_id = 127; // int | The id of the workspace. For an explanation how to get the *workspace_id*, check out this [help-article](https://seatable.com/help/find-workspace-id-group/). Alternatively the API endpoint [get metadata](/reference/getmetadata) can be used. $base_name = My Projects; // string | The name of your base. try { @@ -207,7 +207,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **workspace_id** | **int**| The id of the workspace. For an explanation how to get the *workspace_id*, check out this [help-article](https://seatable.com/help/workspace-id-einer-gruppe-ermitteln/). Alternatively the API endpoint [get metadata](/reference/getmetadata) can be used. | | +| **workspace_id** | **int**| The id of the workspace. For an explanation how to get the *workspace_id*, check out this [help-article](https://seatable.com/help/find-workspace-id-group/). Alternatively the API endpoint [get metadata](/reference/getmetadata) can be used. | | | **base_name** | **string**| The name of your base. | | ### Return type @@ -243,7 +243,7 @@ $apiInstance = new SeaTable\Client\Auth\APITokenApi( new GuzzleHttp\Client(), $config ); -$workspace_id = 127; // int | The id of the workspace. For an explanation how to get the *workspace_id*, check out this [help-article](https://seatable.com/help/workspace-id-einer-gruppe-ermitteln/). Alternatively the API endpoint [get metadata](/reference/getmetadata) can be used. +$workspace_id = 127; // int | The id of the workspace. For an explanation how to get the *workspace_id*, check out this [help-article](https://seatable.com/help/find-workspace-id-group/). Alternatively the API endpoint [get metadata](/reference/getmetadata) can be used. $base_name = My Projects; // string | The name of your base. $app_name = My App; // string | The name of your app. Every API-Token has a name to identify the purpose. The name of the app must be unique for every base. $permission = new \SeaTable\Client\Auth\AuthenticationPermission(); // \SeaTable\Client\Auth\AuthenticationPermission @@ -260,7 +260,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **workspace_id** | **int**| The id of the workspace. For an explanation how to get the *workspace_id*, check out this [help-article](https://seatable.com/help/workspace-id-einer-gruppe-ermitteln/). Alternatively the API endpoint [get metadata](/reference/getmetadata) can be used. | | +| **workspace_id** | **int**| The id of the workspace. For an explanation how to get the *workspace_id*, check out this [help-article](https://seatable.com/help/find-workspace-id-group/). Alternatively the API endpoint [get metadata](/reference/getmetadata) can be used. | | | **base_name** | **string**| The name of your base. | | | **app_name** | **string**| The name of your app. Every API-Token has a name to identify the purpose. The name of the app must be unique for every base. | | | **permission** | [**\SeaTable\Client\Auth\AuthenticationPermission**](../Model/AuthenticationPermission.md)| | | diff --git a/docs/Auth/Api/BaseTokenApi.md b/docs/Auth/Api/BaseTokenApi.md index 3822291b..c202a438 100644 --- a/docs/Auth/Api/BaseTokenApi.md +++ b/docs/Auth/Api/BaseTokenApi.md @@ -6,7 +6,6 @@ All URIs are relative to https://cloud.seatable.io, except if the operation defi | ------------- | ------------- | ------------- | | [**getBaseTokenWithAccountToken()**](BaseTokenApi.md#getBaseTokenWithAccountToken) | **GET** /api/v2.1/workspace/{workspace_id}/dtable/{base_name}/access-token/ | Get Base-Token with Account-Token | | [**getBaseTokenWithApiToken()**](BaseTokenApi.md#getBaseTokenWithApiToken) | **GET** /api/v2.1/dtable/app-access-token/ | Get Base-Token with API-Token | -| [**getBaseTokenWithExternLink()**](BaseTokenApi.md#getBaseTokenWithExternLink) | **GET** /api/v2.1/external-link-tokens/{external_link_token}/access-token/ | Get Base-Token with External-Link | ## `getBaseTokenWithAccountToken()` @@ -31,7 +30,7 @@ $apiInstance = new SeaTable\Client\Auth\BaseTokenApi( new GuzzleHttp\Client(), $config ); -$workspace_id = 127; // int | The id of the workspace. For an explanation how to get the *workspace_id*, check out this [help-article](https://seatable.com/help/workspace-id-einer-gruppe-ermitteln/). Alternatively the API endpoint [get metadata](/reference/getmetadata) can be used. +$workspace_id = 127; // int | The id of the workspace. For an explanation how to get the *workspace_id*, check out this [help-article](https://seatable.com/help/find-workspace-id-group/). Alternatively the API endpoint [get metadata](/reference/getmetadata) can be used. $base_name = My Projects; // string | The name of your base. $exp = '3d'; // string | Expiration time of the generated access token. Examples: 5h (= 5 hours) or 3d (= 3 days) @@ -47,7 +46,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **workspace_id** | **int**| The id of the workspace. For an explanation how to get the *workspace_id*, check out this [help-article](https://seatable.com/help/workspace-id-einer-gruppe-ermitteln/). Alternatively the API endpoint [get metadata](/reference/getmetadata) can be used. | | +| **workspace_id** | **int**| The id of the workspace. For an explanation how to get the *workspace_id*, check out this [help-article](https://seatable.com/help/find-workspace-id-group/). Alternatively the API endpoint [get metadata](/reference/getmetadata) can be used. | | | **base_name** | **string**| The name of your base. | | | **exp** | **string**| Expiration time of the generated access token. Examples: 5h (= 5 hours) or 3d (= 3 days) | [optional] [default to '3d'] | @@ -65,7 +64,7 @@ AccountTokenAuth ## `getBaseTokenWithApiToken()` ```php -getBaseTokenWithApiToken($exp): object +getBaseTokenWithApiToken($exp): \SeaTable\Client\Auth\GetBaseTokenWithApiToken200Response ``` Get Base-Token with API-Token @@ -102,7 +101,7 @@ try { ### Return type -**object** +[**\SeaTable\Client\Auth\GetBaseTokenWithApiToken200Response**](../Model/GetBaseTokenWithApiToken200Response.md) ### Authorization @@ -110,47 +109,3 @@ ApiTokenAuth - -## `getBaseTokenWithExternLink()` - -```php -getBaseTokenWithExternLink($external_link_token): \SeaTable\Client\Auth\AccessToken -``` - -Get Base-Token with External-Link - -Generate a Base-Token from an external link to this base. Because external links always grant read-only permissions, the Base-Token generated from a external link will only grant read permissions to the base. - -### Example - -```php -getBaseTokenWithExternLink($external_link_token); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling BaseTokenApi->getBaseTokenWithExternLink: ', $e->getMessage(), PHP_EOL; -} -``` - -### Parameters - -| Name | Type | Description | Notes | -| ------------- | ------------- | ------------- | ------------- | -| **external_link_token** | **string**| The random string from the external link. Eg: - If the external link is https://cloud.seatable.io/dtable/external-links/c41cef71f5094827a786, the link token is *c41cef71f5094827a786*. - If the external link is a custom link like https://cloud.seatable.io/dtable/external-links/custom/my-personal-link, the link token is only *my-personal-link*. | | - -### Return type - -[**\SeaTable\Client\Auth\AccessToken**](../Model/AccessToken.md) - -### Authorization - -No authorization required - - diff --git a/docs/Auth/Model/GetBaseTokenWithApiToken200Response.md b/docs/Auth/Model/GetBaseTokenWithApiToken200Response.md new file mode 100644 index 00000000..5758d22e --- /dev/null +++ b/docs/Auth/Model/GetBaseTokenWithApiToken200Response.md @@ -0,0 +1,14 @@ +# # GetBaseTokenWithApiToken200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**app_name** | **string** | | [optional] +**access_token** | **string** | | [optional] +**dtable_uuid** | **string** | | [optional] +**dtable_server** | **string** | | [optional] +**workspace_id** | **int** | | [optional] +**use_api_gateway** | **bool** | | [optional] +**dtable_name** | **string** | | [optional] + diff --git a/docs/Base/Api/BigDataApi.md b/docs/Base/Api/BigDataApi.md index c8304059..446ece81 100644 --- a/docs/Base/Api/BigDataApi.md +++ b/docs/Base/Api/BigDataApi.md @@ -169,12 +169,12 @@ BaseTokenAuth ## `moveRowsToNormalBackend()` ```php -moveRowsToNormalBackend($base_uuid, $move_rows_to_normal_backend_request) +moveRowsToNormalBackend($base_uuid, $move_rows_to_normal_backend_request): object ``` Move Rows to Normal Backend -Moves the seleted rows into the big data backend. +Moves the selected rows from the big data backend to the normal backend. ### Example @@ -192,7 +192,8 @@ $base_uuid = 5c264e76-0e5a-448a-9f34-580b551364ca; // string | The unique identi $move_rows_to_normal_backend_request = new \SeaTable\Client\Base\MoveRowsToNormalBackendRequest(); // \SeaTable\Client\Base\MoveRowsToNormalBackendRequest try { - $apiInstance->moveRowsToNormalBackend($base_uuid, $move_rows_to_normal_backend_request); + $result = $apiInstance->moveRowsToNormalBackend($base_uuid, $move_rows_to_normal_backend_request); + print_r($result); } catch (Exception $e) { echo 'Exception when calling BigDataApi->moveRowsToNormalBackend: ', $e->getMessage(), PHP_EOL; } @@ -207,7 +208,7 @@ try { ### Return type -void (empty response body) +**object** ### Authorization diff --git a/docs/Base/Api/ColumnsApi.md b/docs/Base/Api/ColumnsApi.md index 8c806f14..90499298 100644 --- a/docs/Base/Api/ColumnsApi.md +++ b/docs/Base/Api/ColumnsApi.md @@ -176,7 +176,7 @@ deleteSelectOption($base_uuid, $delete_select_options): object Delete Single/Multiple Select Options -Use this request to remove single select or multiple select options that you don't need any more. Thes deleted options will be removed from the entries containing them. In the request body: `table_name` is the name of the table; `column` is the name or the `key` of the single/multiple select column; `option_names` is a list of options you'd like to delete. +Use this request to remove single select or multiple select options that you don't need any more. These deleted options will be removed from the entries containing them. In the request body: `table_name` is the name of the table; `column` is the name or the `key` of the single/multiple select column; `option_names` is a list of options you'd like to delete. ### Example @@ -222,7 +222,7 @@ BaseTokenAuth ## `insertColumn()` ```php -insertColumn($base_uuid, $insert_column_request): object +insertColumn($base_uuid, $insert_column_request): \SeaTable\Client\Base\UpdateColumn200Response ``` Insert Column @@ -261,7 +261,7 @@ try { ### Return type -**object** +[**\SeaTable\Client\Base\UpdateColumn200Response**](../Model/UpdateColumn200Response.md) ### Authorization @@ -294,7 +294,7 @@ $apiInstance = new SeaTable\Client\Base\ColumnsApi( ); $table_name = Table1; // string | The name of the table to perform the operation on. Alternatively, you can use the `table_id` instead of `table_name`. If using `table_id`, ensure that the key in the request body is replaced accordingly. **Example:** Instead of `table_name: Table1` you can use `table_id: 0000`. $base_uuid = 5c264e76-0e5a-448a-9f34-580b551364ca; // string | The unique identifier of a base. Sometimes also called dtable_uuid. -$view_name = Default View; // string | The name of the view to perform the operation on. Alternatively, you can use the `view_id` instead of `view_name`. If using `view_id`, ensure that the key in the request body is replaced accordingly. **Example:** Instead of `view_name: Default View` you an use `view_id: 0000`. +$view_name = Default View; // string | The name of the view to perform the operation on. Alternatively, you can use the `view_id` instead of `view_name`. If using `view_id`, ensure that the key in the request body is replaced accordingly. **Example:** Instead of `view_name: Default View` you can use `view_id: 0000`. try { $result = $apiInstance->listColumns($table_name, $base_uuid, $view_name); @@ -310,7 +310,7 @@ try { | ------------- | ------------- | ------------- | ------------- | | **table_name** | **string**| The name of the table to perform the operation on. Alternatively, you can use the `table_id` instead of `table_name`. If using `table_id`, ensure that the key in the request body is replaced accordingly. **Example:** Instead of `table_name: Table1` you can use `table_id: 0000`. | | | **base_uuid** | **string**| The unique identifier of a base. Sometimes also called dtable_uuid. | | -| **view_name** | **string**| The name of the view to perform the operation on. Alternatively, you can use the `view_id` instead of `view_name`. If using `view_id`, ensure that the key in the request body is replaced accordingly. **Example:** Instead of `view_name: Default View` you an use `view_id: 0000`. | [optional] | +| **view_name** | **string**| The name of the view to perform the operation on. Alternatively, you can use the `view_id` instead of `view_name`. If using `view_id`, ensure that the key in the request body is replaced accordingly. **Example:** Instead of `view_name: Default View` you can use `view_id: 0000`. | [optional] | ### Return type @@ -326,12 +326,12 @@ BaseTokenAuth ## `updateColumn()` ```php -updateColumn($base_uuid, $update_column): object +updateColumn($base_uuid, $update_column): \SeaTable\Client\Base\UpdateColumn200Response ``` Update Column -Allows various changes of the column: name, column_type, freeze/unfreeze, resize, etc... `op_type` is required. The following options are available: - rename_column - modify_column_type - resize_column - move_column - freeze_column (eventuell weglassen) `column` is the name or `key` of the target column. `new_column_type` is the new type of the target column. For a list of column type params refer to the SeaTable API Parameter. For further information on column types, check the page [Models](https://api.seatable.com/reference/models). +Allows various changes of the column: name, column_type, freeze/unfreeze, resize, etc... `op_type` is required. The following options are available: - rename_column - modify_column_type - resize_column - move_column - freeze_column `column` is the name or `key` of the target column. `new_column_type` is the new type of the target column. For a list of column type params refer to the SeaTable API Parameter. For further information on column types, check the page [Models](https://api.seatable.com/reference/models). ### Example @@ -365,7 +365,7 @@ try { ### Return type -**object** +[**\SeaTable\Client\Base\UpdateColumn200Response**](../Model/UpdateColumn200Response.md) ### Authorization diff --git a/docs/Base/Api/LinksApi.md b/docs/Base/Api/LinksApi.md index f4ed6233..46c53029 100644 --- a/docs/Base/Api/LinksApi.md +++ b/docs/Base/Api/LinksApi.md @@ -20,7 +20,7 @@ autoLinkTask($base_uuid, $body): object Auto Link task -Query the status of auto add links task.There are 3 different status: - success - failed - running +Query the status of auto add links task. There are 3 different status: - success - failed - running ### Example @@ -71,7 +71,7 @@ autoLinks($base_uuid, $match_link_columns): object Auto Links -Automatically create link relationships. The caller needs to create a link column before calling the API, supporting both archived and unarchived data. It will return a task ID, by quering which you can get the status of the link creation in the backend wihtin 5 minutes. The matched data in the link column in the 2 tables must have the similar data structure (not same column type). For example, the text column can match email, auto-number or url type column, and so on. Currently, there are a few restrictions: - Formula and link-formula columns are not supported as matching columns - Single-select columns cannot be matched with text columns. +Automatically create link relationships. The caller needs to create a link column before calling the API, supporting both archived and unarchived data. It will return a task ID, by querying which you can get the status of the link creation in the backend within 5 minutes. The matched data in the link column in the 2 tables must have the similar data structure (not same column type). For example, the text column can match email, auto-number or url type column, and so on. Currently, there are a few restrictions: - Formula and link-formula columns are not supported as matching columns - Single-select columns cannot be matched with text columns. ### Example @@ -173,7 +173,7 @@ deleteRowLink($base_uuid, $row_link_create_update_delete): object Delete Row Link(s) -Deletes one or multiple links between two rows. Only the links between the row_ids mentioned in the mapping, will be removed. Other links will stay and not touched. +Deletes one or multiple links between two rows. Only the links between the row_ids mentioned in the mapping, will be removed. Other links will stay and not be touched. ### Example @@ -275,7 +275,7 @@ updateRowLink($base_uuid, $row_link_create_update_delete): object Update Row Link(s) -Updates the link(s) between one column and many others (1:n relation). Existings links will be removed and replaced with this new mapping. +Updates the link(s) between one column and many others (1:n relation). Existing links will be removed and replaced with this new mapping. ### Example diff --git a/docs/Base/Api/NotificationsApi.md b/docs/Base/Api/NotificationsApi.md index 1d08445a..19e998a4 100644 --- a/docs/Base/Api/NotificationsApi.md +++ b/docs/Base/Api/NotificationsApi.md @@ -8,7 +8,7 @@ All URIs are relative to https://cloud.seatable.io, except if the operation defi | [**listBaseNotifications()**](NotificationsApi.md#listBaseNotifications) | **GET** /api-gateway/api/v2/dtables/{base_uuid}/notifications/ | List Base Notifications | | [**markBaseNotificationAsSeen()**](NotificationsApi.md#markBaseNotificationAsSeen) | **PUT** /api-gateway/api/v2/dtables/{base_uuid}/notifications/{notification_id}/ | Mark Notification Read/Unread | | [**markBaseNotificationsAsSeen()**](NotificationsApi.md#markBaseNotificationsAsSeen) | **PUT** /api-gateway/api/v2/dtables/{base_uuid}/notifications/ | Mark Base Notifications as seen | -| [**sendToastNotification()**](NotificationsApi.md#sendToastNotification) | **POST** /api-gateway/api/v2/dtables/{base_uuid}/ui-toasts/ | Send toast notification | +| [**sendToastNotification()**](NotificationsApi.md#sendToastNotification) | **POST** /api-gateway/api/v2/dtables/{base_uuid}/ui-toasts/ | Send Toast Notification | ## `deleteBaseNotifications()` @@ -219,7 +219,7 @@ BaseTokenAuth sendToastNotification($base_uuid, $send_toast_notification_request): object ``` -Send toast notification +Send Toast Notification Send a toast notification diff --git a/docs/Base/Api/RowCommentsApi.md b/docs/Base/Api/RowCommentsApi.md index 1c3d2983..16aed794 100644 --- a/docs/Base/Api/RowCommentsApi.md +++ b/docs/Base/Api/RowCommentsApi.md @@ -20,7 +20,7 @@ deleteComment($base_uuid, $comment_id): object Delete Comment -Delete a certain comment by its ID. +Delete a certain comment by its ID. > 🚧 Creating comments via the API Gateway is not yet supported. This will be fixed in SeaTable 6.2. Until then, comments can only be created via `POST /api/v2.1/dtables/{dtable_uuid}/comments/` (dtable-web). ### Example @@ -66,12 +66,12 @@ BaseTokenAuth ## `getComment()` ```php -getComment($base_uuid, $comment_id): object +getComment($base_uuid, $comment_id): \SeaTable\Client\Base\GetComment200Response ``` Get Comment -Get the details of a certain comment with its ID. +Get the details of a certain comment with its ID. > 🚧 Creating comments via the API Gateway is not yet supported. This will be fixed in SeaTable 6.2. Until then, comments can only be created via `POST /api/v2.1/dtables/{dtable_uuid}/comments/` (dtable-web). ### Example @@ -105,7 +105,7 @@ try { ### Return type -**object** +[**\SeaTable\Client\Base\GetComment200Response**](../Model/GetComment200Response.md) ### Authorization @@ -237,7 +237,7 @@ $apiInstance = new SeaTable\Client\Base\RowCommentsApi( $config ); $base_uuid = 5c264e76-0e5a-448a-9f34-580b551364ca; // string | The unique identifier of a base. Sometimes also called dtable_uuid. -$days = 7; // int +$days = 7; // int | Number of days to look back for comments. try { $result = $apiInstance->listCommentsWithinDays($base_uuid, $days); @@ -252,7 +252,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **base_uuid** | **string**| The unique identifier of a base. Sometimes also called dtable_uuid. | | -| **days** | **int**| | [optional] | +| **days** | **int**| Number of days to look back for comments. | [optional] | ### Return type diff --git a/docs/Base/Api/RowsApi.md b/docs/Base/Api/RowsApi.md index f68fd0d0..2801a0f2 100644 --- a/docs/Base/Api/RowsApi.md +++ b/docs/Base/Api/RowsApi.md @@ -17,12 +17,12 @@ All URIs are relative to https://cloud.seatable.io, except if the operation defi ## `appendRows()` ```php -appendRows($base_uuid, $append_rows): object +appendRows($base_uuid, $append_rows): \SeaTable\Client\Base\AppendRows200Response ``` Append Row(s) -Append multiple rows to a table. Define the column:values pairs of each column in the [rows object](/reference/models). +Append multiple rows to a table. Define the column:values pairs of each column in the [rows object](/reference/models). > 🚧 Column names only > > This endpoint always expects **column names** (e.g. `Name`) in the row object, not internal column keys (e.g. `0000`). The `convert_keys` parameter is not supported. Unknown keys are silently ignored without error. ### Example @@ -56,7 +56,7 @@ try { ### Return type -**object** +[**\SeaTable\Client\Base\AppendRows200Response**](../Model/AppendRows200Response.md) ### Authorization @@ -119,12 +119,12 @@ BaseTokenAuth ## `getRow()` ```php -getRow($base_uuid, $row_id, $table_name, $convert_keys): object +getRow($base_uuid, $row_id, $table_name, $convert_keys): \SeaTable\Client\Base\GetRow200Response ``` Get Row -Get the values of one row with all columns and values, according to the row id provided. Depending of `convert` the response will contain the column names or the column keys. +Get the values of one row with all columns and values, according to the row id provided. Depending on `convert_keys` the response will contain the column names or the column keys. ### Example @@ -139,7 +139,7 @@ $apiInstance = new SeaTable\Client\Base\RowsApi( $config ); $base_uuid = 5c264e76-0e5a-448a-9f34-580b551364ca; // string | The unique identifier of a base. Sometimes also called dtable_uuid. -$row_id = Qtf7xPmoRaiFyQPO1aENTjb; // string | The id of the row. +$row_id = Qtf7xPmoRaiFyQPO1aENTj; // string | The id of the row. $table_name = Table1; // string | The name of the table to perform the operation on. Alternatively, you can use the `table_id` instead of `table_name`. If using `table_id`, ensure that the key in the request body is replaced accordingly. **Example:** Instead of `table_name: Table1` you can use `table_id: 0000`. $convert_keys = true; // bool | Determines if the columns are returned as their keys (false by default) or their names (true). @@ -162,7 +162,7 @@ try { ### Return type -**object** +[**\SeaTable\Client\Base\GetRow200Response**](../Model/GetRow200Response.md) ### Authorization @@ -179,7 +179,7 @@ listRows($base_uuid, $table_name, $view_name, $start, $limit, $convert_keys): ob List Rows -Returns a list of rows contained in a table (or in a view if provided). The usage of a view in SeaTable could be much more convenient then the usage of the complex SQL-syntax of the [SQL query endpoint](/reference/querysql). > 👍 Big Data support added > > Since Version 4.4 this endpoint also supports the big data backend. Every row consists of the columns, you defined in your base but also *hidden* informations like `_id`, `_mtime`, `_ctime`, `_creator` and so on. Get more details about these information in the [Models](/reference/models) area. > 📘 Hidden Columns > > If no view is selected, all columns (even hidden one) are returned. If a view is selected, only the visible columns of that view are returned with the request. > 📘 Link Columns > > From version 5.3 onward, the link column of a row returns a maximum of 50 records. +Returns a list of rows contained in a table (or in a view if provided). The usage of a view in SeaTable could be much more convenient than the usage of the complex SQL-syntax of the [SQL query endpoint](/reference/querysql). > 👍 Big Data support added > > Since Version 4.4 this endpoint also supports the big data backend. Every row consists of the columns, you defined in your base but also *hidden* informations like `_id`, `_mtime`, `_ctime`, `_creator` and so on. Get more details about these information in the [Models](/reference/models) area. > 📘 Hidden Columns > > If no view is selected, all columns (even hidden one) are returned. If a view is selected, only the visible columns of that view are returned with the request. > 📘 Link Columns > > From version 5.3 onward, the link column of a row returns a maximum of 50 records. ### Example @@ -195,7 +195,7 @@ $apiInstance = new SeaTable\Client\Base\RowsApi( ); $base_uuid = 5c264e76-0e5a-448a-9f34-580b551364ca; // string | The unique identifier of a base. Sometimes also called dtable_uuid. $table_name = Table1; // string | The name of the table to perform the operation on. Alternatively, you can use the `table_id` instead of `table_name`. If using `table_id`, ensure that the key in the request body is replaced accordingly. **Example:** Instead of `table_name: Table1` you can use `table_id: 0000`. -$view_name = Default View; // string | The name of the view to perform the operation on. Alternatively, you can use the `view_id` instead of `view_name`. If using `view_id`, ensure that the key in the request body is replaced accordingly. **Example:** Instead of `view_name: Default View` you an use `view_id: 0000`. +$view_name = Default View; // string | The name of the view to perform the operation on. Alternatively, you can use the `view_id` instead of `view_name`. If using `view_id`, ensure that the key in the request body is replaced accordingly. **Example:** Instead of `view_name: Default View` you can use `view_id: 0000`. $start = 0; // int | Starting position (number) of the returned rows. 0 by default. $limit = 100; // int | Number of rows that should be returned. 1000 by default. $convert_keys = true; // bool | Determines if the columns are returned as their keys (false by default) or their names (true). @@ -214,7 +214,7 @@ try { | ------------- | ------------- | ------------- | ------------- | | **base_uuid** | **string**| The unique identifier of a base. Sometimes also called dtable_uuid. | | | **table_name** | **string**| The name of the table to perform the operation on. Alternatively, you can use the `table_id` instead of `table_name`. If using `table_id`, ensure that the key in the request body is replaced accordingly. **Example:** Instead of `table_name: Table1` you can use `table_id: 0000`. | | -| **view_name** | **string**| The name of the view to perform the operation on. Alternatively, you can use the `view_id` instead of `view_name`. If using `view_id`, ensure that the key in the request body is replaced accordingly. **Example:** Instead of `view_name: Default View` you an use `view_id: 0000`. | [optional] | +| **view_name** | **string**| The name of the view to perform the operation on. Alternatively, you can use the `view_id` instead of `view_name`. If using `view_id`, ensure that the key in the request body is replaced accordingly. **Example:** Instead of `view_name: Default View` you can use `view_id: 0000`. | [optional] | | **start** | **int**| Starting position (number) of the returned rows. 0 by default. | [optional] | | **limit** | **int**| Number of rows that should be returned. 1000 by default. | [optional] | | **convert_keys** | **bool**| Determines if the columns are returned as their keys (false by default) or their names (true). | [optional] | @@ -289,7 +289,7 @@ querySQL($base_uuid, $sql_query): \SeaTable\Client\Base\SqlQueryResponse Query SeaTable with SQL -SeaTable offers a SQL like interface that supports `SELECT`, `INSERT`, `UPDATE` and `DELETE` statements. If you are familiar with SQL, you will have no difficulties to use this endpoint because typical SQL-statements are supported. This endpoint is the **most powerful** one that SeaTable can offer and it does not differentiate between the two SeaTable backend (normal and big data). Also the metadata of the table is returned. > 📘 `INSERT` and big data > > New rows (INSERT statement) are always added to the **big data backend**. An error message will be returned, if the big data backend is not activated for the target base. The complete [SQL Reference](https://developer.seatable.com/scripts/sql/functions/) can be found documentation in the developer manual. Here are some example requests for a fictitious table *Family* with the columns *name*, *age* and *birthday*: - `SELECT * FROM Family LIMIT 3` - `SELECT name, age, birthday FROM Family` - `SELECT name, age FROM Family ORDER BY name` - `INSERT INTO Family (Name,Age) VALUES ('Name', 23)` - `SELECT * FROM Family WHERE Name=? AND Age=?` SELECT does not support column keys. You can only limit the output by column names. > 📘 Avoid SQL injection > > If you use `?` in your SQL-statement, you have to provide values to replace the placeholders with parameters. This protects against SQL injections. > 🚧 Max and default return limit > > - The request returns a maximum of 10 000 rows, even if you specify a higher limit in your SQL-statement. > - If you don't specify a limit, max 100 rows are returned. > 📘 Link Columns > > Link columns return a maximum of 50 records per row. +This is the **recommended endpoint** for reading and modifying data in SeaTable. It supports `SELECT`, `INSERT`, `UPDATE`, and `DELETE` — giving you full access to filter, sort, group, join, and aggregate data in a single request. It works seamlessly across both normal and big data storage and returns column metadata alongside the results. SQL syntax is case insensitive and most common functions work as expected — including `now()`, `round()`, `upper()`, `trim()`, `abs()`, and many more. Some functions use SeaTable-specific names (e.g. `mid()` instead of `SUBSTR()`, `concatenate()` instead of `CONCAT()`). See the [function reference](https://developer.seatable.com/sql/functions/) for the complete list and a MySQL/MariaDB equivalents table. **Example queries** for a table *Contacts* with columns *Name*, *Age*, *City*: - `SELECT * FROM Contacts WHERE Age >= 18 ORDER BY Name LIMIT 100` - `SELECT City, COUNT(*), AVG(Age) FROM Contacts GROUP BY City` - `SELECT DISTINCT City FROM Contacts` - `UPDATE Contacts SET City = 'Berlin' WHERE Name = 'Alice'` - `DELETE FROM Contacts WHERE Age < 18` - `SELECT * FROM Contacts WHERE Name = ? AND Age = ?` (parameterized query) For the complete SQL reference, see the [SeaTable Developer Manual](https://developer.seatable.com/sql/): - [SELECT](https://developer.seatable.com/sql/select/) — retrieve, filter, sort, group, and join rows - [INSERT](https://developer.seatable.com/sql/insert/) — append rows (big data storage only) - [UPDATE](https://developer.seatable.com/sql/update/) — modify rows - [DELETE](https://developer.seatable.com/sql/delete/) — remove rows - [Functions](https://developer.seatable.com/sql/functions/) — all supported functions and MySQL/MariaDB equivalents - [Limitations](https://developer.seatable.com/sql/limitations/) — column writability, NULL handling, list types > 📘 Avoid SQL injection > > Use `?` placeholders in your SQL statement and pass the actual values via the `parameters` array. This protects against SQL injection. Example: `SELECT * FROM T WHERE Name = ? AND Age = ?` with `parameters: [\"Alice\", 30]`. > ❗ Limits > > - **Default:** 100 rows. **Maximum:** 10,000 rows. Use `LIMIT` and `OFFSET` to paginate. > - **Link columns** return a maximum of 50 linked records per row. > - **INSERT** only works with bases that have big data storage enabled. > 🚧 Key restrictions > > - Functions and expressions are **not supported** in `UPDATE SET` or `INSERT VALUES` — only constant values are allowed. > - `JOIN` keyword is not supported — use implicit joins: `SELECT ... FROM T1, T2 WHERE T1.col = T2.col`. > - Subqueries and `UNION` are not supported. > - `SELECT` uses column **names** by default. Set `convert_keys` to `false` to get column keys instead. ### Example @@ -391,7 +391,7 @@ updateRow($base_uuid, $update_rows): object Update Row(s) -Change the values in one or multiple existing row(s) by defining the new values for necessary columns in the row object. Both SeaTable backends are supported. > 📘 Structure of the row object > > The row object contains key:value pairs with the column name as key and the desired values. Check the page [Models](/reference/models) to get a better understanding of the row object. +Change the values in one or multiple existing row(s) by defining the new values for necessary columns in the row object. Both SeaTable backends are supported. > 📘 Structure of the row object > > The row object contains key:value pairs with the column name as key and the desired values. Check the page [Models](/reference/models) to get a better understanding of the row object. > 🚧 Column names only > > This endpoint always expects **column names** (e.g. `Name`) in the row object, not internal column keys (e.g. `0000`). The `convert_keys` parameter is not supported. Unknown keys are silently ignored without error. ### Example diff --git a/docs/Base/Api/TablesApi.md b/docs/Base/Api/TablesApi.md index 22067dae..69942b13 100644 --- a/docs/Base/Api/TablesApi.md +++ b/docs/Base/Api/TablesApi.md @@ -115,7 +115,7 @@ BaseTokenAuth ## `duplicateTable()` ```php -duplicateTable($base_uuid, $duplicate_table): object +duplicateTable($base_uuid, $duplicate_table): \SeaTable\Client\Base\DuplicateTable200Response ``` Duplicate Table @@ -154,7 +154,7 @@ try { ### Return type -**object** +[**\SeaTable\Client\Base\DuplicateTable200Response**](../Model/DuplicateTable200Response.md) ### Authorization @@ -171,7 +171,7 @@ renameTable($base_uuid, $rename_table): object Rename Table -Rename a table by providing it's original `table_name` and the desired `new_table_name`. +Rename a table by providing its original `table_name` and the desired `new_table_name`. ### Example diff --git a/docs/Base/Api/ViewsApi.md b/docs/Base/Api/ViewsApi.md index 671ce712..5f9137db 100644 --- a/docs/Base/Api/ViewsApi.md +++ b/docs/Base/Api/ViewsApi.md @@ -14,7 +14,7 @@ All URIs are relative to https://cloud.seatable.io, except if the operation defi ## `createView()` ```php -createView($base_uuid, $table_name, $new_view): object +createView($base_uuid, $table_name, $new_view): \SeaTable\Client\Base\CreateView200Response ``` Create View @@ -55,7 +55,7 @@ try { ### Return type -**object** +[**\SeaTable\Client\Base\CreateView200Response**](../Model/CreateView200Response.md) ### Authorization @@ -120,7 +120,7 @@ BaseTokenAuth ## `getView()` ```php -getView($base_uuid, $view_name, $table_name): object +getView($base_uuid, $view_name, $table_name): \SeaTable\Client\Base\CreateView200Response ``` Get View @@ -161,7 +161,7 @@ try { ### Return type -**object** +[**\SeaTable\Client\Base\CreateView200Response**](../Model/CreateView200Response.md) ### Authorization @@ -224,7 +224,7 @@ BaseTokenAuth ## `updateView()` ```php -updateView($base_uuid, $view_name, $table_name, $update_view): object +updateView($base_uuid, $view_name, $table_name, $update_view): \SeaTable\Client\Base\CreateView200Response ``` Update View @@ -267,7 +267,7 @@ try { ### Return type -**object** +[**\SeaTable\Client\Base\CreateView200Response**](../Model/CreateView200Response.md) ### Authorization diff --git a/docs/Base/Model/AppendRows200Response.md b/docs/Base/Model/AppendRows200Response.md new file mode 100644 index 00000000..203334b7 --- /dev/null +++ b/docs/Base/Model/AppendRows200Response.md @@ -0,0 +1,10 @@ +# # AppendRows200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**inserted_row_count** | **int** | | [optional] +**row_ids** | **object[]** | | [optional] +**first_row** | **object** | | [optional] + diff --git a/docs/Base/Model/ArchiveView.md b/docs/Base/Model/ArchiveView.md index f185ae1f..fb0f8f9f 100644 --- a/docs/Base/Model/ArchiveView.md +++ b/docs/Base/Model/ArchiveView.md @@ -5,5 +5,5 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **table_name** | **string** | The name of the table to perform the operation on. Alternatively, you can use the `table_id` instead of `table_name`. If using `table_id`, ensure that the key in the request body is replaced accordingly. | -**view_name** | **string** | The name of the view to perform the operation on. Alternatively, you can use the `view_id` instead of `view_name`. If using `view_id`, ensure that the key in the request body is replaced accordingly. **Example:** Instead of `view_name: Default View` you an use `view_id: 0000`. | +**view_name** | **string** | The name of the view to perform the operation on. Alternatively, you can use the `view_id` instead of `view_name`. If using `view_id`, ensure that the key in the request body is replaced accordingly. **Example:** Instead of `view_name: Default View` you can use `view_id: 0000`. | diff --git a/docs/Base/Model/AutonumberColumnFormat.md b/docs/Base/Model/AutonumberColumnFormat.md index d65db0de..df7002c3 100644 --- a/docs/Base/Model/AutonumberColumnFormat.md +++ b/docs/Base/Model/AutonumberColumnFormat.md @@ -4,5 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**format** | **string** | | +**format** | **string** | The number format pattern. | +**digits** | **int** | Number of digits (must match the zeros in `format`). | +**prefix_type** | **string** | Type of prefix — \"string\" for a custom prefix, \"date\" for a date-based prefix (YYYYMMDD). | [optional] +**prefix** | **string** | The prefix value (only used when `prefix_type` is \"string\"). | [optional] diff --git a/docs/Base/Model/CreateView200Response.md b/docs/Base/Model/CreateView200Response.md new file mode 100644 index 00000000..42066fda --- /dev/null +++ b/docs/Base/Model/CreateView200Response.md @@ -0,0 +1,24 @@ +# # CreateView200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_id** | **string** | | [optional] +**name** | **string** | | [optional] +**type** | **string** | | [optional] +**is_locked** | **bool** | | [optional] +**filter_conjunction** | **string** | | [optional] +**filters** | **object[]** | | [optional] +**sorts** | **object[]** | | [optional] +**groupbys** | **object[]** | | [optional] +**group_rows** | **object[]** | | [optional] +**groups** | **object[]** | | [optional] +**colorbys** | **object** | | [optional] +**hidden_columns** | **object[]** | | [optional] +**rows** | **object[]** | | [optional] +**formula_rows** | **object** | | [optional] +**link_rows** | **object** | | [optional] +**summaries** | **object** | | [optional] +**colors** | **object** | | [optional] + diff --git a/docs/Base/Model/DeleteRows.md b/docs/Base/Model/DeleteRows.md index 5aebd418..a49ea73d 100644 --- a/docs/Base/Model/DeleteRows.md +++ b/docs/Base/Model/DeleteRows.md @@ -5,5 +5,5 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **table_name** | **string** | The name of the table to perform the operation on. Alternatively, you can use the `table_id` instead of `table_name`. If using `table_id`, ensure that the key in the request body is replaced accordingly. | -**row_ids** | **string[]** | Defines the rows which should be updated. | +**row_ids** | **string[]** | Defines the rows which should be deleted. | diff --git a/docs/Base/Model/DuplicateTable200Response.md b/docs/Base/Model/DuplicateTable200Response.md new file mode 100644 index 00000000..8428ad66 --- /dev/null +++ b/docs/Base/Model/DuplicateTable200Response.md @@ -0,0 +1,13 @@ +# # DuplicateTable200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_id** | **string** | | [optional] +**name** | **string** | | [optional] +**columns** | **object[]** | | [optional] +**rows** | **object[]** | | [optional] +**id_row_map** | **object** | | [optional] +**views** | **object[]** | | [optional] + diff --git a/docs/Base/Model/FiltersEmail.md b/docs/Base/Model/FiltersEmail.md index f95200dd..35f7af73 100644 --- a/docs/Base/Model/FiltersEmail.md +++ b/docs/Base/Model/FiltersEmail.md @@ -5,6 +5,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **column_key** | **string** | | [optional] -**email_filter_predicate** | [**\SeaTable\Client\Base\EmailFilterPredicate**](EmailFilterPredicate.md) | | [optional] +**filter_predicate** | [**\SeaTable\Client\Base\EmailFilterPredicate**](EmailFilterPredicate.md) | | [optional] **filter_term** | **string** | | [optional] diff --git a/docs/Base/Model/GetComment200Response.md b/docs/Base/Model/GetComment200Response.md new file mode 100644 index 00000000..46da4b64 --- /dev/null +++ b/docs/Base/Model/GetComment200Response.md @@ -0,0 +1,15 @@ +# # GetComment200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**author** | **string** | | [optional] +**comment** | **string** | | [optional] +**dtable_uuid** | **string** | | [optional] +**row_id** | **string** | | [optional] +**created_at** | **string** | | [optional] +**updated_at** | **string** | | [optional] +**resolved** | **int** | | [optional] + diff --git a/docs/Base/Model/GetRow200Response.md b/docs/Base/Model/GetRow200Response.md new file mode 100644 index 00000000..f7f3e4f4 --- /dev/null +++ b/docs/Base/Model/GetRow200Response.md @@ -0,0 +1,13 @@ +# # GetRow200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_id** | **string** | | [optional] +**_mtime** | **string** | | [optional] +**name** | **string** | | [optional] +**date** | **string** | | [optional] +**content** | **string** | | [optional] +**link** | **object[]** | | [optional] + diff --git a/docs/Base/Model/ListRowLinksRowsInner.md b/docs/Base/Model/ListRowLinksRowsInner.md index 2fcb37d1..86e05f92 100644 --- a/docs/Base/Model/ListRowLinksRowsInner.md +++ b/docs/Base/Model/ListRowLinksRowsInner.md @@ -5,6 +5,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **row_id** | **string** | The id of the row. The id of a row is unique inside a base and is often used to identify one specific row. | -**offset** | **int** | Offset is the beginning number of your query. If your record is linked to multiple records, use e.g. 0 to start quering from the 1st element or e.g. 5 to start querying from the 6th element, etc. Attention: The returned list of linked rows is not ordered by its original order on the web interface, but rather by created time (ctime). Default is 0. | [optional] +**offset** | **int** | Offset is the beginning number of your query. If your record is linked to multiple records, use e.g. 0 to start querying from the 1st element or e.g. 5 to start querying from the 6th element, etc. Attention: The returned list of linked rows is not ordered by its original order on the web interface, but rather by created time (ctime). Default is 0. | [optional] **limit** | **int** | Specify the maximum number of records to be returned. For example, use 20 to retrieve more than the default 10 records. | [optional] diff --git a/docs/Base/Model/QuerySQL400Response.md b/docs/Base/Model/QuerySQL400Response.md new file mode 100644 index 00000000..89ec8870 --- /dev/null +++ b/docs/Base/Model/QuerySQL400Response.md @@ -0,0 +1,8 @@ +# # QuerySQL400Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**error_message** | **string** | | [optional] + diff --git a/docs/Base/Model/SelectColumnFormatOptionsInner.md b/docs/Base/Model/SelectColumnFormatOptionsInner.md index 43c79576..56d6c359 100644 --- a/docs/Base/Model/SelectColumnFormatOptionsInner.md +++ b/docs/Base/Model/SelectColumnFormatOptionsInner.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **string** | Select any unique id. | [optional] **name** | **string** | The name of your option. | [optional] -**color** | **string** | select your code-code for the background. | [optional] +**color** | **string** | select your color-code for the background. | [optional] **text_color** | **string** | select your color-code for the text. | [optional] **border_color** | **string** | select your color-code for the text. | [optional] diff --git a/docs/Base/Model/UpdateColumn200Response.md b/docs/Base/Model/UpdateColumn200Response.md new file mode 100644 index 00000000..b439f938 --- /dev/null +++ b/docs/Base/Model/UpdateColumn200Response.md @@ -0,0 +1,17 @@ +# # UpdateColumn200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**key** | **string** | | [optional] +**type** | **string** | | [optional] +**name** | **string** | | [optional] +**editable** | **bool** | | [optional] +**width** | **int** | | [optional] +**resizable** | **bool** | | [optional] +**draggable** | **bool** | | [optional] +**data** | **object** | | [optional] +**permission_type** | **string** | | [optional] +**permitted_users** | **string[]** | | [optional] + diff --git a/docs/Base/Model/UpdateView.md b/docs/Base/Model/UpdateView.md index c9189f85..951118b9 100644 --- a/docs/Base/Model/UpdateView.md +++ b/docs/Base/Model/UpdateView.md @@ -4,11 +4,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **string** | The name of the view to perform the operation on. Alternatively, you can use the `view_id` instead of `view_name`. If using `view_id`, ensure that the key in the request body is replaced accordingly. **Example:** Instead of `view_name: Default View` you an use `view_id: 0000`. | [optional] +**name** | **string** | The name of the view to perform the operation on. Alternatively, you can use the `view_id` instead of `view_name`. If using `view_id`, ensure that the key in the request body is replaced accordingly. **Example:** Instead of `view_name: Default View` you can use `view_id: 0000`. | [optional] **is_locked** | **bool** | | [optional] **filters** | [**\SeaTable\Client\Base\UpdateViewFiltersInner[]**](UpdateViewFiltersInner.md) | filter of your view | [optional] **filter_conjunction** | [**\SeaTable\Client\Base\FilterConjunction**](FilterConjunction.md) | | [optional] **sorts** | [**\SeaTable\Client\Base\SortsInner[]**](SortsInner.md) | sorting of your view | [optional] **groupbys** | [**\SeaTable\Client\Base\SortsInner[]**](SortsInner.md) | grouping of your view | [optional] -**hidden_columns** | **string[]** | IDs of the rows that should be hidden | [optional] +**hidden_columns** | **string[]** | IDs of the columns that should be hidden | [optional] diff --git a/docs/Base/Model/UpdateViewFiltersInner.md b/docs/Base/Model/UpdateViewFiltersInner.md index 805f4a56..47816afd 100644 --- a/docs/Base/Model/UpdateViewFiltersInner.md +++ b/docs/Base/Model/UpdateViewFiltersInner.md @@ -8,5 +8,4 @@ Name | Type | Description | Notes **filter_predicate** | [**\SeaTable\Client\Base\EmailFilterPredicate**](EmailFilterPredicate.md) | | [optional] **filter_term** | **string** | | [optional] **filter_term_modifier** | [**\SeaTable\Client\Base\DateFilterTermModifier**](DateFilterTermModifier.md) | | [optional] -**email_filter_predicate** | [**\SeaTable\Client\Base\EmailFilterPredicate**](EmailFilterPredicate.md) | | [optional] diff --git a/docs/File/Api/FilesImagesApi.md b/docs/File/Api/FilesImagesApi.md index 688472f4..072582c7 100644 --- a/docs/File/Api/FilesImagesApi.md +++ b/docs/File/Api/FilesImagesApi.md @@ -111,7 +111,7 @@ ApiTokenAuth ## `getUploadLink()` ```php -getUploadLink(): object +getUploadLink(): \SeaTable\Client\File\GetUploadLink200Response ``` Get Upload Link @@ -145,7 +145,7 @@ This endpoint does not need any parameter. ### Return type -**object** +[**\SeaTable\Client\File\GetUploadLink200Response**](../Model/GetUploadLink200Response.md) ### Authorization @@ -162,7 +162,7 @@ uploadFile($upload_link, $file, $parent_dir, $relative_path, $replace): object[] Upload File (or Image) -Upload a file or an image as an attachment to a base. To execute this request you need to generate an upload link first. > 📘 Three steps to add a file/an image to a base > > To add an image or a file to a base, three steps are necessary: > 1. [Generate an upload link](/reference/getuploadlink). > 2. Upload the file to the base as an attachment. (this article) > 3. [Update a row](/reference/updaterow) and attach the file/the image to a file or image column. > > The [SeaTable Developer Manual](https://developer.seatable.com/clients/javascript/examples/file-upload/) includes a Node.js script that showcases the necessary API calls. > 📘 Different variable names > > Pay attention that the return values of upload link have slightly different names, so `parent_path` is `parent_dir` in this call. ## Attach the file/image to a file or image column After uploading the file/image to a base, SeaTable saves the uploaded file at non-public URL in the form: `/workspace/{workspace_id}`+`parent_dir`+`relative_path`+`name`. You are expected to construct this relative URL yourself. The URL consists of the following components: - `workspace_id`: Each base is attached to a workspace. You can use the [Get Base-Token with API-Token](https://api.seatable.com/reference/getbasetokenwithapitoken) endpoint to retrieve the workspace ID for a base. - `parent_dir`: Use the value of the `parent_path` field from the response of the [Get Upload Link](https://api.seatable.com/reference/getuploadlink) API call. - `relative_path`: Use the value of the `img_relative_path` or `file_relative_path` field (depending on the type of asset you want to upload) from the response of the [Get Upload Link](https://api.seatable.com/reference/getuploadlink) API call. - `name`: Use the value of the `name` field from the response of the [Upload File (or Image)](https://api.seatable.com/reference/uploadfile) API call. Here is an example how this might look like: `https://cloud.seatable.io/workspace/24/asset/55f2f056-5da1-4095-b5f8-791bb51b991e/images/2023-07/party.png` If you are logged in with your browser, you can access this file. Otherwise you will see the login screen. Knowing this URL, you can add a new row or update an existing row and use the URL to add this attachment to your file/image column. ``` # Example how to add an already uploaded image to a row: \"row\": { \"My Image Column\": [\"/workspace/24/asset/55f2f056-5da1-4095-b5f8-791bb51b991e/images/2023-07/party.png`\"] } # Example how to add an already uploaded file to a row: \"row\": { \"File Column\": [{ \"name\": \"invoice.pdf\", \"size\": 101454, \"type\": \"file\", \"url\": \"/workspace/24/asset/55f2f056-5da1-4095-b5f8-791bb51b991e/images/2023-07/invoice.pdf\" }] } ``` > 🚧 File requires the input variables size, type and url > > As you can see, in the case of an image the URL is sufficient to attach the image to an image column. In case of a file, you have to provide all four input values. +Upload a file or an image as an attachment to a base. To execute this request you need to generate an upload link first. > 📘 Three steps to add a file/an image to a base > > To add an image or a file to a base, three steps are necessary: > 1. [Generate an upload link](/reference/getuploadlink). > 2. Upload the file to the base as an attachment. (this article) > 3. [Update a row](/reference/updaterow) and attach the file/the image to a file or image column. > > The [SeaTable Developer Manual](https://developer.seatable.com/clients/javascript/examples/file-upload/) includes a Node.js script that showcases the necessary API calls. > 📘 Different variable names > > Pay attention that the return values of upload link have slightly different names, so `parent_path` is `parent_dir` in this call. ## Attach the file/image to a file or image column After uploading the file/image to a base, SeaTable saves the uploaded file at non-public URL in the form: `/workspace/{workspace_id}`+`parent_dir`+`relative_path`+`name`. You are expected to construct this relative URL yourself. The URL consists of the following components: - `workspace_id`: Each base is attached to a workspace. You can use the [Get Base-Token with API-Token](https://api.seatable.com/reference/getbasetokenwithapitoken) endpoint to retrieve the workspace ID for a base. - `parent_dir`: Use the value of the `parent_path` field from the response of the [Get Upload Link](https://api.seatable.com/reference/getuploadlink) API call. - `relative_path`: Use the value of the `img_relative_path` or `file_relative_path` field (depending on the type of asset you want to upload) from the response of the [Get Upload Link](https://api.seatable.com/reference/getuploadlink) API call. - `name`: Use the value of the `name` field from the response of the [Upload File (or Image)](https://api.seatable.com/reference/uploadfile) API call. Here is an example how this might look like: `https://cloud.seatable.io/workspace/24/asset/55f2f056-5da1-4095-b5f8-791bb51b991e/images/2023-07/party.png` If you are logged in with your browser, you can access this file. Otherwise you will see the login screen. Knowing this URL, you can add a new row or update an existing row and use the URL to add this attachment to your file/image column. ``` # Example how to add an already uploaded image to a row: \"row\": { \"My Image Column\": [\"/workspace/24/asset/55f2f056-5da1-4095-b5f8-791bb51b991e/images/2023-07/party.png\"] } # Example how to add an already uploaded file to a row: \"row\": { \"File Column\": [{ \"name\": \"invoice.pdf\", \"size\": 101454, \"type\": \"file\", \"url\": \"/workspace/24/asset/55f2f056-5da1-4095-b5f8-791bb51b991e/images/2023-07/invoice.pdf\" }] } ``` > 🚧 File requires the input variables size, type and url > > As you can see, in the case of an image the URL is sufficient to attach the image to an image column. In case of a file, you have to provide all four input values. ### Example diff --git a/docs/File/Api/FilesImagesCustomFolderApi.md b/docs/File/Api/FilesImagesCustomFolderApi.md index ced3f255..8fb30aa6 100644 --- a/docs/File/Api/FilesImagesCustomFolderApi.md +++ b/docs/File/Api/FilesImagesCustomFolderApi.md @@ -68,6 +68,8 @@ getCustomDownloadLink($path): object Get Download Link +Get a temporary download link for a file in a custom folder. + ### Example ```php @@ -115,6 +117,8 @@ getCustomFileMetadata($path, $name): object Get File Metadata +Get metadata (name, size, last update) of a file in a custom folder. + ### Example ```php @@ -164,6 +168,8 @@ getCustomFiles($path): object Get Files from Folder +List files and subdirectories in a custom folder of a base. + ### Example ```php @@ -211,6 +217,8 @@ getCustomUploadLink($path): object Get Upload Link +Get a temporary upload link for uploading files to a custom folder. + ### Example ```php diff --git a/docs/File/Model/DeleteBaseAsset404Response.md b/docs/File/Model/DeleteBaseAsset404Response.md new file mode 100644 index 00000000..3b39ece9 --- /dev/null +++ b/docs/File/Model/DeleteBaseAsset404Response.md @@ -0,0 +1,8 @@ +# # DeleteBaseAsset404Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**error_msg** | **string** | | [optional] + diff --git a/docs/File/Model/GetFileDownloadLink400Response.md b/docs/File/Model/GetFileDownloadLink400Response.md new file mode 100644 index 00000000..1cba4bb4 --- /dev/null +++ b/docs/File/Model/GetFileDownloadLink400Response.md @@ -0,0 +1,8 @@ +# # GetFileDownloadLink400Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**error_msg** | **string** | | [optional] + diff --git a/docs/File/Model/GetUploadLink200Response.md b/docs/File/Model/GetUploadLink200Response.md new file mode 100644 index 00000000..9911e1aa --- /dev/null +++ b/docs/File/Model/GetUploadLink200Response.md @@ -0,0 +1,12 @@ +# # GetUploadLink200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**upload_link** | **string** | | [optional] +**workspace_id** | **int** | | [optional] +**parent_path** | **string** | | [optional] +**img_relative_path** | **string** | | [optional] +**file_relative_path** | **string** | | [optional] + diff --git a/docs/PythonScheduler/Api/StatisticsApi.md b/docs/PythonScheduler/Api/StatisticsApi.md index b6660d11..3cb7a7f2 100644 --- a/docs/PythonScheduler/Api/StatisticsApi.md +++ b/docs/PythonScheduler/Api/StatisticsApi.md @@ -6,9 +6,9 @@ All URIs are relative to https://cloud.seatable.io, except if the operation defi | ------------- | ------------- | ------------- | | [**getStatisticsGroupedByBase()**](StatisticsApi.md#getStatisticsGroupedByBase) | **GET** /admin/statistics/by-base/ | Grouped by Base | | [**getStatisticsGroupedByDay()**](StatisticsApi.md#getStatisticsGroupedByDay) | **GET** /admin/statistics/by-day/ | Grouped by Day | -| [**scriptRunsPerBase()**](StatisticsApi.md#scriptRunsPerBase) | **GET** /admin/statistics/scripts-running/by-base/ | Script runs per base | -| [**scriptRunsPerTeam()**](StatisticsApi.md#scriptRunsPerTeam) | **GET** /admin/statistics/scripts-running/by-org/ | Script runs per team | -| [**scriptRunsPerUser()**](StatisticsApi.md#scriptRunsPerUser) | **GET** /admin/statistics/scripts-running/by-user/ | Script runs per user | +| [**scriptRunsPerBase()**](StatisticsApi.md#scriptRunsPerBase) | **GET** /admin/statistics/scripts-running/by-base/ | Script Runs per Base | +| [**scriptRunsPerTeam()**](StatisticsApi.md#scriptRunsPerTeam) | **GET** /admin/statistics/scripts-running/by-org/ | Script Runs per Team | +| [**scriptRunsPerUser()**](StatisticsApi.md#scriptRunsPerUser) | **GET** /admin/statistics/scripts-running/by-user/ | Script Runs per User | ## `getStatisticsGroupedByBase()` @@ -130,10 +130,10 @@ PythonSchedulerAuth ## `scriptRunsPerBase()` ```php -scriptRunsPerBase($month, $order_by, $direction, $page, $per_page): object +scriptRunsPerBase($month, $order_by, $direction, $page, $per_page): \SeaTable\Client\PythonScheduler\ScriptRunsPerUser200Response ``` -Script runs per base +Script Runs per Base > 📘 Requires Self-Hosted Installation > > This endpoint requires a Python-Scheduler-Token, which can only be retrieved by the system administrator. > Therefore this endpoint cannot be used with SeaTable Cloud. @@ -149,7 +149,7 @@ $apiInstance = new SeaTable\Client\PythonScheduler\StatisticsApi( new GuzzleHttp\Client(), $config ); -$month = 2023-06; // string | For which month you'd like to list the statistics in the format of YYYY-MM. If you leave this value empty, +$month = 202306; // string | For which month you'd like to list the statistics in the format of YYYYMM. If you leave this value empty, the current month is used. $order_by = total_run_count; // string | Select the parameter to order the results. $direction = desc; // string | The direction of the sort, ascending `asc` or descending `desc`. asc by default. Direction requires that `order_by` is set. $page = 1; // int | The page number you want to start showing the entries. If no value is provided, 1 will be used. @@ -167,7 +167,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **month** | **string**| For which month you'd like to list the statistics in the format of YYYY-MM. If you leave this value empty, | [optional] | +| **month** | **string**| For which month you'd like to list the statistics in the format of YYYYMM. If you leave this value empty, the current month is used. | [optional] | | **order_by** | **string**| Select the parameter to order the results. | [optional] [default to ''] | | **direction** | **string**| The direction of the sort, ascending `asc` or descending `desc`. asc by default. Direction requires that `order_by` is set. | [optional] [default to ''] | | **page** | **int**| The page number you want to start showing the entries. If no value is provided, 1 will be used. | [optional] | @@ -175,7 +175,7 @@ try { ### Return type -**object** +[**\SeaTable\Client\PythonScheduler\ScriptRunsPerUser200Response**](../Model/ScriptRunsPerUser200Response.md) ### Authorization @@ -187,10 +187,10 @@ PythonSchedulerAuth ## `scriptRunsPerTeam()` ```php -scriptRunsPerTeam($month, $order_by, $direction, $page, $per_page): object +scriptRunsPerTeam($month, $order_by, $direction, $page, $per_page): \SeaTable\Client\PythonScheduler\ScriptRunsPerUser200Response ``` -Script runs per team +Script Runs per Team > 📘 Requires Self-Hosted Installation > > This endpoint requires a Python-Scheduler-Token, which can only be retrieved by the system administrator. > Therefore this endpoint cannot be used with SeaTable Cloud. @@ -206,7 +206,7 @@ $apiInstance = new SeaTable\Client\PythonScheduler\StatisticsApi( new GuzzleHttp\Client(), $config ); -$month = 2023-06; // string | For which month you'd like to list the statistics in the format of YYYY-MM. If you leave this value empty, +$month = 202306; // string | For which month you'd like to list the statistics in the format of YYYYMM. If you leave this value empty, the current month is used. $order_by = total_run_count; // string | Select the parameter to order the results. $direction = desc; // string | The direction of the sort, ascending `asc` or descending `desc`. asc by default. Direction requires that `order_by` is set. $page = 1; // int | The page number you want to start showing the entries. If no value is provided, 1 will be used. @@ -224,7 +224,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **month** | **string**| For which month you'd like to list the statistics in the format of YYYY-MM. If you leave this value empty, | [optional] | +| **month** | **string**| For which month you'd like to list the statistics in the format of YYYYMM. If you leave this value empty, the current month is used. | [optional] | | **order_by** | **string**| Select the parameter to order the results. | [optional] [default to ''] | | **direction** | **string**| The direction of the sort, ascending `asc` or descending `desc`. asc by default. Direction requires that `order_by` is set. | [optional] [default to ''] | | **page** | **int**| The page number you want to start showing the entries. If no value is provided, 1 will be used. | [optional] | @@ -232,7 +232,7 @@ try { ### Return type -**object** +[**\SeaTable\Client\PythonScheduler\ScriptRunsPerUser200Response**](../Model/ScriptRunsPerUser200Response.md) ### Authorization @@ -244,10 +244,10 @@ PythonSchedulerAuth ## `scriptRunsPerUser()` ```php -scriptRunsPerUser($month, $order_by, $direction, $page, $per_page): object +scriptRunsPerUser($month, $order_by, $direction, $page, $per_page): \SeaTable\Client\PythonScheduler\ScriptRunsPerUser200Response ``` -Script runs per user +Script Runs per User > 📘 Requires Self-Hosted Installation > > This endpoint requires a Python-Scheduler-Token, which can only be retrieved by the system administrator. > Therefore this endpoint cannot be used with SeaTable Cloud. @@ -263,7 +263,7 @@ $apiInstance = new SeaTable\Client\PythonScheduler\StatisticsApi( new GuzzleHttp\Client(), $config ); -$month = 2023-06; // string | For which month you'd like to list the statistics in the format of YYYY-MM. If you leave this value empty, +$month = 202306; // string | For which month you'd like to list the statistics in the format of YYYYMM. If you leave this value empty, the current month is used. $order_by = total_run_count; // string | Select the parameter to order the results. $direction = desc; // string | The direction of the sort, ascending `asc` or descending `desc`. asc by default. Direction requires that `order_by` is set. $page = 1; // int | The page number you want to start showing the entries. If no value is provided, 1 will be used. @@ -281,7 +281,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **month** | **string**| For which month you'd like to list the statistics in the format of YYYY-MM. If you leave this value empty, | [optional] | +| **month** | **string**| For which month you'd like to list the statistics in the format of YYYYMM. If you leave this value empty, the current month is used. | [optional] | | **order_by** | **string**| Select the parameter to order the results. | [optional] [default to ''] | | **direction** | **string**| The direction of the sort, ascending `asc` or descending `desc`. asc by default. Direction requires that `order_by` is set. | [optional] [default to ''] | | **page** | **int**| The page number you want to start showing the entries. If no value is provided, 1 will be used. | [optional] | @@ -289,7 +289,7 @@ try { ### Return type -**object** +[**\SeaTable\Client\PythonScheduler\ScriptRunsPerUser200Response**](../Model/ScriptRunsPerUser200Response.md) ### Authorization diff --git a/docs/PythonScheduler/Model/ScriptRunsPerUser200Response.md b/docs/PythonScheduler/Model/ScriptRunsPerUser200Response.md new file mode 100644 index 00000000..d0a30694 --- /dev/null +++ b/docs/PythonScheduler/Model/ScriptRunsPerUser200Response.md @@ -0,0 +1,10 @@ +# # ScriptRunsPerUser200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**month** | **string** | | [optional] +**results** | **object[]** | | [optional] +**total_count** | **int** | | [optional] + diff --git a/docs/SysAdmin/Api/AutomationsApi.md b/docs/SysAdmin/Api/AutomationsApi.md index 07d08860..424f87b3 100644 --- a/docs/SysAdmin/Api/AutomationsApi.md +++ b/docs/SysAdmin/Api/AutomationsApi.md @@ -32,7 +32,7 @@ $apiInstance = new SeaTable\Client\SysAdmin\AutomationsApi( new GuzzleHttp\Client(), $config ); -$automation_rule_id = 10; // int +$automation_rule_id = 10; // int | The ID of the automation rule. try { $result = $apiInstance->deleteAutomation($automation_rule_id); @@ -46,7 +46,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **automation_rule_id** | **int**| | | +| **automation_rule_id** | **int**| The ID of the automation rule. | | ### Return type diff --git a/docs/SysAdmin/Api/BasesApi.md b/docs/SysAdmin/Api/BasesApi.md index 4528715b..bfdd9a01 100644 --- a/docs/SysAdmin/Api/BasesApi.md +++ b/docs/SysAdmin/Api/BasesApi.md @@ -119,6 +119,8 @@ listAllBases($per_page, $page): object List All Bases +List all bases in the system with pagination support. + ### Example ```php @@ -292,7 +294,7 @@ $apiInstance = new SeaTable\Client\SysAdmin\BasesApi( new GuzzleHttp\Client(), $config ); -$user_id = 23abc456def789ghi123jkl456mno789@auth.local; // string | The unique user id in the form ...@auth.local. This is not the email address of the user. +$user_id = 2abc456def789abc123def456abc789a@auth.local; // string | The unique user id in the form ...@auth.local. This is not the email address of the user. $page = 1; // int | The page number you want to start showing the entries. If no value is provided, 1 will be used. $per_page = 25; // int | The number of results that should be returned. If no value is provided, 25 results will be returned. @@ -345,7 +347,7 @@ $apiInstance = new SeaTable\Client\SysAdmin\BasesApi( new GuzzleHttp\Client(), $config ); -$base_id = base_id; // string | The id of the base. This is not the base_uuid. +$base_id = 123; // string | The id of the base. This is not the base_uuid. try { $result = $apiInstance->restoreTrashedBase($base_id); diff --git a/docs/SysAdmin/Api/CommonDatasetApi.md b/docs/SysAdmin/Api/CommonDatasetApi.md index c46e1fbd..62c521a7 100644 --- a/docs/SysAdmin/Api/CommonDatasetApi.md +++ b/docs/SysAdmin/Api/CommonDatasetApi.md @@ -8,7 +8,7 @@ All URIs are relative to https://cloud.seatable.io, except if the operation defi | [**deleteInvalidSyncs()**](CommonDatasetApi.md#deleteInvalidSyncs) | **DELETE** /api/v2.1/admin/common-dataset/invalid-syncs/ | Delete Invalid Syncs | | [**listCommonDataset()**](CommonDatasetApi.md#listCommonDataset) | **GET** /api/v2.1/admin/common-datasets/ | List Common Dataset | | [**listCommonDatasetSyncs()**](CommonDatasetApi.md#listCommonDatasetSyncs) | **GET** /api/v2.1/admin/common-dataset/periodical-syncs/ | List Common Dataset Syncs | -| [**listInvalidSyncs()**](CommonDatasetApi.md#listInvalidSyncs) | **GET** /api/v2.1/admin/common-dataset/invalid-syncs/ | List invalid Syncs | +| [**listInvalidSyncs()**](CommonDatasetApi.md#listInvalidSyncs) | **GET** /api/v2.1/admin/common-dataset/invalid-syncs/ | List Invalid Syncs | ## `deleteInvalidSync()` @@ -214,7 +214,7 @@ AccountTokenAuth listInvalidSyncs($page, $per_page): object ``` -List invalid Syncs +List Invalid Syncs In some cases, a common dataset synchronization configuration becomes invalid. Such cases happen when, for example, the source or destination tables are deleted. Use this request to list off all the invalid common dataset synchronization configurations in the system. diff --git a/docs/SysAdmin/Api/DepartmentsApi.md b/docs/SysAdmin/Api/DepartmentsApi.md index f28b08f1..28e6f9d9 100644 --- a/docs/SysAdmin/Api/DepartmentsApi.md +++ b/docs/SysAdmin/Api/DepartmentsApi.md @@ -13,7 +13,7 @@ All URIs are relative to https://cloud.seatable.io, except if the operation defi ## `addDepartment()` ```php -addDepartment($add_department_request): object +addDepartment($add_department_request): \SeaTable\Client\SysAdmin\AddDepartment200Response ``` Add Department @@ -50,7 +50,7 @@ try { ### Return type -**object** +[**\SeaTable\Client\SysAdmin\AddDepartment200Response**](../Model/AddDepartment200Response.md) ### Authorization @@ -81,7 +81,7 @@ $apiInstance = new SeaTable\Client\SysAdmin\DepartmentsApi( new GuzzleHttp\Client(), $config ); -$department_id = 1; // int +$department_id = 1; // int | The ID of the department. try { $result = $apiInstance->deleteDepartment($department_id); @@ -95,7 +95,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **department_id** | **int**| | | +| **department_id** | **int**| The ID of the department. | | ### Return type @@ -111,7 +111,7 @@ AccountTokenAuth ## `getDepartments()` ```php -getDepartments($department_id, $return_ancestors): object +getDepartments($department_id, $return_ancestors): \SeaTable\Client\SysAdmin\ListDepartments200Response ``` Get Department @@ -130,8 +130,8 @@ $apiInstance = new SeaTable\Client\SysAdmin\DepartmentsApi( new GuzzleHttp\Client(), $config ); -$department_id = 1; // int -$return_ancestors = true; // bool +$department_id = 1; // int | The ID of the department. +$return_ancestors = true; // bool | Whether to include ancestor groups in the response. try { $result = $apiInstance->getDepartments($department_id, $return_ancestors); @@ -145,12 +145,12 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **department_id** | **int**| | | -| **return_ancestors** | **bool**| | [optional] | +| **department_id** | **int**| The ID of the department. | | +| **return_ancestors** | **bool**| Whether to include ancestor groups in the response. | [optional] | ### Return type -**object** +[**\SeaTable\Client\SysAdmin\ListDepartments200Response**](../Model/ListDepartments200Response.md) ### Authorization @@ -162,7 +162,7 @@ AccountTokenAuth ## `listDepartments()` ```php -listDepartments($parent_department_id): object +listDepartments($parent_department_id): \SeaTable\Client\SysAdmin\ListDepartments200Response ``` List Departments @@ -199,7 +199,7 @@ try { ### Return type -**object** +[**\SeaTable\Client\SysAdmin\ListDepartments200Response**](../Model/ListDepartments200Response.md) ### Authorization diff --git a/docs/SysAdmin/Api/ExportApi.md b/docs/SysAdmin/Api/ExportApi.md index 948bf5d7..1a7b4f9f 100644 --- a/docs/SysAdmin/Api/ExportApi.md +++ b/docs/SysAdmin/Api/ExportApi.md @@ -4,7 +4,7 @@ All URIs are relative to https://cloud.seatable.io, except if the operation defi | Method | HTTP request | Description | | ------------- | ------------- | ------------- | -| [**exportBase()**](ExportApi.md#exportBase) | **GET** /api/v2.1/admin/dtables/{base_uuid}/synchronous-export/export-dtable/ | Export base | +| [**exportBase()**](ExportApi.md#exportBase) | **GET** /api/v2.1/admin/dtables/{base_uuid}/synchronous-export/export-dtable/ | Export Base | ## `exportBase()` @@ -13,7 +13,7 @@ All URIs are relative to https://cloud.seatable.io, except if the operation defi exportBase($base_uuid, $ignore_asset) ``` -Export base +Export Base Use this request to export a base as System Admin. diff --git a/docs/SysAdmin/Api/FormsApi.md b/docs/SysAdmin/Api/FormsApi.md index 5a88676b..df7b4e1f 100644 --- a/docs/SysAdmin/Api/FormsApi.md +++ b/docs/SysAdmin/Api/FormsApi.md @@ -32,7 +32,7 @@ $apiInstance = new SeaTable\Client\SysAdmin\FormsApi( new GuzzleHttp\Client(), $config ); -$collection_table_token = 12345678-d378-4c12-8d7a-6da0fb48ee83; // string +$collection_table_token = 12345678-d378-4c12-8d7a-6da0fb48ee83; // string | The token of the collection table. try { $result = $apiInstance->deleteDataCollectionForms($collection_table_token); @@ -46,7 +46,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **collection_table_token** | **string**| | | +| **collection_table_token** | **string**| The token of the collection table. | | ### Return type @@ -81,7 +81,7 @@ $apiInstance = new SeaTable\Client\SysAdmin\FormsApi( new GuzzleHttp\Client(), $config ); -$form_token = 12345678-d378-4c12-8d7a-6da0fb48ee83; // string +$form_token = 12345678-d378-4c12-8d7a-6da0fb48ee83; // string | The token of the form. try { $result = $apiInstance->deleteForm($form_token); @@ -95,7 +95,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **form_token** | **string**| | | +| **form_token** | **string**| The token of the form. | | ### Return type diff --git a/docs/SysAdmin/Api/GroupsApi.md b/docs/SysAdmin/Api/GroupsApi.md index 45e0294d..593713ba 100644 --- a/docs/SysAdmin/Api/GroupsApi.md +++ b/docs/SysAdmin/Api/GroupsApi.md @@ -18,6 +18,8 @@ createGroup($create_group_request): object Create Group +Create a new group with a specified name and owner. + ### Example ```php @@ -65,7 +67,7 @@ deleteGroup($group_id): object Delete Group -Delete a group with its ID. +Delete a group with its ID. > 🚧 Group must be empty > > A group can only be deleted if it contains no bases. Delete or move all bases out of the group first, otherwise the API returns `400` with `\"Cannot delete group with bases\"`. ### Example @@ -79,7 +81,7 @@ $apiInstance = new SeaTable\Client\SysAdmin\GroupsApi( new GuzzleHttp\Client(), $config ); -$group_id = 48; // int +$group_id = 48; // int | The ID of the group. try { $result = $apiInstance->deleteGroup($group_id); @@ -93,7 +95,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **group_id** | **int**| | | +| **group_id** | **int**| The ID of the group. | | ### Return type @@ -162,11 +164,13 @@ AccountTokenAuth ## `transferGroup()` ```php -transferGroup($group_id, $transfer_group_request): object +transferGroup($group_id, $transfer_group_request): \SeaTable\Client\SysAdmin\TransferGroup200Response ``` Transfer Group +Transfer the ownership of a group to a new owner. + ### Example ```php @@ -179,7 +183,7 @@ $apiInstance = new SeaTable\Client\SysAdmin\GroupsApi( new GuzzleHttp\Client(), $config ); -$group_id = 48; // int +$group_id = 48; // int | The ID of the group. $transfer_group_request = new \SeaTable\Client\SysAdmin\TransferGroupRequest(); // \SeaTable\Client\SysAdmin\TransferGroupRequest try { @@ -194,12 +198,12 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **group_id** | **int**| | | +| **group_id** | **int**| The ID of the group. | | | **transfer_group_request** | [**\SeaTable\Client\SysAdmin\TransferGroupRequest**](../Model/TransferGroupRequest.md)| | [optional] | ### Return type -**object** +[**\SeaTable\Client\SysAdmin\TransferGroup200Response**](../Model/TransferGroup200Response.md) ### Authorization diff --git a/docs/SysAdmin/Api/LogsApi.md b/docs/SysAdmin/Api/LogsApi.md index 1690a7ec..6cddce13 100644 --- a/docs/SysAdmin/Api/LogsApi.md +++ b/docs/SysAdmin/Api/LogsApi.md @@ -374,6 +374,8 @@ listRegistrationLogs(): object List Registration Logs +List all registration and invitation logs in the system. + ### Example ```php @@ -434,7 +436,7 @@ $apiInstance = new SeaTable\Client\SysAdmin\LogsApi( ); $page = 1; // int | The page number you want to start showing the entries. If no value is provided, 1 will be used. $per_page = 25; // int | The number of results that should be returned. If no value is provided, 25 results will be returned. -$has_handled = 'has_handled_example'; // string +$has_handled = 'has_handled_example'; // string | Filter by handling status. Use `true` for handled, `false` for unhandled, or `null` for all. try { $apiInstance->listVirusFiles($page, $per_page, $has_handled); @@ -449,7 +451,7 @@ try { | ------------- | ------------- | ------------- | ------------- | | **page** | **int**| The page number you want to start showing the entries. If no value is provided, 1 will be used. | [optional] | | **per_page** | **int**| The number of results that should be returned. If no value is provided, 25 results will be returned. | [optional] | -| **has_handled** | **string**| | [optional] | +| **has_handled** | **string**| Filter by handling status. Use `true` for handled, `false` for unhandled, or `null` for all. | [optional] | ### Return type @@ -465,7 +467,7 @@ AccountTokenAuth ## `updateAbuseReport()` ```php -updateAbuseReport($abuse_report_id, $update_abuse_report_request): object +updateAbuseReport($abuse_report_id, $update_abuse_report_request): \SeaTable\Client\SysAdmin\UpdateAbuseReport200Response ``` Update Abuse Report @@ -484,7 +486,7 @@ $apiInstance = new SeaTable\Client\SysAdmin\LogsApi( new GuzzleHttp\Client(), $config ); -$abuse_report_id = 1; // int +$abuse_report_id = 1; // int | The ID of the abuse report. $update_abuse_report_request = new \SeaTable\Client\SysAdmin\UpdateAbuseReportRequest(); // \SeaTable\Client\SysAdmin\UpdateAbuseReportRequest try { @@ -499,12 +501,12 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **abuse_report_id** | **int**| | | +| **abuse_report_id** | **int**| The ID of the abuse report. | | | **update_abuse_report_request** | [**\SeaTable\Client\SysAdmin\UpdateAbuseReportRequest**](../Model/UpdateAbuseReportRequest.md)| | [optional] | ### Return type -**object** +[**\SeaTable\Client\SysAdmin\UpdateAbuseReport200Response**](../Model/UpdateAbuseReport200Response.md) ### Authorization diff --git a/docs/SysAdmin/Api/NotificationsApi.md b/docs/SysAdmin/Api/NotificationsApi.md index 2af20bf2..ef3ad798 100644 --- a/docs/SysAdmin/Api/NotificationsApi.md +++ b/docs/SysAdmin/Api/NotificationsApi.md @@ -78,7 +78,7 @@ $apiInstance = new SeaTable\Client\SysAdmin\NotificationsApi( new GuzzleHttp\Client(), $config ); -$notification_rule_id = 2; // int +$notification_rule_id = 2; // int | The ID of the notification rule. try { $result = $apiInstance->deleteNotificationRule($notification_rule_id); @@ -92,7 +92,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **notification_rule_id** | **int**| | | +| **notification_rule_id** | **int**| The ID of the notification rule. | | ### Return type diff --git a/docs/SysAdmin/Api/PluginsApi.md b/docs/SysAdmin/Api/PluginsApi.md index 6b90371d..dbebd114 100644 --- a/docs/SysAdmin/Api/PluginsApi.md +++ b/docs/SysAdmin/Api/PluginsApi.md @@ -14,12 +14,12 @@ All URIs are relative to https://cloud.seatable.io, except if the operation defi ## `addPlugin()` ```php -addPlugin($plugin): object +addPlugin($plugin): \SeaTable\Client\SysAdmin\AddPlugin200Response ``` Add Plugin -Add a plugin with a .zip file. This file could be retrieved from the internet, for example, from the [SeaTable Plugins Market](https://cloud.seatable.io/dtable/view-external-links/custom/plugins/). +Add a plugin with a .zip file. This file could be retrieved from the internet, for example, from the [SeaTable Plugins Market](https://cloud.seatable.io/apps/custom/plugin-archive/). ### Example @@ -47,11 +47,11 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **plugin** | **\SplFileObject****\SplFileObject**| Path and file name to the plugin file. | [optional] | +| **plugin** | **\SplFileObject****\SplFileObject**| Path and file name to the plugin file. | | ### Return type -**object** +[**\SeaTable\Client\SysAdmin\AddPlugin200Response**](../Model/AddPlugin200Response.md) ### Authorization @@ -82,7 +82,7 @@ $apiInstance = new SeaTable\Client\SysAdmin\PluginsApi( new GuzzleHttp\Client(), $config ); -$plugin_id = 5; // int +$plugin_id = 5; // int | The ID of the plugin. try { $result = $apiInstance->deletePlugin($plugin_id); @@ -96,7 +96,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **plugin_id** | **int**| | | +| **plugin_id** | **int**| The ID of the plugin. | | ### Return type @@ -203,7 +203,7 @@ AccountTokenAuth ## `updatePlugin()` ```php -updatePlugin($plugin_id, $plugin): object +updatePlugin($plugin_id, $plugin): \SeaTable\Client\SysAdmin\AddPlugin200Response ``` Update Plugin @@ -222,7 +222,7 @@ $apiInstance = new SeaTable\Client\SysAdmin\PluginsApi( new GuzzleHttp\Client(), $config ); -$plugin_id = 5; // int +$plugin_id = 5; // int | The ID of the plugin. $plugin = '/path/to/file.txt'; // \SplFileObject | Path and file name to the plugin file. try { @@ -237,12 +237,12 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **plugin_id** | **int**| | | +| **plugin_id** | **int**| The ID of the plugin. | | | **plugin** | **\SplFileObject****\SplFileObject**| Path and file name to the plugin file. | [optional] | ### Return type -**object** +[**\SeaTable\Client\SysAdmin\AddPlugin200Response**](../Model/AddPlugin200Response.md) ### Authorization diff --git a/docs/SysAdmin/Api/SharingLinksApi.md b/docs/SysAdmin/Api/SharingLinksApi.md index 62e33fab..0f8e0b50 100644 --- a/docs/SysAdmin/Api/SharingLinksApi.md +++ b/docs/SysAdmin/Api/SharingLinksApi.md @@ -33,7 +33,7 @@ $apiInstance = new SeaTable\Client\SysAdmin\SharingLinksApi( new GuzzleHttp\Client(), $config ); -$external_link_token = fleischkaesebroetchen; // string +$external_link_token = fleischkaesebroetchen; // string | The token of the external link. try { $result = $apiInstance->deleteBaseExternalLink($external_link_token); @@ -47,7 +47,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **external_link_token** | **string**| | | +| **external_link_token** | **string**| The token of the external link. | | ### Return type @@ -82,7 +82,7 @@ $apiInstance = new SeaTable\Client\SysAdmin\SharingLinksApi( new GuzzleHttp\Client(), $config ); -$view_external_link_token = 1f0447eab4df4343ab6d; // string +$view_external_link_token = 1f0447eab4df4343ab6d; // string | The token of the view external link. try { $result = $apiInstance->deleteViewExternalLink($view_external_link_token); @@ -96,7 +96,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **view_external_link_token** | **string**| | | +| **view_external_link_token** | **string**| The token of the view external link. | | ### Return type @@ -131,7 +131,7 @@ $apiInstance = new SeaTable\Client\SysAdmin\SharingLinksApi( new GuzzleHttp\Client(), $config ); -$base_id = base_id; // string | The id of the base. This is not the base_uuid. +$base_id = 123; // string | The id of the base. This is not the base_uuid. try { $result = $apiInstance->listBaseExternalLinks($base_id); diff --git a/docs/SysAdmin/Api/StatisticsApi.md b/docs/SysAdmin/Api/StatisticsApi.md index d7b50738..db5c62da 100644 --- a/docs/SysAdmin/Api/StatisticsApi.md +++ b/docs/SysAdmin/Api/StatisticsApi.md @@ -7,6 +7,7 @@ All URIs are relative to https://cloud.seatable.io, except if the operation defi | [**getActiveUsersPerDay()**](StatisticsApi.md#getActiveUsersPerDay) | **GET** /api/v2.1/admin/statistics/active-users/ | Get Active Users (per Day) | | [**getAutomationRules()**](StatisticsApi.md#getAutomationRules) | **GET** /api/v2.1/admin/statistics/auto-rules/ | Get Automation Rules | | [**getExternalApps()**](StatisticsApi.md#getExternalApps) | **GET** /api/v2.1/admin/statistics/external-apps/ | Get External Apps | +| [**getOwnerOrTeamAIStatistics()**](StatisticsApi.md#getOwnerOrTeamAIStatistics) | **GET** /api/v2.1/admin/statistics/ai/ | Get AI Statistics by Owner/Team | | [**getScriptRunningCountByUser()**](StatisticsApi.md#getScriptRunningCountByUser) | **GET** /api/v2.1/admin/statistics/scripts-running/ | Get Script Running Count by User | | [**listActiveUsersByDay()**](StatisticsApi.md#listActiveUsersByDay) | **GET** /api/v2.1/admin/daily-active-users/ | List Active Users (one Day) | | [**listScriptTasks()**](StatisticsApi.md#listScriptTasks) | **GET** /api/v2.1/admin/scripts-tasks/ | List Scripts Tasks | @@ -169,6 +170,61 @@ AccountTokenAuth +## `getOwnerOrTeamAIStatistics()` + +```php +getOwnerOrTeamAIStatistics($group_by, $date, $page, $per_page): object +``` + +Get AI Statistics by Owner/Team + +Get AI usage statistics monthly by owner/team. + +### Example + +```php +setAccessToken('YOUR_TOKEN'); +$apiInstance = new SeaTable\Client\SysAdmin\StatisticsApi( + new GuzzleHttp\Client(), + $config +); +$group_by = owner; // string | Query by owner or organization +$date = 2025-01-01; // string | A date string in YYYY-MM-DD format +$page = 1; // int | The page number you want to start showing the entries. If no value is provided, 1 will be used. +$per_page = 25; // int | The number of results that should be returned. If no value is provided, 25 results will be returned. + +try { + $result = $apiInstance->getOwnerOrTeamAIStatistics($group_by, $date, $page, $per_page); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling StatisticsApi->getOwnerOrTeamAIStatistics: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **group_by** | **string**| Query by owner or organization | | +| **date** | **string**| A date string in YYYY-MM-DD format | | +| **page** | **int**| The page number you want to start showing the entries. If no value is provided, 1 will be used. | [optional] | +| **per_page** | **int**| The number of results that should be returned. If no value is provided, 25 results will be returned. | [optional] | + +### Return type + +**object** + +### Authorization + +AccountTokenAuth + + + + ## `getScriptRunningCountByUser()` ```php @@ -192,7 +248,7 @@ $apiInstance = new SeaTable\Client\SysAdmin\StatisticsApi( $config ); $is_user = false; // bool | Whether you'd like to list automation rules triggered by single users who are not in any teams (`true`) or by teams (`false`). The usage of `true` here is seldom meaningful for cloud.seatable.io as all the users in the SeaTable Cloud are team users. -$owner = 123abc456def789ghi123jkl456mno789@auth.local; // string | The ID of the user you are querying. Optional. If you don't define a user, all the users are queried. +$owner = 12abc456def789abc123def456abc789@auth.local; // string | The ID of the user you are querying. Optional. If you don't define a user, all the users are queried. $month = 202109; // string | For which month you'd like to list the statistics in the format of YYYYMM. Statistics of automation rules before 202109 are not correctly summarized. try { @@ -225,7 +281,7 @@ AccountTokenAuth ## `listActiveUsersByDay()` ```php -listActiveUsersByDay($date, $page, $per_page): object +listActiveUsersByDay($date, $page, $per_page): \SeaTable\Client\SysAdmin\ListActiveUsersByDay200Response ``` List Active Users (one Day) @@ -266,7 +322,7 @@ try { ### Return type -**object** +[**\SeaTable\Client\SysAdmin\ListActiveUsersByDay200Response**](../Model/ListActiveUsersByDay200Response.md) ### Authorization diff --git a/docs/SysAdmin/Api/SystemInfoCustomizingApi.md b/docs/SysAdmin/Api/SystemInfoCustomizingApi.md index 117172c0..be2263c7 100644 --- a/docs/SysAdmin/Api/SystemInfoCustomizingApi.md +++ b/docs/SysAdmin/Api/SystemInfoCustomizingApi.md @@ -4,7 +4,7 @@ All URIs are relative to https://cloud.seatable.io, except if the operation defi | Method | HTTP request | Description | | ------------- | ------------- | ------------- | -| [**getSystemInformation()**](SystemInfoCustomizingApi.md#getSystemInformation) | **GET** /api/v2.1/admin/sysinfo/ | Get system information | +| [**getSystemInformation()**](SystemInfoCustomizingApi.md#getSystemInformation) | **GET** /api/v2.1/admin/sysinfo/ | Get System Information | | [**updateFavicon()**](SystemInfoCustomizingApi.md#updateFavicon) | **POST** /api/v2.1/admin/favicon/ | Update Favicon | | [**updateGeneralSettings()**](SystemInfoCustomizingApi.md#updateGeneralSettings) | **PUT** /api/v2.1/admin/web-settings/ | Update General Settings | | [**updateLoginBackgroundImage()**](SystemInfoCustomizingApi.md#updateLoginBackgroundImage) | **POST** /api/v2.1/admin/login-background-image/ | Update Login Background Image | @@ -14,10 +14,10 @@ All URIs are relative to https://cloud.seatable.io, except if the operation defi ## `getSystemInformation()` ```php -getSystemInformation(): object +getSystemInformation(): \SeaTable\Client\SysAdmin\GetSystemInformation200Response ``` -Get system information +Get System Information Get the general system information with this request as system administrator. @@ -48,7 +48,7 @@ This endpoint does not need any parameter. ### Return type -**object** +[**\SeaTable\Client\SysAdmin\GetSystemInformation200Response**](../Model/GetSystemInformation200Response.md) ### Authorization @@ -94,7 +94,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **favicon** | **\SplFileObject****\SplFileObject**| The path and filename of the image file of your favicon. | [optional] | +| **favicon** | **\SplFileObject****\SplFileObject**| The path and filename of the image file of your favicon. | | | **with_notify** | **bool**| Leave this param as its default (`false`) to upload your favicon, and use this param as `true` to upload a favicon with a notification sign. | [optional] | ### Return type @@ -111,7 +111,7 @@ AccountTokenAuth ## `updateGeneralSettings()` ```php -updateGeneralSettings($update_general_settings_request): object +updateGeneralSettings($update_general_settings_request): \SeaTable\Client\SysAdmin\UpdateGeneralSettings200Response ``` Update General Settings @@ -148,7 +148,7 @@ try { ### Return type -**object** +[**\SeaTable\Client\SysAdmin\UpdateGeneralSettings200Response**](../Model/UpdateGeneralSettings200Response.md) ### Authorization @@ -193,7 +193,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **login_bg_image** | **\SplFileObject****\SplFileObject**| The path and filename of the background image. | [optional] | +| **login_bg_image** | **\SplFileObject****\SplFileObject**| The path and filename of the background image. | | ### Return type @@ -242,7 +242,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **logo** | **\SplFileObject****\SplFileObject**| The path and filename of the image file of your logo. | [optional] | +| **logo** | **\SplFileObject****\SplFileObject**| The path and filename of the image file of your logo. | | ### Return type diff --git a/docs/SysAdmin/Api/SystemNotificationsApi.md b/docs/SysAdmin/Api/SystemNotificationsApi.md index 08eaf58a..8c502006 100644 --- a/docs/SysAdmin/Api/SystemNotificationsApi.md +++ b/docs/SysAdmin/Api/SystemNotificationsApi.md @@ -80,7 +80,7 @@ $apiInstance = new SeaTable\Client\SysAdmin\SystemNotificationsApi( new GuzzleHttp\Client(), $config ); -$sys_notification_id = 1; // int +$sys_notification_id = 1; // int | The ID of the system notification. try { $result = $apiInstance->deleteNotification($sys_notification_id); @@ -94,7 +94,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **sys_notification_id** | **int**| | | +| **sys_notification_id** | **int**| The ID of the system notification. | | ### Return type diff --git a/docs/SysAdmin/Api/TeamsApi.md b/docs/SysAdmin/Api/TeamsApi.md index 08574742..a39e1390 100644 --- a/docs/SysAdmin/Api/TeamsApi.md +++ b/docs/SysAdmin/Api/TeamsApi.md @@ -22,7 +22,7 @@ All URIs are relative to https://cloud.seatable.io, except if the operation defi ## `addTeam()` ```php -addTeam($add_team_request): object +addTeam($add_team_request): \SeaTable\Client\SysAdmin\AddTeam200Response ``` Add Team @@ -59,7 +59,7 @@ try { ### Return type -**object** +[**\SeaTable\Client\SysAdmin\AddTeam200Response**](../Model/AddTeam200Response.md) ### Authorization @@ -71,7 +71,7 @@ AccountTokenAuth ## `addTeamUser()` ```php -addTeamUser($org_id, $email, $password, $name, $with_workspace): object +addTeamUser($org_id, $email, $password, $name, $with_workspace): \SeaTable\Client\SysAdmin\AddTeamUser200Response ``` Add Team User @@ -116,7 +116,7 @@ try { ### Return type -**object** +[**\SeaTable\Client\SysAdmin\AddTeamUser200Response**](../Model/AddTeamUser200Response.md) ### Authorization @@ -197,7 +197,7 @@ $apiInstance = new SeaTable\Client\SysAdmin\TeamsApi( $config ); $org_id = 1; // int | The id of your team/organization. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. -$group_id = 48; // int +$group_id = 48; // int | The ID of the group. try { $result = $apiInstance->deleteTeamGroup($org_id, $group_id); @@ -212,7 +212,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **org_id** | **int**| The id of your team/organization. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. | | -| **group_id** | **int**| | | +| **group_id** | **int**| The ID of the group. | | ### Return type @@ -248,7 +248,7 @@ $apiInstance = new SeaTable\Client\SysAdmin\TeamsApi( $config ); $org_id = 1; // int | The id of your team/organization. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. -$user_id = 23abc456def789ghi123jkl456mno789@auth.local; // string | The unique user id in the form ...@auth.local. This is not the email address of the user. +$user_id = 2abc456def789abc123def456abc789a@auth.local; // string | The unique user id in the form ...@auth.local. This is not the email address of the user. try { $result = $apiInstance->deleteTeamUser($org_id, $user_id); @@ -279,11 +279,13 @@ AccountTokenAuth ## `getOrganizationNames()` ```php -getOrganizationNames($org_ids) +getOrganizationNames($org_ids): object ``` Get Organization Names +Retrieve the names of one or more organizations by their IDs. + ### Example ```php @@ -296,10 +298,11 @@ $apiInstance = new SeaTable\Client\SysAdmin\TeamsApi( new GuzzleHttp\Client(), $config ); -$org_ids = 2; // string[] +$org_ids = 2; // string[] | Comma-separated list of organization IDs to look up. try { - $apiInstance->getOrganizationNames($org_ids); + $result = $apiInstance->getOrganizationNames($org_ids); + print_r($result); } catch (Exception $e) { echo 'Exception when calling TeamsApi->getOrganizationNames: ', $e->getMessage(), PHP_EOL; } @@ -309,11 +312,11 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **org_ids** | [**string[]**](../Model/string.md)| | [optional] | +| **org_ids** | [**string[]**](../Model/string.md)| Comma-separated list of organization IDs to look up. | [optional] | ### Return type -void (empty response body) +**object** ### Authorization @@ -529,7 +532,7 @@ AccountTokenAuth ## `searchTeam()` ```php -searchTeam($org_id): object +searchTeam($org_id): \SeaTable\Client\SysAdmin\SearchTeam200Response ``` Search Team @@ -566,7 +569,7 @@ try { ### Return type -**object** +[**\SeaTable\Client\SysAdmin\SearchTeam200Response**](../Model/SearchTeam200Response.md) ### Authorization @@ -578,7 +581,7 @@ AccountTokenAuth ## `updateTeam()` ```php -updateTeam($org_id, $update_team_request): object +updateTeam($org_id, $update_team_request): \SeaTable\Client\SysAdmin\UpdateTeam200Response ``` Update Team @@ -617,7 +620,7 @@ try { ### Return type -**object** +[**\SeaTable\Client\SysAdmin\UpdateTeam200Response**](../Model/UpdateTeam200Response.md) ### Authorization @@ -629,7 +632,7 @@ AccountTokenAuth ## `updateTeamUser()` ```php -updateTeamUser($org_id, $user_id, $update_team_user_request): object +updateTeamUser($org_id, $user_id, $update_team_user_request): \SeaTable\Client\SysAdmin\AddTeamUser200Response ``` Update Team User @@ -649,7 +652,7 @@ $apiInstance = new SeaTable\Client\SysAdmin\TeamsApi( $config ); $org_id = 1; // int | The id of your team/organization. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. -$user_id = 23abc456def789ghi123jkl456mno789@auth.local; // string | The unique user id in the form ...@auth.local. This is not the email address of the user. +$user_id = 2abc456def789abc123def456abc789a@auth.local; // string | The unique user id in the form ...@auth.local. This is not the email address of the user. $update_team_user_request = new \SeaTable\Client\SysAdmin\UpdateTeamUserRequest(); // \SeaTable\Client\SysAdmin\UpdateTeamUserRequest try { @@ -670,7 +673,7 @@ try { ### Return type -**object** +[**\SeaTable\Client\SysAdmin\AddTeamUser200Response**](../Model/AddTeamUser200Response.md) ### Authorization diff --git a/docs/SysAdmin/Api/UsersApi.md b/docs/SysAdmin/Api/UsersApi.md index 4ca980d6..dbccbc01 100644 --- a/docs/SysAdmin/Api/UsersApi.md +++ b/docs/SysAdmin/Api/UsersApi.md @@ -9,7 +9,7 @@ All URIs are relative to https://cloud.seatable.io, except if the operation defi | [**disableTwoFactor()**](UsersApi.md#disableTwoFactor) | **DELETE** /api2/two-factor-auth/{user_id}/ | Disable 2FA | | [**enforceTwoFactor()**](UsersApi.md#enforceTwoFactor) | **PUT** /api/v2.1/admin/users/{user_id}/two-factor-auth/ | Enforce 2FA | | [**getUser()**](UsersApi.md#getUser) | **GET** /api/v2.1/admin/users/{user_id}/ | Get User | -| [**importUsers()**](UsersApi.md#importUsers) | **POST** /api/v2.1/admin/import-users/ | Import users | +| [**importUsers()**](UsersApi.md#importUsers) | **POST** /api/v2.1/admin/import-users/ | Import Users | | [**listAdminUsers()**](UsersApi.md#listAdminUsers) | **GET** /api/v2.1/admin/admin-users/ | List Admin Users | | [**listBasesSharedToUser()**](UsersApi.md#listBasesSharedToUser) | **GET** /api/v2.1/admin/users/{user_id}/shared-dtables/ | List Bases Shared to User | | [**listUserStorageObjects()**](UsersApi.md#listUserStorageObjects) | **GET** /api/v2.1/admin/users/{user_id}/storage/ | List User's Storage Objects | @@ -24,7 +24,7 @@ All URIs are relative to https://cloud.seatable.io, except if the operation defi ## `addNewUser()` ```php -addNewUser($add_new_user_request): object +addNewUser($add_new_user_request): \SeaTable\Client\SysAdmin\AddNewUser200Response ``` Add New User @@ -61,7 +61,7 @@ try { ### Return type -**object** +[**\SeaTable\Client\SysAdmin\AddNewUser200Response**](../Model/AddNewUser200Response.md) ### Authorization @@ -92,7 +92,7 @@ $apiInstance = new SeaTable\Client\SysAdmin\UsersApi( new GuzzleHttp\Client(), $config ); -$user_id = 23abc456def789ghi123jkl456mno789@auth.local; // string | The unique user id in the form ...@auth.local. This is not the email address of the user. +$user_id = 2abc456def789abc123def456abc789a@auth.local; // string | The unique user id in the form ...@auth.local. This is not the email address of the user. try { $result = $apiInstance->deleteUser($user_id); @@ -141,7 +141,7 @@ $apiInstance = new SeaTable\Client\SysAdmin\UsersApi( new GuzzleHttp\Client(), $config ); -$user_id = 23abc456def789ghi123jkl456mno789@auth.local; // string | The unique user id in the form ...@auth.local. This is not the email address of the user. +$user_id = 2abc456def789abc123def456abc789a@auth.local; // string | The unique user id in the form ...@auth.local. This is not the email address of the user. try { $result = $apiInstance->disableTwoFactor($user_id); @@ -190,7 +190,7 @@ $apiInstance = new SeaTable\Client\SysAdmin\UsersApi( new GuzzleHttp\Client(), $config ); -$user_id = 23abc456def789ghi123jkl456mno789@auth.local; // string | The unique user id in the form ...@auth.local. This is not the email address of the user. +$user_id = 2abc456def789abc123def456abc789a@auth.local; // string | The unique user id in the form ...@auth.local. This is not the email address of the user. $enforce_two_factor_request = new \SeaTable\Client\SysAdmin\EnforceTwoFactorRequest(); // \SeaTable\Client\SysAdmin\EnforceTwoFactorRequest try { @@ -222,11 +222,13 @@ AccountTokenAuth ## `getUser()` ```php -getUser($user_id): object +getUser($user_id): \SeaTable\Client\SysAdmin\GetUser200Response ``` Get User +Get the details of a specific user by their user ID. + ### Example ```php @@ -239,7 +241,7 @@ $apiInstance = new SeaTable\Client\SysAdmin\UsersApi( new GuzzleHttp\Client(), $config ); -$user_id = 23abc456def789ghi123jkl456mno789@auth.local; // string | The unique user id in the form ...@auth.local. This is not the email address of the user. +$user_id = 2abc456def789abc123def456abc789a@auth.local; // string | The unique user id in the form ...@auth.local. This is not the email address of the user. try { $result = $apiInstance->getUser($user_id); @@ -257,7 +259,7 @@ try { ### Return type -**object** +[**\SeaTable\Client\SysAdmin\GetUser200Response**](../Model/GetUser200Response.md) ### Authorization @@ -272,7 +274,7 @@ AccountTokenAuth importUsers($file): object ``` -Import users +Import Users As system administrator, you can batch import users with an Excel file, which lists the users' - `email` as their contact email address, which is also used to login as their username; - `password` as their initial login password; - Optionally, also define their display name, role, and quota. An example user list Excel file looks like this: @@ -302,7 +304,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **file** | **\SplFileObject****\SplFileObject**| | [optional] | +| **file** | **\SplFileObject****\SplFileObject**| | | ### Return type @@ -383,7 +385,7 @@ $apiInstance = new SeaTable\Client\SysAdmin\UsersApi( new GuzzleHttp\Client(), $config ); -$user_id = 23abc456def789ghi123jkl456mno789@auth.local; // string | The unique user id in the form ...@auth.local. This is not the email address of the user. +$user_id = 2abc456def789abc123def456abc789a@auth.local; // string | The unique user id in the form ...@auth.local. This is not the email address of the user. $page = 1; // int | The page number you want to start showing the entries. If no value is provided, 1 will be used. $per_page = 25; // int | The number of results that should be returned. If no value is provided, 25 results will be returned. @@ -436,8 +438,8 @@ $apiInstance = new SeaTable\Client\SysAdmin\UsersApi( new GuzzleHttp\Client(), $config ); -$user_id = 23abc456def789ghi123jkl456mno789@auth.local; // string | The unique user id in the form ...@auth.local. This is not the email address of the user. -$parent_dir = /asset/; // string +$user_id = 2abc456def789abc123def456abc789a@auth.local; // string | The unique user id in the form ...@auth.local. This is not the email address of the user. +$parent_dir = /asset/; // string | The parent directory path. try { $result = $apiInstance->listUserStorageObjects($user_id, $parent_dir); @@ -452,7 +454,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **user_id** | **string**| The unique user id in the form ...@auth.local. This is not the email address of the user. | | -| **parent_dir** | **string**| | [optional] | +| **parent_dir** | **string**| The parent directory path. | [optional] | ### Return type @@ -473,6 +475,8 @@ listUsers($page, $per_page): object List Users +List all users in the system with pagination support. + ### Example ```php @@ -536,7 +540,7 @@ $apiInstance = new SeaTable\Client\SysAdmin\UsersApi( new GuzzleHttp\Client(), $config ); -$user_id = 23abc456def789ghi123jkl456mno789@auth.local; // string | The unique user id in the form ...@auth.local. This is not the email address of the user. +$user_id = 2abc456def789abc123def456abc789a@auth.local; // string | The unique user id in the form ...@auth.local. This is not the email address of the user. try { $result = $apiInstance->resetUserPassword($user_id); @@ -620,7 +624,7 @@ searchUserByOrgId($query, $org_id, $limit) Search User by Org-ID -Hier muss noch eine Beschreibung ergänzt werden +Search for a user by their organization ID. ### Example @@ -634,8 +638,8 @@ $apiInstance = new SeaTable\Client\SysAdmin\UsersApi( new GuzzleHttp\Client(), $config ); -$query = 'query_example'; // string -$org_id = 1; // int +$query = 'query_example'; // string | Search query string. +$org_id = 1; // int | Filter by team ID. $limit = 10; // int | Limit of search User try { @@ -649,8 +653,8 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **query** | **string**| | [optional] | -| **org_id** | **int**| | [optional] | +| **query** | **string**| Search query string. | [optional] | +| **org_id** | **int**| Filter by team ID. | [optional] | | **limit** | **int**| Limit of search User | [optional] | ### Return type @@ -716,7 +720,7 @@ AccountTokenAuth ## `updateUser()` ```php -updateUser($user_id, $update_user_request): object +updateUser($user_id, $update_user_request): \SeaTable\Client\SysAdmin\UpdateUser200Response ``` Update User @@ -735,7 +739,7 @@ $apiInstance = new SeaTable\Client\SysAdmin\UsersApi( new GuzzleHttp\Client(), $config ); -$user_id = 23abc456def789ghi123jkl456mno789@auth.local; // string | The unique user id in the form ...@auth.local. This is not the email address of the user. +$user_id = 2abc456def789abc123def456abc789a@auth.local; // string | The unique user id in the form ...@auth.local. This is not the email address of the user. $update_user_request = new \SeaTable\Client\SysAdmin\UpdateUserRequest(); // \SeaTable\Client\SysAdmin\UpdateUserRequest try { @@ -755,7 +759,7 @@ try { ### Return type -**object** +[**\SeaTable\Client\SysAdmin\UpdateUser200Response**](../Model/UpdateUser200Response.md) ### Authorization diff --git a/docs/SysAdmin/Model/AddDepartment200Response.md b/docs/SysAdmin/Model/AddDepartment200Response.md new file mode 100644 index 00000000..d6dd0bbe --- /dev/null +++ b/docs/SysAdmin/Model/AddDepartment200Response.md @@ -0,0 +1,13 @@ +# # AddDepartment200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**name** | **string** | | [optional] +**owner** | **string** | | [optional] +**created_at** | **string** | | [optional] +**parent_group_id** | **int** | | [optional] +**quota** | **int** | | [optional] + diff --git a/docs/SysAdmin/Model/AddNewUser200Response.md b/docs/SysAdmin/Model/AddNewUser200Response.md new file mode 100644 index 00000000..09a91e09 --- /dev/null +++ b/docs/SysAdmin/Model/AddNewUser200Response.md @@ -0,0 +1,17 @@ +# # AddNewUser200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **string** | | [optional] +**name** | **string** | | [optional] +**contact_email** | **string** | | [optional] +**login_id** | **string** | | [optional] +**id_in_org** | **string** | | [optional] +**is_staff** | **bool** | | [optional] +**is_active** | **bool** | | [optional] +**create_time** | **string** | | [optional] +**role** | **string** | | [optional] +**add_user_tip** | **string** | | [optional] + diff --git a/docs/SysAdmin/Model/AddNewUserRequest.md b/docs/SysAdmin/Model/AddNewUserRequest.md index cf651dd9..0688696b 100644 --- a/docs/SysAdmin/Model/AddNewUserRequest.md +++ b/docs/SysAdmin/Model/AddNewUserRequest.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**email** | **string** | Login email of the user. | [optional] -**password** | **string** | Login password of the user. | [optional] +**email** | **string** | Login email of the user. | +**password** | **string** | Login password of the user. | **name** | **string** | Full name of the user. | [optional] **is_staff** | **bool** | `true` or `false` if the user will be an (system) admin. `false` by default. | [optional] [default to false] **is_active** | **bool** | `true` or `false` if the user could log in. `true` by default. | [optional] [default to true] diff --git a/docs/SysAdmin/Model/AddNotificationToUserRequest.md b/docs/SysAdmin/Model/AddNotificationToUserRequest.md index 3a1a8a13..1d242e82 100644 --- a/docs/SysAdmin/Model/AddNotificationToUserRequest.md +++ b/docs/SysAdmin/Model/AddNotificationToUserRequest.md @@ -4,6 +4,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**msg** | **string** | | [optional] -**username** | **string** | | [optional] +**msg** | **string** | | +**username** | **string** | | diff --git a/docs/SysAdmin/Model/AddPlugin200Response.md b/docs/SysAdmin/Model/AddPlugin200Response.md new file mode 100644 index 00000000..28a4ca85 --- /dev/null +++ b/docs/SysAdmin/Model/AddPlugin200Response.md @@ -0,0 +1,12 @@ +# # AddPlugin200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**plugin_name** | **string** | | [optional] +**info** | **object** | | [optional] +**added_by** | **string** | | [optional] +**added_time** | **string** | | [optional] + diff --git a/docs/SysAdmin/Model/AddTeam200Response.md b/docs/SysAdmin/Model/AddTeam200Response.md new file mode 100644 index 00000000..81d1e4c6 --- /dev/null +++ b/docs/SysAdmin/Model/AddTeam200Response.md @@ -0,0 +1,21 @@ +# # AddTeam200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**org_id** | **int** | | [optional] +**org_name** | **string** | | [optional] +**ctime** | **string** | | [optional] +**org_url_prefix** | **string** | | [optional] +**role** | **string** | | [optional] +**creator_email** | **string** | | [optional] +**creator_name** | **string** | | [optional] +**creator_contact_email** | **string** | | [optional] +**quota** | **int** | | [optional] +**storage_usage** | **int** | | [optional] +**storage_quota** | **int** | | [optional] +**max_user_number** | **int** | | [optional] +**rows_count** | **int** | | [optional] +**row_limit** | **int** | | [optional] + diff --git a/docs/SysAdmin/Model/AddTeamUser200Response.md b/docs/SysAdmin/Model/AddTeamUser200Response.md new file mode 100644 index 00000000..3f11af71 --- /dev/null +++ b/docs/SysAdmin/Model/AddTeamUser200Response.md @@ -0,0 +1,18 @@ +# # AddTeamUser200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**org_id** | **int** | | [optional] +**workspace_id** | **int** | | [optional] +**email** | **string** | | [optional] +**name** | **string** | | [optional] +**contact_email** | **string** | | [optional] +**is_org_admin** | **bool** | | [optional] +**quota_total** | **int** | | [optional] +**quota_usage** | **int** | | [optional] +**create_time** | **string** | | [optional] +**last_login** | **string** | | [optional] +**active** | **bool** | | [optional] + diff --git a/docs/SysAdmin/Model/CreateGroupRequest.md b/docs/SysAdmin/Model/CreateGroupRequest.md index 5bc4394a..36b9cbbf 100644 --- a/docs/SysAdmin/Model/CreateGroupRequest.md +++ b/docs/SysAdmin/Model/CreateGroupRequest.md @@ -4,6 +4,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**group_name** | **string** | The name of the new department. | [optional] -**group_owner** | **string** | | [optional] +**group_name** | **string** | The name of the new department. | +**group_owner** | **string** | | diff --git a/docs/SysAdmin/Model/EnforceTwoFactorRequest.md b/docs/SysAdmin/Model/EnforceTwoFactorRequest.md index 44c0c5e3..6d460eb1 100644 --- a/docs/SysAdmin/Model/EnforceTwoFactorRequest.md +++ b/docs/SysAdmin/Model/EnforceTwoFactorRequest.md @@ -4,5 +4,5 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**force_2fa** | **bool** | Enforce Two Factor for all accounts | [optional] +**force_2fa** | **bool** | Enforce Two Factor for all accounts | diff --git a/docs/SysAdmin/Model/GetSystemInformation200Response.md b/docs/SysAdmin/Model/GetSystemInformation200Response.md new file mode 100644 index 00000000..3092edbc --- /dev/null +++ b/docs/SysAdmin/Model/GetSystemInformation200Response.md @@ -0,0 +1,25 @@ +# # GetSystemInformation200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**version** | **string** | | [optional] +**users_count** | **int** | | [optional] +**active_users_count** | **int** | | [optional] +**groups_count** | **int** | | [optional] +**org_count** | **int** | | [optional] +**dtables_count** | **int** | | [optional] +**multi_tenancy_enabled** | **bool** | | [optional] +**is_pro** | **bool** | | [optional] +**with_license** | **bool** | | [optional] +**license_expiration** | **string** | | [optional] +**license_mode** | **string** | | [optional] +**license_maxusers** | **int** | | [optional] +**license_to** | **string** | | [optional] +**dtable_server_info** | **object[]** | | [optional] +**dtable_server_info_in_etcd** | **object[]** | | [optional] +**archived_base_count** | **int** | | [optional] +**archived_row_count** | **int** | | [optional] +**archived_base_storage** | **int** | | [optional] + diff --git a/docs/SysAdmin/Model/GetUser200Response.md b/docs/SysAdmin/Model/GetUser200Response.md new file mode 100644 index 00000000..5c488443 --- /dev/null +++ b/docs/SysAdmin/Model/GetUser200Response.md @@ -0,0 +1,23 @@ +# # GetUser200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**org_id** | **int** | | [optional] +**org_name** | **string** | | [optional] +**email** | **string** | | [optional] +**name** | **string** | | [optional] +**contact_email** | **string** | | [optional] +**unit** | **string** | | [optional] +**login_id** | **string** | | [optional] +**id_in_org** | **string** | | [optional] +**is_staff** | **bool** | | [optional] +**is_active** | **bool** | | [optional] +**phone** | **string** | | [optional] +**create_time** | **string** | | [optional] +**role** | **string** | | [optional] +**avatar_url** | **string** | | [optional] +**has_default_device** | **bool** | | [optional] +**is_force_2fa** | **bool** | | [optional] + diff --git a/docs/SysAdmin/Model/ListActiveUsersByDay200Response.md b/docs/SysAdmin/Model/ListActiveUsersByDay200Response.md new file mode 100644 index 00000000..e84ed198 --- /dev/null +++ b/docs/SysAdmin/Model/ListActiveUsersByDay200Response.md @@ -0,0 +1,10 @@ +# # ListActiveUsersByDay200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**active_user_list** | **object[]** | | [optional] +**page** | **int** | | [optional] +**total_count** | **int** | | [optional] + diff --git a/docs/SysAdmin/Model/ListDepartments200Response.md b/docs/SysAdmin/Model/ListDepartments200Response.md new file mode 100644 index 00000000..985e5474 --- /dev/null +++ b/docs/SysAdmin/Model/ListDepartments200Response.md @@ -0,0 +1,16 @@ +# # ListDepartments200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**name** | **string** | | [optional] +**owner** | **string** | | [optional] +**created_at** | **string** | | [optional] +**parent_group_id** | **int** | | [optional] +**quota** | **int** | | [optional] +**groups** | **object[]** | | [optional] +**members** | **object[]** | | [optional] +**ancestor_groups** | **object[]** | | [optional] + diff --git a/docs/SysAdmin/Model/SearchTeam200Response.md b/docs/SysAdmin/Model/SearchTeam200Response.md new file mode 100644 index 00000000..ba5ce8db --- /dev/null +++ b/docs/SysAdmin/Model/SearchTeam200Response.md @@ -0,0 +1,24 @@ +# # SearchTeam200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**org_id** | **int** | | [optional] +**org_name** | **string** | | [optional] +**ctime** | **string** | | [optional] +**org_url_prefix** | **string** | | [optional] +**role** | **string** | | [optional] +**creator_email** | **string** | | [optional] +**creator_name** | **string** | | [optional] +**creator_contact_email** | **string** | | [optional] +**quota** | **int** | | [optional] +**storage_usage** | **int** | | [optional] +**storage_quota** | **int** | | [optional] +**max_user_number** | **int** | | [optional] +**rows_count** | **int** | | [optional] +**row_limit** | **int** | | [optional] +**users_count** | **int** | | [optional] +**active_users_count** | **int** | | [optional] +**groups_count** | **int** | | [optional] + diff --git a/docs/SysAdmin/Model/TransferGroup200Response.md b/docs/SysAdmin/Model/TransferGroup200Response.md new file mode 100644 index 00000000..f998bc41 --- /dev/null +++ b/docs/SysAdmin/Model/TransferGroup200Response.md @@ -0,0 +1,14 @@ +# # TransferGroup200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**parent_group_id** | **int** | | [optional] +**name** | **string** | | [optional] +**owner** | **string** | | [optional] +**created_at** | **string** | | [optional] +**avatar_url** | **string** | | [optional] +**admins** | **string[]** | | [optional] + diff --git a/docs/SysAdmin/Model/TransferGroupRequest.md b/docs/SysAdmin/Model/TransferGroupRequest.md index 70c2252c..a663086b 100644 --- a/docs/SysAdmin/Model/TransferGroupRequest.md +++ b/docs/SysAdmin/Model/TransferGroupRequest.md @@ -4,5 +4,5 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**new_owner** | **string** | | [optional] +**new_owner** | **string** | | diff --git a/docs/SysAdmin/Model/UpdateAbuseReport200Response.md b/docs/SysAdmin/Model/UpdateAbuseReport200Response.md new file mode 100644 index 00000000..341854ac --- /dev/null +++ b/docs/SysAdmin/Model/UpdateAbuseReport200Response.md @@ -0,0 +1,16 @@ +# # UpdateAbuseReport200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**dtable_uuid** | **string** | | [optional] +**reporter** | **string** | | [optional] +**external_link_token** | **string** | | [optional] +**create_time** | **string** | | [optional] +**abuse_type** | **string** | | [optional] +**description** | **string** | | [optional] +**handled** | **bool** | | [optional] +**dtable_name** | **string** | | [optional] + diff --git a/docs/SysAdmin/Model/UpdateAbuseReportRequest.md b/docs/SysAdmin/Model/UpdateAbuseReportRequest.md index aef2d54e..fe51d19f 100644 --- a/docs/SysAdmin/Model/UpdateAbuseReportRequest.md +++ b/docs/SysAdmin/Model/UpdateAbuseReportRequest.md @@ -4,5 +4,5 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**handled** | **bool** | Required. Use `true` or `false` to mark the status of the report. | [optional] +**handled** | **bool** | Required. Use `true` or `false` to mark the status of the report. | diff --git a/docs/SysAdmin/Model/UpdateGeneralSettings200Response.md b/docs/SysAdmin/Model/UpdateGeneralSettings200Response.md new file mode 100644 index 00000000..3ee0ae49 --- /dev/null +++ b/docs/SysAdmin/Model/UpdateGeneralSettings200Response.md @@ -0,0 +1,22 @@ +# # UpdateGeneralSettings200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enable_signup** | **int** | | [optional] +**activate_after_registration** | **int** | | [optional] +**registration_send_mail** | **int** | | [optional] +**login_remember_days** | **int** | | [optional] +**user_strong_password_required** | **int** | | [optional] +**user_password_min_length** | **int** | | [optional] +**user_password_strength_level** | **int** | | [optional] +**force_password_change** | **int** | | [optional] +**login_attempt_limit** | **int** | | [optional] +**freeze_user_on_login_failed** | **int** | | [optional] +**enable_two_factor_auth** | **int** | | [optional] +**enable_branding_css** | **int** | | [optional] +**site_name** | **string** | | [optional] +**site_title** | **string** | | [optional] +**custom_css** | **string** | | [optional] + diff --git a/docs/SysAdmin/Model/UpdateTeam200Response.md b/docs/SysAdmin/Model/UpdateTeam200Response.md new file mode 100644 index 00000000..8b47d901 --- /dev/null +++ b/docs/SysAdmin/Model/UpdateTeam200Response.md @@ -0,0 +1,22 @@ +# # UpdateTeam200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**org_id** | **int** | | [optional] +**org_name** | **string** | | [optional] +**ctime** | **string** | | [optional] +**org_url_prefix** | **string** | | [optional] +**role** | **string** | | [optional] +**creator_email** | **string** | | [optional] +**creator_name** | **string** | | [optional] +**creator_contact_email** | **string** | | [optional] +**quota** | **int** | | [optional] +**storage_usage** | **int** | | [optional] +**storage_quota** | **int** | | [optional] +**max_user_number** | **int** | | [optional] +**rows_count** | **int** | | [optional] +**row_limit** | **int** | | [optional] +**monthly_automation_limit_per_user** | **int** | | [optional] + diff --git a/docs/SysAdmin/Model/UpdateTeamRequest.md b/docs/SysAdmin/Model/UpdateTeamRequest.md index aa7b0e5b..4572c11e 100644 --- a/docs/SysAdmin/Model/UpdateTeamRequest.md +++ b/docs/SysAdmin/Model/UpdateTeamRequest.md @@ -9,4 +9,5 @@ Name | Type | Description | Notes **row_limit** | **int** | User's total row limit in number. For example 10000. | [optional] **max_user_number** | **string** | The maximum user number. | [optional] **asset_quota_mb** | **string** | The asset quota in MB. | [optional] +**monthly_automation_limit_per_user** | **int** | Monthly limit on the number of automation rules per user. | [optional] diff --git a/docs/SysAdmin/Model/UpdateUser200Response.md b/docs/SysAdmin/Model/UpdateUser200Response.md new file mode 100644 index 00000000..5412a5db --- /dev/null +++ b/docs/SysAdmin/Model/UpdateUser200Response.md @@ -0,0 +1,22 @@ +# # UpdateUser200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **string** | | [optional] +**name** | **string** | | [optional] +**contact_email** | **string** | | [optional] +**unit** | **string** | | [optional] +**login_id** | **string** | | [optional] +**id_in_org** | **string** | | [optional] +**is_staff** | **bool** | | [optional] +**is_active** | **bool** | | [optional] +**phone** | **string** | | [optional] +**org_id** | **int** | | [optional] +**org_name** | **string** | | [optional] +**create_time** | **string** | | [optional] +**role** | **string** | | [optional] +**update_status_tip** | **string** | | [optional] +**monthly_automation_limit_per_user** | **int** | | [optional] + diff --git a/docs/SysAdmin/Model/UpdateUserRequest.md b/docs/SysAdmin/Model/UpdateUserRequest.md index 2b3fbcd2..af8ad401 100644 --- a/docs/SysAdmin/Model/UpdateUserRequest.md +++ b/docs/SysAdmin/Model/UpdateUserRequest.md @@ -17,4 +17,5 @@ Name | Type | Description | Notes **row_limit** | **int** | User's total row limit in number. For example 10000. | [optional] **quota_total** | **string** | Update their total quota in MB. | [optional] **asset_quota_mb** | **string** | The asset quota in MB. | [optional] +**monthly_automation_limit_per_user** | **int** | Monthly limit on the number of automation rules per user. | [optional] diff --git a/docs/TeamAdmin/Api/ActivitiesLogsApi.md b/docs/TeamAdmin/Api/ActivitiesLogsApi.md index b97f76cf..e3132225 100644 --- a/docs/TeamAdmin/Api/ActivitiesLogsApi.md +++ b/docs/TeamAdmin/Api/ActivitiesLogsApi.md @@ -4,13 +4,74 @@ All URIs are relative to https://cloud.seatable.io, except if the operation defi | Method | HTTP request | Description | | ------------- | ------------- | ------------- | +| [**listAutomationLogs()**](ActivitiesLogsApi.md#listAutomationLogs) | **GET** /api/v2.1/org/{org_id}/admin/automation-logs/ | List Automation Logs | | [**listFileAccessLogs()**](ActivitiesLogsApi.md#listFileAccessLogs) | **GET** /api/v2.1/org/{org_id}/admin/file-access-logs/ | List File Access Logs | | [**listGroupMemberAuditLogs()**](ActivitiesLogsApi.md#listGroupMemberAuditLogs) | **GET** /api/v2.1/org/{org_id}/admin/group-member-audit/ | List Group Member Audit Logs | +| [**listPythonRuns()**](ActivitiesLogsApi.md#listPythonRuns) | **GET** /api/v2.1/org/{org_id}/admin/python-runs/ | List Python Runs | | [**listTeamLogins()**](ActivitiesLogsApi.md#listTeamLogins) | **GET** /api/v2.1/org/{org_id}/admin/login-logs/ | List Team Logins | | [**listTeamOperationLog()**](ActivitiesLogsApi.md#listTeamOperationLog) | **GET** /api/v2.1/org/{org_id}/admin/admin-logs/ | List Team Operations | | [**listUserLogins()**](ActivitiesLogsApi.md#listUserLogins) | **GET** /api/v2.1/org/{org_id}/admin/login-logs/{user_id}/ | List User Logins | +## `listAutomationLogs()` + +```php +listAutomationLogs($org_id, $dtable_uuid, $start, $end, $page, $per_page): object +``` + +List Automation Logs + +Returns a list of automation logs inside a specific team. + +### Example + +```php +setAccessToken('YOUR_TOKEN'); +$apiInstance = new SeaTable\Client\TeamAdmin\ActivitiesLogsApi( + new GuzzleHttp\Client(), + $config +); +$org_id = 1; // int | The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. +$dtable_uuid = 5c264e76-0e5a-448a-9f34-580b551364ca; // string | The unique identifier of a base. +$start = 2025-11-01T06:00:00+01:00; // \DateTime | Start date in ISO format. +$end = 2025-11-30T18:00:00+01:00; // \DateTime | End date in ISO format. +$page = 1; // int | The page number you want to start showing the entries. If no value is provided, 1 will be used. +$per_page = 25; // int | The number of results that should be returned. If no value is provided, 25 results will be returned. + +try { + $result = $apiInstance->listAutomationLogs($org_id, $dtable_uuid, $start, $end, $page, $per_page); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling ActivitiesLogsApi->listAutomationLogs: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **org_id** | **int**| The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. | | +| **dtable_uuid** | **string**| The unique identifier of a base. | [optional] | +| **start** | **\DateTime**| Start date in ISO format. | [optional] | +| **end** | **\DateTime**| End date in ISO format. | [optional] | +| **page** | **int**| The page number you want to start showing the entries. If no value is provided, 1 will be used. | [optional] | +| **per_page** | **int**| The number of results that should be returned. If no value is provided, 25 results will be returned. | [optional] | + +### Return type + +**object** + +### Authorization + +AccountTokenAuth + + + + ## `listFileAccessLogs()` ```php @@ -117,10 +178,69 @@ AccountTokenAuth +## `listPythonRuns()` + +```php +listPythonRuns($org_id, $dtable_uuid, $start, $end, $page, $per_page): object +``` + +List Python Runs + +Returns a list of python runs inside a specific team. + +### Example + +```php +setAccessToken('YOUR_TOKEN'); +$apiInstance = new SeaTable\Client\TeamAdmin\ActivitiesLogsApi( + new GuzzleHttp\Client(), + $config +); +$org_id = 1; // int | The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. +$dtable_uuid = 5c264e76-0e5a-448a-9f34-580b551364ca; // string | The unique identifier of a base. +$start = 2025-11-01T06:00:00+01:00; // \DateTime | Start date in ISO format. +$end = 2025-11-30T18:00:00+01:00; // \DateTime | End date in ISO format. +$page = 1; // int | The page number you want to start showing the entries. If no value is provided, 1 will be used. +$per_page = 25; // int | The number of results that should be returned. If no value is provided, 25 results will be returned. + +try { + $result = $apiInstance->listPythonRuns($org_id, $dtable_uuid, $start, $end, $page, $per_page); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling ActivitiesLogsApi->listPythonRuns: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **org_id** | **int**| The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. | | +| **dtable_uuid** | **string**| The unique identifier of a base. | [optional] | +| **start** | **\DateTime**| Start date in ISO format. | [optional] | +| **end** | **\DateTime**| End date in ISO format. | [optional] | +| **page** | **int**| The page number you want to start showing the entries. If no value is provided, 1 will be used. | [optional] | +| **per_page** | **int**| The number of results that should be returned. If no value is provided, 25 results will be returned. | [optional] | + +### Return type + +**object** + +### Authorization + +AccountTokenAuth + + + + ## `listTeamLogins()` ```php -listTeamLogins($org_id, $page, $per_page): object +listTeamLogins($org_id, $page, $per_page, $status, $start, $end): object ``` List Team Logins @@ -142,9 +262,12 @@ $apiInstance = new SeaTable\Client\TeamAdmin\ActivitiesLogsApi( $org_id = 1; // int | The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. $page = 1; // int | The page number you want to start showing the entries. If no value is provided, 1 will be used. $per_page = 25; // int | The number of results that should be returned. If no value is provided, 25 results will be returned. +$status = success; // string | Set this to `success` to only return successful logins. By default, all logins are returned. +$start = 2025-11-01T06:00:00+01:00; // \DateTime | Start date in ISO format. +$end = 2025-11-30T18:00:00+01:00; // \DateTime | End date in ISO format. try { - $result = $apiInstance->listTeamLogins($org_id, $page, $per_page); + $result = $apiInstance->listTeamLogins($org_id, $page, $per_page, $status, $start, $end); print_r($result); } catch (Exception $e) { echo 'Exception when calling ActivitiesLogsApi->listTeamLogins: ', $e->getMessage(), PHP_EOL; @@ -158,6 +281,9 @@ try { | **org_id** | **int**| The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. | | | **page** | **int**| The page number you want to start showing the entries. If no value is provided, 1 will be used. | [optional] | | **per_page** | **int**| The number of results that should be returned. If no value is provided, 25 results will be returned. | [optional] | +| **status** | **string**| Set this to `success` to only return successful logins. By default, all logins are returned. | [optional] | +| **start** | **\DateTime**| Start date in ISO format. | [optional] | +| **end** | **\DateTime**| End date in ISO format. | [optional] | ### Return type @@ -173,7 +299,7 @@ AccountTokenAuth ## `listTeamOperationLog()` ```php -listTeamOperationLog($org_id, $page, $per_page): object +listTeamOperationLog($org_id, $page, $per_page, $operation_group, $start, $end): object ``` List Team Operations @@ -195,9 +321,12 @@ $apiInstance = new SeaTable\Client\TeamAdmin\ActivitiesLogsApi( $org_id = 1; // int | The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. $page = 1; // int | The page number you want to start showing the entries. If no value is provided, 1 will be used. $per_page = 25; // int | The number of results that should be returned. If no value is provided, 25 results will be returned. +$operation_group = user; // string | Filter by a specific operation group. By default, all operations are returned. +$start = 2025-11-01T06:00:00+01:00; // \DateTime | Start date in ISO format. +$end = 2025-11-30T18:00:00+01:00; // \DateTime | End date in ISO format. try { - $result = $apiInstance->listTeamOperationLog($org_id, $page, $per_page); + $result = $apiInstance->listTeamOperationLog($org_id, $page, $per_page, $operation_group, $start, $end); print_r($result); } catch (Exception $e) { echo 'Exception when calling ActivitiesLogsApi->listTeamOperationLog: ', $e->getMessage(), PHP_EOL; @@ -211,6 +340,9 @@ try { | **org_id** | **int**| The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. | | | **page** | **int**| The page number you want to start showing the entries. If no value is provided, 1 will be used. | [optional] | | **per_page** | **int**| The number of results that should be returned. If no value is provided, 25 results will be returned. | [optional] | +| **operation_group** | **string**| Filter by a specific operation group. By default, all operations are returned. | [optional] | +| **start** | **\DateTime**| Start date in ISO format. | [optional] | +| **end** | **\DateTime**| End date in ISO format. | [optional] | ### Return type diff --git a/docs/TeamAdmin/Api/BasesApi.md b/docs/TeamAdmin/Api/BasesApi.md index f51f1afb..93b30d3e 100644 --- a/docs/TeamAdmin/Api/BasesApi.md +++ b/docs/TeamAdmin/Api/BasesApi.md @@ -5,11 +5,15 @@ All URIs are relative to https://cloud.seatable.io, except if the operation defi | Method | HTTP request | Description | | ------------- | ------------- | ------------- | | [**clearTeamTrashBin()**](BasesApi.md#clearTeamTrashBin) | **DELETE** /api/v2.1/org/{org_id}/admin/trash-dtables/ | Clear Team Trash Bin | +| [**deleteApiToken()**](BasesApi.md#deleteApiToken) | **DELETE** /api/v2.1/org/{org_id}/admin/dtables/{base_uuid}/api-tokens/{app_name}/ | Delete API-Token | | [**deleteBase()**](BasesApi.md#deleteBase) | **DELETE** /api/v2.1/org/{org_id}/admin/dtables/{base_uuid}/ | Delete Base | | [**getBase()**](BasesApi.md#getBase) | **GET** /api/v2.1/org/{org_id}/admin/dtables/{base_uuid}/ | Get Base | +| [**listApiTokens()**](BasesApi.md#listApiTokens) | **GET** /api/v2.1/org/{org_id}/admin/dtables/{base_uuid}/api-tokens/ | List API-Tokens | +| [**listApiTokensOfAllBases()**](BasesApi.md#listApiTokensOfAllBases) | **GET** /api/v2.1/org/{org_id}/admin/api-tokens/ | List API-Tokens of All Bases | | [**listBaseSharings()**](BasesApi.md#listBaseSharings) | **GET** /api/v2.1/org/{org_id}/admin/dtables/{base_uuid}/shares/ | List Base Sharings | | [**listBases()**](BasesApi.md#listBases) | **GET** /api/v2.1/org/{org_id}/admin/dtables/ | List Bases (Team) | | [**listTrashBases()**](BasesApi.md#listTrashBases) | **GET** /api/v2.1/org/{org_id}/admin/trash-dtables/ | List Trash Bases | +| [**listUsersBases()**](BasesApi.md#listUsersBases) | **GET** /api/v2.1/org/{org_id}/admin/users/{user_id}/dtables/ | List User's Bases | | [**restoreBaseFromTrash()**](BasesApi.md#restoreBaseFromTrash) | **PUT** /api/v2.1/org/{org_id}/admin/trash-dtables/{base_uuid}/ | Restore Base from Trash | | [**searchBase()**](BasesApi.md#searchBase) | **GET** /api/v2.1/org/{org_id}/admin/search-dtables/ | Search Base | @@ -63,6 +67,59 @@ AccountTokenAuth +## `deleteApiToken()` + +```php +deleteApiToken($org_id, $base_uuid, $app_name): object +``` + +Delete API-Token + +Delete a specific API token from a base. The token is identified by its *app_name*. + +### Example + +```php +setAccessToken('YOUR_TOKEN'); +$apiInstance = new SeaTable\Client\TeamAdmin\BasesApi( + new GuzzleHttp\Client(), + $config +); +$org_id = 1; // int | The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. +$base_uuid = 5c264e76-0e5a-448a-9f34-580b551364ca; // string | The unique identifier of a base. Sometimes also called dtable_uuid. +$app_name = My App; // string | The name of your app. Every API-Token has a name to identify the purpose. The name of the app must be unique for every base. + +try { + $result = $apiInstance->deleteApiToken($org_id, $base_uuid, $app_name); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling BasesApi->deleteApiToken: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **org_id** | **int**| The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. | | +| **base_uuid** | **string**| The unique identifier of a base. Sometimes also called dtable_uuid. | | +| **app_name** | **string**| The name of your app. Every API-Token has a name to identify the purpose. The name of the app must be unique for every base. | | + +### Return type + +**object** + +### Authorization + +AccountTokenAuth + + + + ## `deleteBase()` ```php @@ -117,7 +174,7 @@ AccountTokenAuth ## `getBase()` ```php -getBase($org_id, $base_uuid): object +getBase($org_id, $base_uuid): \SeaTable\Client\TeamAdmin\GetBase200Response ``` Get Base @@ -156,6 +213,110 @@ try { ### Return type +[**\SeaTable\Client\TeamAdmin\GetBase200Response**](../Model/GetBase200Response.md) + +### Authorization + +AccountTokenAuth + + + + +## `listApiTokens()` + +```php +listApiTokens($org_id, $base_uuid): object +``` + +List API-Tokens + +List API tokens of a single base. + +### Example + +```php +setAccessToken('YOUR_TOKEN'); +$apiInstance = new SeaTable\Client\TeamAdmin\BasesApi( + new GuzzleHttp\Client(), + $config +); +$org_id = 1; // int | The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. +$base_uuid = 5c264e76-0e5a-448a-9f34-580b551364ca; // string | The unique identifier of a base. Sometimes also called dtable_uuid. + +try { + $result = $apiInstance->listApiTokens($org_id, $base_uuid); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling BasesApi->listApiTokens: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **org_id** | **int**| The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. | | +| **base_uuid** | **string**| The unique identifier of a base. Sometimes also called dtable_uuid. | | + +### Return type + +**object** + +### Authorization + +AccountTokenAuth + + + + +## `listApiTokensOfAllBases()` + +```php +listApiTokensOfAllBases($org_id, $page, $per_page): object +``` + +List API-Tokens of All Bases + +List API tokens of all bases inside the team/organization. + +### Example + +```php +setAccessToken('YOUR_TOKEN'); +$apiInstance = new SeaTable\Client\TeamAdmin\BasesApi( + new GuzzleHttp\Client(), + $config +); +$org_id = 1; // int | The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. +$page = 1; // int | The page number you want to start showing the entries. If no value is provided, 1 will be used. +$per_page = 25; // int | The number of results that should be returned. If no value is provided, 25 results will be returned. + +try { + $result = $apiInstance->listApiTokensOfAllBases($org_id, $page, $per_page); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling BasesApi->listApiTokensOfAllBases: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **org_id** | **int**| The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. | | +| **page** | **int**| The page number you want to start showing the entries. If no value is provided, 1 will be used. | [optional] | +| **per_page** | **int**| The number of results that should be returned. If no value is provided, 25 results will be returned. | [optional] | + +### Return type + **object** ### Authorization @@ -322,6 +483,61 @@ AccountTokenAuth +## `listUsersBases()` + +```php +listUsersBases($org_id, $user_id, $page, $per_page): object +``` + +List User's Bases + +List all the bases of a certain user by the user's ID. + +### Example + +```php +setAccessToken('YOUR_TOKEN'); +$apiInstance = new SeaTable\Client\TeamAdmin\BasesApi( + new GuzzleHttp\Client(), + $config +); +$org_id = 1; // int | The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. +$user_id = 123456789f1e4c8d8e1c31415867317c@auth.local; // string | The unique `user_id` in the form ...@auth.local. This is not the email address of the user. +$page = 1; // int | The page number you want to start showing the entries. If no value is provided, 1 will be used. +$per_page = 25; // int | The number of results that should be returned. If no value is provided, 25 results will be returned. + +try { + $result = $apiInstance->listUsersBases($org_id, $user_id, $page, $per_page); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling BasesApi->listUsersBases: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **org_id** | **int**| The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. | | +| **user_id** | **string**| The unique `user_id` in the form ...@auth.local. This is not the email address of the user. | | +| **page** | **int**| The page number you want to start showing the entries. If no value is provided, 1 will be used. | [optional] | +| **per_page** | **int**| The number of results that should be returned. If no value is provided, 25 results will be returned. | [optional] | + +### Return type + +**object** + +### Authorization + +AccountTokenAuth + + + + ## `restoreBaseFromTrash()` ```php diff --git a/docs/TeamAdmin/Api/GroupsApi.md b/docs/TeamAdmin/Api/GroupsApi.md index 8079a7ad..245d76d9 100644 --- a/docs/TeamAdmin/Api/GroupsApi.md +++ b/docs/TeamAdmin/Api/GroupsApi.md @@ -20,7 +20,7 @@ All URIs are relative to https://cloud.seatable.io, except if the operation defi ## `addGroup()` ```php -addGroup($org_id, $group_name, $group_owner): object +addGroup($org_id, $group_name, $group_owner): \SeaTable\Client\TeamAdmin\AddGroup200Response ``` Add Group @@ -61,7 +61,7 @@ try { ### Return type -**object** +[**\SeaTable\Client\TeamAdmin\AddGroup200Response**](../Model/AddGroup200Response.md) ### Authorization @@ -131,7 +131,7 @@ deleteGroup($org_id, $group_id): object Delete Group -Delete a group with its ID. +Delete a group with its ID. > 🚧 Group must be empty > > A group can only be deleted if it contains no bases. Delete or move all bases out of the group first, otherwise the API returns `400` with `\"Cannot delete group with bases\"`. ### Example @@ -177,7 +177,7 @@ AccountTokenAuth ## `getGroup()` ```php -getGroup($org_id, $group_id): object +getGroup($org_id, $group_id): \SeaTable\Client\TeamAdmin\AddGroup200Response ``` Get Group @@ -216,7 +216,7 @@ try { ### Return type -**object** +[**\SeaTable\Client\TeamAdmin\AddGroup200Response**](../Model/AddGroup200Response.md) ### Authorization @@ -279,7 +279,7 @@ AccountTokenAuth ## `listGroupMembers()` ```php -listGroupMembers($org_id, $group_id): object +listGroupMembers($org_id, $group_id): \SeaTable\Client\TeamAdmin\ListGroupMembers200Response ``` List Group Members @@ -318,7 +318,7 @@ try { ### Return type -**object** +[**\SeaTable\Client\TeamAdmin\ListGroupMembers200Response**](../Model/ListGroupMembers200Response.md) ### Authorization @@ -330,7 +330,7 @@ AccountTokenAuth ## `listGroups()` ```php -listGroups($org_id, $page, $per_page): object +listGroups($org_id, $page, $per_page): \SeaTable\Client\TeamAdmin\ListGroups200Response ``` List Groups (Team) @@ -371,7 +371,7 @@ try { ### Return type -**object** +[**\SeaTable\Client\TeamAdmin\ListGroups200Response**](../Model/ListGroups200Response.md) ### Authorization @@ -489,12 +489,12 @@ AccountTokenAuth ## `updateGroup()` ```php -updateGroup($org_id, $group_id, $update_group_request): object +updateGroup($org_id, $group_id, $update_group_request): \SeaTable\Client\TeamAdmin\UpdateGroup200Response ``` Update Group -Use this request to rename, and/or change owner of a group. In the request body, both parameters are optional. Only use the ones that you need to update: * `new_owner` is the new owner of the group, include the user's ID here. If you don't want to change the owner, remove this parameter because if you enter the current owner's ID here, you'll get an error \"User xxx is already group owner\". * `new_group_name` is the new name of your group. If you don't want to change the name, remove shi parameter because if you enter the current group name here you'll get an error \"There is already a group with that name\". +Use this request to rename, and/or change owner of a group. In the request body, both parameters are optional. Only use the ones that you need to update: * `new_owner` is the new owner of the group, include the user's ID here. If you don't want to change the owner, remove this parameter because if you enter the current owner's ID here, you'll get an error \"User xxx is already group owner\". * `new_group_name` is the new name of your group. If you don't want to change the name, remove this parameter because if you enter the current group name here you'll get an error \"There is already a group with that name\". ### Example @@ -530,7 +530,7 @@ try { ### Return type -**object** +[**\SeaTable\Client\TeamAdmin\UpdateGroup200Response**](../Model/UpdateGroup200Response.md) ### Authorization diff --git a/docs/TeamAdmin/Api/InfoSettingsApi.md b/docs/TeamAdmin/Api/InfoSettingsApi.md index 09ca387d..66cdaf7a 100644 --- a/docs/TeamAdmin/Api/InfoSettingsApi.md +++ b/docs/TeamAdmin/Api/InfoSettingsApi.md @@ -4,16 +4,63 @@ All URIs are relative to https://cloud.seatable.io, except if the operation defi | Method | HTTP request | Description | | ------------- | ------------- | ------------- | +| [**deleteTeam()**](InfoSettingsApi.md#deleteTeam) | **DELETE** /api/v2.1/org/admin/ | Delete Team | | [**getTeamInfo()**](InfoSettingsApi.md#getTeamInfo) | **GET** /api/v2.1/org/admin/info/ | Get Team Info | | [**getTeamSettings()**](InfoSettingsApi.md#getTeamSettings) | **GET** /api/v2.1/org/admin/settings/ | Get Team Settings | | [**updateTeam()**](InfoSettingsApi.md#updateTeam) | **PUT** /api/v2.1/org/admin/info/ | Update Team | | [**updateTeamSettings()**](InfoSettingsApi.md#updateTeamSettings) | **PUT** /api/v2.1/org/admin/settings/ | Update Team Settings | +## `deleteTeam()` + +```php +deleteTeam(): object +``` + +Delete Team + +Delete a team (organization) with its ID. This will eliminate the team! However, this won't delete the team users - but all its members will become team-less users in the system. + +### Example + +```php +setAccessToken('YOUR_TOKEN'); +$apiInstance = new SeaTable\Client\TeamAdmin\InfoSettingsApi( + new GuzzleHttp\Client(), + $config +); + +try { + $result = $apiInstance->deleteTeam(); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling InfoSettingsApi->deleteTeam: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +**object** + +### Authorization + +AccountTokenAuth + + + + ## `getTeamInfo()` ```php -getTeamInfo(): object +getTeamInfo(): \SeaTable\Client\TeamAdmin\GetTeamInfo200Response ``` Get Team Info @@ -47,7 +94,7 @@ This endpoint does not need any parameter. ### Return type -**object** +[**\SeaTable\Client\TeamAdmin\GetTeamInfo200Response**](../Model/GetTeamInfo200Response.md) ### Authorization @@ -59,7 +106,7 @@ AccountTokenAuth ## `getTeamSettings()` ```php -getTeamSettings(): object +getTeamSettings(): \SeaTable\Client\TeamAdmin\GetTeamSettings200Response ``` Get Team Settings @@ -93,7 +140,7 @@ This endpoint does not need any parameter. ### Return type -**object** +[**\SeaTable\Client\TeamAdmin\GetTeamSettings200Response**](../Model/GetTeamSettings200Response.md) ### Authorization @@ -154,7 +201,7 @@ AccountTokenAuth ## `updateTeamSettings()` ```php -updateTeamSettings($enable_force_2fa, $enable_force_sso_login, $enable_new_user_email, $enable_external_user_access_invite_link, $enable_member_modify_name): object +updateTeamSettings($enable_force_2fa, $enable_force_sso_login, $enable_new_user_email, $enable_external_user_access_invite_link, $enable_member_modify_name): \SeaTable\Client\TeamAdmin\GetTeamSettings200Response ``` Update Team Settings @@ -199,7 +246,7 @@ try { ### Return type -**object** +[**\SeaTable\Client\TeamAdmin\GetTeamSettings200Response**](../Model/GetTeamSettings200Response.md) ### Authorization diff --git a/docs/TeamAdmin/Api/SharingLinksApi.md b/docs/TeamAdmin/Api/SharingLinksApi.md index 3784b89b..441d30fc 100644 --- a/docs/TeamAdmin/Api/SharingLinksApi.md +++ b/docs/TeamAdmin/Api/SharingLinksApi.md @@ -9,6 +9,7 @@ All URIs are relative to https://cloud.seatable.io, except if the operation defi | [**deleteViewExternalLink()**](SharingLinksApi.md#deleteViewExternalLink) | **DELETE** /api/v2.1/org/{org_id}/admin/view-external-links/{view_external_link_token}/ | Delete View External Link | | [**listBaseExternalLinks()**](SharingLinksApi.md#listBaseExternalLinks) | **GET** /api/v2.1/org/{org_id}/admin/external-links/ | List Base External Links | | [**listInviteLinks()**](SharingLinksApi.md#listInviteLinks) | **GET** /api/v2.1/org/{org_id}/admin/invite-links/ | List Invite Links | +| [**listShares()**](SharingLinksApi.md#listShares) | **GET** /api/v2.1/org/{org_id}/admin/shares/ | List Shares | | [**listViewExternalLinks()**](SharingLinksApi.md#listViewExternalLinks) | **GET** /api/v2.1/org/{org_id}/admin/view-external-links/ | List View External Links | | [**updateInviteLink()**](SharingLinksApi.md#updateInviteLink) | **PUT** /api/v2.1/org/{org_id}/admin/invite-links/{invite_link_token}/ | Update Invite Link | @@ -36,7 +37,7 @@ $apiInstance = new SeaTable\Client\TeamAdmin\SharingLinksApi( $config ); $org_id = 1; // int | The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. -$external_link_token = d6d006b319ca4d2aa060; // string +$external_link_token = d6d006b319ca4d2aa060; // string | The token of the external link. try { $result = $apiInstance->deleteExternalLink($org_id, $external_link_token); @@ -51,7 +52,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **org_id** | **int**| The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. | | -| **external_link_token** | **string**| | | +| **external_link_token** | **string**| The token of the external link. | | ### Return type @@ -87,7 +88,7 @@ $apiInstance = new SeaTable\Client\TeamAdmin\SharingLinksApi( $config ); $org_id = 1; // int | The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. -$invite_link_token = 0366b8995d7f47d8eu3t; // string +$invite_link_token = 0366b8995d7f47d8ae3c; // string | The token of the invite link. try { $result = $apiInstance->deleteInviteLink($org_id, $invite_link_token); @@ -102,7 +103,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **org_id** | **int**| The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. | | -| **invite_link_token** | **string**| | | +| **invite_link_token** | **string**| The token of the invite link. | | ### Return type @@ -138,7 +139,7 @@ $apiInstance = new SeaTable\Client\TeamAdmin\SharingLinksApi( $config ); $org_id = 1; // int | The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. -$view_external_link_token = d6d006b319ca4d2aa060; // string +$view_external_link_token = d6d006b319ca4d2aa060; // string | The token of the view external link. try { $result = $apiInstance->deleteViewExternalLink($org_id, $view_external_link_token); @@ -153,7 +154,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **org_id** | **int**| The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. | | -| **view_external_link_token** | **string**| | | +| **view_external_link_token** | **string**| The token of the view external link. | | ### Return type @@ -268,6 +269,55 @@ AccountTokenAuth +## `listShares()` + +```php +listShares($org_id): \SeaTable\Client\TeamAdmin\ListShares200Response +``` + +List Shares + +List all shares inside the given team/organization. This includes the following: - Bases shared to individual users - Bases shared to groups - Views shared to individual users - Views shared to groups + +### Example + +```php +setAccessToken('YOUR_TOKEN'); +$apiInstance = new SeaTable\Client\TeamAdmin\SharingLinksApi( + new GuzzleHttp\Client(), + $config +); +$org_id = 1; // int | The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. + +try { + $result = $apiInstance->listShares($org_id); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling SharingLinksApi->listShares: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **org_id** | **int**| The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. | | + +### Return type + +[**\SeaTable\Client\TeamAdmin\ListShares200Response**](../Model/ListShares200Response.md) + +### Authorization + +AccountTokenAuth + + + + ## `listViewExternalLinks()` ```php @@ -320,7 +370,7 @@ AccountTokenAuth ## `updateInviteLink()` ```php -updateInviteLink($org_id, $invite_link_token, $update_invite_link_request): object +updateInviteLink($org_id, $invite_link_token, $update_invite_link_request): \SeaTable\Client\TeamAdmin\UpdateInviteLink200Response ``` Update Invite Link @@ -340,7 +390,7 @@ $apiInstance = new SeaTable\Client\TeamAdmin\SharingLinksApi( $config ); $org_id = 1; // int | The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. -$invite_link_token = 0366b8995d7f47d8eu3t; // string +$invite_link_token = 0366b8995d7f47d8ae3c; // string | The token of the invite link. $update_invite_link_request = new \SeaTable\Client\TeamAdmin\UpdateInviteLinkRequest(); // \SeaTable\Client\TeamAdmin\UpdateInviteLinkRequest try { @@ -356,12 +406,12 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **org_id** | **int**| The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. | | -| **invite_link_token** | **string**| | | +| **invite_link_token** | **string**| The token of the invite link. | | | **update_invite_link_request** | [**\SeaTable\Client\TeamAdmin\UpdateInviteLinkRequest**](../Model/UpdateInviteLinkRequest.md)| | [optional] | ### Return type -**object** +[**\SeaTable\Client\TeamAdmin\UpdateInviteLink200Response**](../Model/UpdateInviteLink200Response.md) ### Authorization diff --git a/docs/TeamAdmin/Api/StatisticsApi.md b/docs/TeamAdmin/Api/StatisticsApi.md new file mode 100644 index 00000000..74ac83a8 --- /dev/null +++ b/docs/TeamAdmin/Api/StatisticsApi.md @@ -0,0 +1,417 @@ +# SeaTable\Client\StatisticsApi + +All URIs are relative to https://cloud.seatable.io, except if the operation defines another base path. + +| Method | HTTP request | Description | +| ------------- | ------------- | ------------- | +| [**getAdminLogStatisticsByDay()**](StatisticsApi.md#getAdminLogStatisticsByDay) | **GET** /api/v2.1/org/{org_id}/admin/statistics/admin-logs/by-day/ | Admin Logs (by Day) | +| [**getAutomationLogStatisticsByBase()**](StatisticsApi.md#getAutomationLogStatisticsByBase) | **GET** /api/v2.1/org/{org_id}/admin/statistics/automation-logs/by-base/ | Automation Logs (by Base) | +| [**getAutomationLogStatisticsByDay()**](StatisticsApi.md#getAutomationLogStatisticsByDay) | **GET** /api/v2.1/org/{org_id}/admin/statistics/automation-logs/by-day/ | Automation Logs (by Day) | +| [**getLoginLogStatisticsByDay()**](StatisticsApi.md#getLoginLogStatisticsByDay) | **GET** /api/v2.1/org/{org_id}/admin/statistics/login-logs/by-day/ | Login Logs (by Day) | +| [**getPythonRunStatisticsByBase()**](StatisticsApi.md#getPythonRunStatisticsByBase) | **GET** /api/v2.1/org/{org_id}/admin/statistics/python-runs/by-base/ | Python Runs (by Base) | +| [**getPythonRunStatisticsByDay()**](StatisticsApi.md#getPythonRunStatisticsByDay) | **GET** /api/v2.1/org/{org_id}/admin/statistics/python-runs/by-day/ | Python Runs (by Day) | +| [**getUserOrBaseAIStatistics()**](StatisticsApi.md#getUserOrBaseAIStatistics) | **GET** /api/v2.1/org/{org_id}/admin/statistics/ai/ | Get AI Statistics by User/Base | + + +## `getAdminLogStatisticsByDay()` + +```php +getAdminLogStatisticsByDay($org_id, $start, $end, $page, $per_page): object +``` + +Admin Logs (by Day) + +Returns statistics about admin logs grouped by day. + +### Example + +```php +setAccessToken('YOUR_TOKEN'); +$apiInstance = new SeaTable\Client\TeamAdmin\StatisticsApi( + new GuzzleHttp\Client(), + $config +); +$org_id = 1; // int | The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. +$start = 2025-11-01T06:00:00+01:00; // \DateTime | Start date in ISO format. +$end = 2025-11-30T18:00:00+01:00; // \DateTime | End date in ISO format. +$page = 1; // int | The page number you want to start showing the entries. If no value is provided, 1 will be used. +$per_page = 25; // int | The number of results that should be returned. If no value is provided, 25 results will be returned. + +try { + $result = $apiInstance->getAdminLogStatisticsByDay($org_id, $start, $end, $page, $per_page); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling StatisticsApi->getAdminLogStatisticsByDay: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **org_id** | **int**| The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. | | +| **start** | **\DateTime**| Start date in ISO format. | [optional] | +| **end** | **\DateTime**| End date in ISO format. | [optional] | +| **page** | **int**| The page number you want to start showing the entries. If no value is provided, 1 will be used. | [optional] | +| **per_page** | **int**| The number of results that should be returned. If no value is provided, 25 results will be returned. | [optional] | + +### Return type + +**object** + +### Authorization + +AccountTokenAuth + + + + +## `getAutomationLogStatisticsByBase()` + +```php +getAutomationLogStatisticsByBase($org_id, $start, $end, $page, $per_page): object +``` + +Automation Logs (by Base) + +Returns statistics about automation logs grouped by base. + +### Example + +```php +setAccessToken('YOUR_TOKEN'); +$apiInstance = new SeaTable\Client\TeamAdmin\StatisticsApi( + new GuzzleHttp\Client(), + $config +); +$org_id = 1; // int | The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. +$start = 2025-11-01T06:00:00+01:00; // \DateTime | Start date in ISO format. +$end = 2025-11-30T18:00:00+01:00; // \DateTime | End date in ISO format. +$page = 1; // int | The page number you want to start showing the entries. If no value is provided, 1 will be used. +$per_page = 25; // int | The number of results that should be returned. If no value is provided, 25 results will be returned. + +try { + $result = $apiInstance->getAutomationLogStatisticsByBase($org_id, $start, $end, $page, $per_page); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling StatisticsApi->getAutomationLogStatisticsByBase: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **org_id** | **int**| The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. | | +| **start** | **\DateTime**| Start date in ISO format. | [optional] | +| **end** | **\DateTime**| End date in ISO format. | [optional] | +| **page** | **int**| The page number you want to start showing the entries. If no value is provided, 1 will be used. | [optional] | +| **per_page** | **int**| The number of results that should be returned. If no value is provided, 25 results will be returned. | [optional] | + +### Return type + +**object** + +### Authorization + +AccountTokenAuth + + + + +## `getAutomationLogStatisticsByDay()` + +```php +getAutomationLogStatisticsByDay($org_id, $dtable_uuid, $start, $end, $page, $per_page): object +``` + +Automation Logs (by Day) + +Returns statistics about automation logs grouped by day. + +### Example + +```php +setAccessToken('YOUR_TOKEN'); +$apiInstance = new SeaTable\Client\TeamAdmin\StatisticsApi( + new GuzzleHttp\Client(), + $config +); +$org_id = 1; // int | The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. +$dtable_uuid = 5c264e76-0e5a-448a-9f34-580b551364ca; // string | The unique identifier of a base. +$start = 2025-11-01T06:00:00+01:00; // \DateTime | Start date in ISO format. +$end = 2025-11-30T18:00:00+01:00; // \DateTime | End date in ISO format. +$page = 1; // int | The page number you want to start showing the entries. If no value is provided, 1 will be used. +$per_page = 25; // int | The number of results that should be returned. If no value is provided, 25 results will be returned. + +try { + $result = $apiInstance->getAutomationLogStatisticsByDay($org_id, $dtable_uuid, $start, $end, $page, $per_page); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling StatisticsApi->getAutomationLogStatisticsByDay: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **org_id** | **int**| The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. | | +| **dtable_uuid** | **string**| The unique identifier of a base. | [optional] | +| **start** | **\DateTime**| Start date in ISO format. | [optional] | +| **end** | **\DateTime**| End date in ISO format. | [optional] | +| **page** | **int**| The page number you want to start showing the entries. If no value is provided, 1 will be used. | [optional] | +| **per_page** | **int**| The number of results that should be returned. If no value is provided, 25 results will be returned. | [optional] | + +### Return type + +**object** + +### Authorization + +AccountTokenAuth + + + + +## `getLoginLogStatisticsByDay()` + +```php +getLoginLogStatisticsByDay($org_id, $start, $end, $page, $per_page): object +``` + +Login Logs (by Day) + +Returns statistics about login logs grouped by day. + +### Example + +```php +setAccessToken('YOUR_TOKEN'); +$apiInstance = new SeaTable\Client\TeamAdmin\StatisticsApi( + new GuzzleHttp\Client(), + $config +); +$org_id = 1; // int | The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. +$start = 2025-11-01T06:00:00+01:00; // \DateTime | Start date in ISO format. +$end = 2025-11-30T18:00:00+01:00; // \DateTime | End date in ISO format. +$page = 1; // int | The page number you want to start showing the entries. If no value is provided, 1 will be used. +$per_page = 25; // int | The number of results that should be returned. If no value is provided, 25 results will be returned. + +try { + $result = $apiInstance->getLoginLogStatisticsByDay($org_id, $start, $end, $page, $per_page); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling StatisticsApi->getLoginLogStatisticsByDay: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **org_id** | **int**| The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. | | +| **start** | **\DateTime**| Start date in ISO format. | [optional] | +| **end** | **\DateTime**| End date in ISO format. | [optional] | +| **page** | **int**| The page number you want to start showing the entries. If no value is provided, 1 will be used. | [optional] | +| **per_page** | **int**| The number of results that should be returned. If no value is provided, 25 results will be returned. | [optional] | + +### Return type + +**object** + +### Authorization + +AccountTokenAuth + + + + +## `getPythonRunStatisticsByBase()` + +```php +getPythonRunStatisticsByBase($org_id, $start, $end, $page, $per_page): object +``` + +Python Runs (by Base) + +Returns statistics about python runs grouped by base. + +### Example + +```php +setAccessToken('YOUR_TOKEN'); +$apiInstance = new SeaTable\Client\TeamAdmin\StatisticsApi( + new GuzzleHttp\Client(), + $config +); +$org_id = 1; // int | The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. +$start = 2025-11-01T06:00:00+01:00; // \DateTime | Start date in ISO format. +$end = 2025-11-30T18:00:00+01:00; // \DateTime | End date in ISO format. +$page = 1; // int | The page number you want to start showing the entries. If no value is provided, 1 will be used. +$per_page = 25; // int | The number of results that should be returned. If no value is provided, 25 results will be returned. + +try { + $result = $apiInstance->getPythonRunStatisticsByBase($org_id, $start, $end, $page, $per_page); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling StatisticsApi->getPythonRunStatisticsByBase: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **org_id** | **int**| The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. | | +| **start** | **\DateTime**| Start date in ISO format. | [optional] | +| **end** | **\DateTime**| End date in ISO format. | [optional] | +| **page** | **int**| The page number you want to start showing the entries. If no value is provided, 1 will be used. | [optional] | +| **per_page** | **int**| The number of results that should be returned. If no value is provided, 25 results will be returned. | [optional] | + +### Return type + +**object** + +### Authorization + +AccountTokenAuth + + + + +## `getPythonRunStatisticsByDay()` + +```php +getPythonRunStatisticsByDay($org_id, $dtable_uuid, $start, $end, $page, $per_page): object +``` + +Python Runs (by Day) + +Returns statistics about python runs grouped by day. + +### Example + +```php +setAccessToken('YOUR_TOKEN'); +$apiInstance = new SeaTable\Client\TeamAdmin\StatisticsApi( + new GuzzleHttp\Client(), + $config +); +$org_id = 1; // int | The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. +$dtable_uuid = 5c264e76-0e5a-448a-9f34-580b551364ca; // string | The unique identifier of a base. +$start = 2025-11-01T06:00:00+01:00; // \DateTime | Start date in ISO format. +$end = 2025-11-30T18:00:00+01:00; // \DateTime | End date in ISO format. +$page = 1; // int | The page number you want to start showing the entries. If no value is provided, 1 will be used. +$per_page = 25; // int | The number of results that should be returned. If no value is provided, 25 results will be returned. + +try { + $result = $apiInstance->getPythonRunStatisticsByDay($org_id, $dtable_uuid, $start, $end, $page, $per_page); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling StatisticsApi->getPythonRunStatisticsByDay: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **org_id** | **int**| The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. | | +| **dtable_uuid** | **string**| The unique identifier of a base. | [optional] | +| **start** | **\DateTime**| Start date in ISO format. | [optional] | +| **end** | **\DateTime**| End date in ISO format. | [optional] | +| **page** | **int**| The page number you want to start showing the entries. If no value is provided, 1 will be used. | [optional] | +| **per_page** | **int**| The number of results that should be returned. If no value is provided, 25 results will be returned. | [optional] | + +### Return type + +**object** + +### Authorization + +AccountTokenAuth + + + + +## `getUserOrBaseAIStatistics()` + +```php +getUserOrBaseAIStatistics($group_by, $date, $org_id, $page, $per_page): object +``` + +Get AI Statistics by User/Base + +Get AI usage statistics monthly by user/base. + +### Example + +```php +setAccessToken('YOUR_TOKEN'); +$apiInstance = new SeaTable\Client\TeamAdmin\StatisticsApi( + new GuzzleHttp\Client(), + $config +); +$group_by = owner; // string | Query by owner or Base +$date = 2025-01-01; // string | A date string in YYYY-MM-DD format +$org_id = 1; // int | The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. +$page = 1; // int | The page number you want to start showing the entries. If no value is provided, 1 will be used. +$per_page = 25; // int | The number of results that should be returned. If no value is provided, 25 results will be returned. + +try { + $result = $apiInstance->getUserOrBaseAIStatistics($group_by, $date, $org_id, $page, $per_page); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling StatisticsApi->getUserOrBaseAIStatistics: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **group_by** | **string**| Query by owner or Base | | +| **date** | **string**| A date string in YYYY-MM-DD format | | +| **org_id** | **int**| The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. | | +| **page** | **int**| The page number you want to start showing the entries. If no value is provided, 1 will be used. | [optional] | +| **per_page** | **int**| The number of results that should be returned. If no value is provided, 25 results will be returned. | [optional] | + +### Return type + +**object** + +### Authorization + +AccountTokenAuth + + + diff --git a/docs/TeamAdmin/Api/UsersApi.md b/docs/TeamAdmin/Api/UsersApi.md index 20bdfa57..f8e43c76 100644 --- a/docs/TeamAdmin/Api/UsersApi.md +++ b/docs/TeamAdmin/Api/UsersApi.md @@ -17,7 +17,7 @@ All URIs are relative to https://cloud.seatable.io, except if the operation defi ## `addUser()` ```php -addUser($org_id, $email, $name, $password, $with_workspace): object +addUser($org_id, $email, $name, $password, $with_workspace): \SeaTable\Client\TeamAdmin\AddUser200Response ``` Add User @@ -62,7 +62,7 @@ try { ### Return type -**object** +[**\SeaTable\Client\TeamAdmin\AddUser200Response**](../Model/AddUser200Response.md) ### Authorization @@ -181,7 +181,7 @@ enforceTwofactor($org_id, $user_id, $enforce_twofactor_request): object Enforce 2FA -As the team administrator, you can force each team member to use 2-factor authentication (2FA). When the value of `force_2fa` is `true` in this request, the member will be requested to activate 2FA by scanning a QR code next time they log in. To cancel enforcing them to use 2FA, change the value to `false` and send this request again. This request is to be distinguished from the next request, because cancelling the enforcement doesn't necesssarily [Disable 2FA for A User in Team](/reference/disabletwofactor-1), which serves a different purpose. +As the team administrator, you can force each team member to use 2-factor authentication (2FA). When the value of `force_2fa` is `true` in this request, the member will be requested to activate 2FA by scanning a QR code next time they log in. To cancel enforcing them to use 2FA, change the value to `false` and send this request again. This request is to be distinguished from the next request, because cancelling the enforcement doesn't necessarily [Disable 2FA for A User in Team](/reference/disabletwofactor-1), which serves a different purpose. ### Example @@ -229,7 +229,7 @@ AccountTokenAuth ## `getUser()` ```php -getUser($org_id, $user_id): object +getUser($org_id, $user_id): \SeaTable\Client\TeamAdmin\GetUser200Response ``` Get User @@ -268,7 +268,7 @@ try { ### Return type -**object** +[**\SeaTable\Client\TeamAdmin\GetUser200Response**](../Model/GetUser200Response.md) ### Authorization @@ -384,7 +384,7 @@ AccountTokenAuth ## `updateUser()` ```php -updateUser($org_id, $user_id, $name, $contact_email, $is_staff, $is_active, $quota_total, $id_in_org): object +updateUser($org_id, $user_id, $name, $contact_email, $is_staff, $is_active, $quota_total, $id_in_org): \SeaTable\Client\TeamAdmin\UpdateUser200Response ``` Update User @@ -435,7 +435,7 @@ try { ### Return type -**object** +[**\SeaTable\Client\TeamAdmin\UpdateUser200Response**](../Model/UpdateUser200Response.md) ### Authorization diff --git a/docs/TeamAdmin/Model/AddGroup200Response.md b/docs/TeamAdmin/Model/AddGroup200Response.md new file mode 100644 index 00000000..578a9a3a --- /dev/null +++ b/docs/TeamAdmin/Model/AddGroup200Response.md @@ -0,0 +1,13 @@ +# # AddGroup200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**group_name** | **string** | | [optional] +**ctime** | **string** | | [optional] +**creator_email** | **string** | | [optional] +**creator_name** | **string** | | [optional] +**creator_contact_email** | **string** | | [optional] + diff --git a/docs/TeamAdmin/Model/AddUser200Response.md b/docs/TeamAdmin/Model/AddUser200Response.md new file mode 100644 index 00000000..9c805e9c --- /dev/null +++ b/docs/TeamAdmin/Model/AddUser200Response.md @@ -0,0 +1,17 @@ +# # AddUser200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**is_active** | **bool** | | [optional] +**ctime** | **string** | | [optional] +**name** | **string** | | [optional] +**email** | **string** | | [optional] +**contact_email** | **string** | | [optional] +**last_login** | **string** | | [optional] +**self_usage** | **int** | | [optional] +**quota** | **int** | | [optional] +**workspace_id** | **int** | | [optional] + diff --git a/docs/TeamAdmin/Model/GetBase200Response.md b/docs/TeamAdmin/Model/GetBase200Response.md new file mode 100644 index 00000000..1ce0b39d --- /dev/null +++ b/docs/TeamAdmin/Model/GetBase200Response.md @@ -0,0 +1,24 @@ +# # GetBase200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**workspace_id** | **int** | | [optional] +**uuid** | **string** | | [optional] +**name** | **string** | | [optional] +**created_at** | **string** | | [optional] +**updated_at** | **string** | | [optional] +**color** | **string** | | [optional] +**text_color** | **string** | | [optional] +**icon** | **string** | | [optional] +**is_encrypted** | **bool** | | [optional] +**in_storage** | **bool** | | [optional] +**org_id** | **int** | | [optional] +**owner** | **string** | | [optional] +**email** | **string** | | [optional] +**group_id** | **int** | | [optional] +**owner_deleted** | **bool** | | [optional] +**rows_count** | **int** | | [optional] + diff --git a/docs/TeamAdmin/Model/GetTeamInfo200Response.md b/docs/TeamAdmin/Model/GetTeamInfo200Response.md new file mode 100644 index 00000000..2e2b27bb --- /dev/null +++ b/docs/TeamAdmin/Model/GetTeamInfo200Response.md @@ -0,0 +1,22 @@ +# # GetTeamInfo200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**org_id** | **int** | | [optional] +**org_name** | **string** | | [optional] +**storage_quota** | **int** | | [optional] +**storage_usage** | **int** | | [optional] +**member_quota** | **int** | | [optional] +**member_usage** | **int** | | [optional] +**active_members** | **int** | | [optional] +**row_usage** | **int** | | [optional] +**row_total** | **int** | | [optional] +**role** | **string** | | [optional] +**big_data_row_limit** | **int** | | [optional] +**big_data_total_rows** | **int** | | [optional] +**big_data_total_storage** | **int** | | [optional] +**scripts_running_total** | **int** | | [optional] +**scripts_running_count** | **int** | | [optional] + diff --git a/docs/TeamAdmin/Model/GetTeamSettings200Response.md b/docs/TeamAdmin/Model/GetTeamSettings200Response.md new file mode 100644 index 00000000..eca37d61 --- /dev/null +++ b/docs/TeamAdmin/Model/GetTeamSettings200Response.md @@ -0,0 +1,10 @@ +# # GetTeamSettings200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enable_force_2fa** | **bool** | | [optional] +**enable_new_user_email** | **bool** | | [optional] +**enable_external_user_access_invite_link** | **bool** | | [optional] + diff --git a/docs/TeamAdmin/Model/GetUser200Response.md b/docs/TeamAdmin/Model/GetUser200Response.md new file mode 100644 index 00000000..6347ac6e --- /dev/null +++ b/docs/TeamAdmin/Model/GetUser200Response.md @@ -0,0 +1,18 @@ +# # GetUser200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **string** | | [optional] +**name** | **string** | | [optional] +**contact_email** | **string** | | [optional] +**quota_usage** | **int** | | [optional] +**quota_total** | **int** | | [optional] +**avatar_url** | **string** | | [optional] +**id_in_org** | **string** | | [optional] +**has_default_device** | **bool** | | [optional] +**is_force_2fa** | **bool** | | [optional] +**is_active** | **bool** | | [optional] +**is_org_admin** | **bool** | | [optional] + diff --git a/docs/TeamAdmin/Model/ListGroupMembers200Response.md b/docs/TeamAdmin/Model/ListGroupMembers200Response.md new file mode 100644 index 00000000..a2e86a97 --- /dev/null +++ b/docs/TeamAdmin/Model/ListGroupMembers200Response.md @@ -0,0 +1,10 @@ +# # ListGroupMembers200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**group_id** | **int** | | [optional] +**group_name** | **string** | | [optional] +**members** | **object[]** | | [optional] + diff --git a/docs/TeamAdmin/Model/ListGroups200Response.md b/docs/TeamAdmin/Model/ListGroups200Response.md new file mode 100644 index 00000000..45c5f69d --- /dev/null +++ b/docs/TeamAdmin/Model/ListGroups200Response.md @@ -0,0 +1,11 @@ +# # ListGroups200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**groups** | **object[]** | | [optional] +**page** | **int** | | [optional] +**per_page** | **int** | | [optional] +**page_next** | **bool** | | [optional] + diff --git a/docs/TeamAdmin/Model/ListShares200Response.md b/docs/TeamAdmin/Model/ListShares200Response.md new file mode 100644 index 00000000..3827894f --- /dev/null +++ b/docs/TeamAdmin/Model/ListShares200Response.md @@ -0,0 +1,11 @@ +# # ListShares200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**dtable_user_shares** | **object[]** | | [optional] +**dtable_group_shares** | **object[]** | | [optional] +**view_user_shares** | **object[]** | | [optional] +**view_group_shares** | **object[]** | | [optional] + diff --git a/docs/TeamAdmin/Model/UpdateGroup200Response.md b/docs/TeamAdmin/Model/UpdateGroup200Response.md new file mode 100644 index 00000000..148d3690 --- /dev/null +++ b/docs/TeamAdmin/Model/UpdateGroup200Response.md @@ -0,0 +1,14 @@ +# # UpdateGroup200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**group_name** | **string** | | [optional] +**ctime** | **string** | | [optional] +**creator_email** | **string** | | [optional] +**creator_name** | **string** | | [optional] +**creator_contact_email** | **string** | | [optional] +**size** | **int** | | [optional] + diff --git a/docs/TeamAdmin/Model/UpdateInviteLink200Response.md b/docs/TeamAdmin/Model/UpdateInviteLink200Response.md new file mode 100644 index 00000000..1b8ee66b --- /dev/null +++ b/docs/TeamAdmin/Model/UpdateInviteLink200Response.md @@ -0,0 +1,16 @@ +# # UpdateInviteLink200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**username** | **string** | | [optional] +**permission** | **string** | | [optional] +**token** | **string** | | [optional] +**link** | **string** | | [optional] +**dtable** | **string** | | [optional] +**dtable_id** | **int** | | [optional] +**workspace_id** | **int** | | [optional] +**expire_date** | **string** | | [optional] +**ctime** | **string** | | [optional] + diff --git a/docs/TeamAdmin/Model/UpdateUser200Response.md b/docs/TeamAdmin/Model/UpdateUser200Response.md new file mode 100644 index 00000000..631580d6 --- /dev/null +++ b/docs/TeamAdmin/Model/UpdateUser200Response.md @@ -0,0 +1,19 @@ +# # UpdateUser200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **string** | | [optional] +**name** | **string** | | [optional] +**contact_email** | **string** | | [optional] +**quota_usage** | **int** | | [optional] +**quota_total** | **int** | | [optional] +**is_active** | **bool** | | [optional] +**id** | **int** | | [optional] +**ctime** | **string** | | [optional] +**id_in_org** | **string** | | [optional] +**last_login** | **string** | | [optional] +**self_usage** | **int** | | [optional] +**quota** | **int** | | [optional] + diff --git a/docs/User/Api/ActivitiesLogsApi.md b/docs/User/Api/ActivitiesLogsApi.md index 480d1403..7a3357c2 100644 --- a/docs/User/Api/ActivitiesLogsApi.md +++ b/docs/User/Api/ActivitiesLogsApi.md @@ -31,9 +31,9 @@ $apiInstance = new SeaTable\Client\User\ActivitiesLogsApi( new GuzzleHttp\Client(), $config ); -$page = 1; // int -$per_page = 2; // int -$to_tz = +08:00; // string +$page = 1; // int | Page number of results to return. Default is 1. +$per_page = 2; // int | Number of results per page. +$to_tz = +08:00; // string | Timezone offset for date/time conversion. try { $result = $apiInstance->getBaseActivities($page, $per_page, $to_tz); @@ -47,9 +47,9 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **page** | **int**| | [optional] | -| **per_page** | **int**| | [optional] | -| **to_tz** | **string**| | [optional] | +| **page** | **int**| Page number of results to return. Default is 1. | [optional] | +| **per_page** | **int**| Number of results per page. | [optional] | +| **to_tz** | **string**| Timezone offset for date/time conversion. | [optional] | ### Return type @@ -85,9 +85,9 @@ $apiInstance = new SeaTable\Client\User\ActivitiesLogsApi( $config ); $dtable_uuid = 5c264e76-0e5a-448a-9f34-580b551364ca; // string | The unique identifier of a base. Sometimes also called dtable_uuid. -$op_date = 2023-05-25T10:06:39+08:00; // string -$page = 1; // int -$per_page = 2; // int +$op_date = 2023-05-25T10:06:39+08:00; // string | Filter by operation date. +$page = 1; // int | Page number of results to return. Default is 1. +$per_page = 2; // int | Number of results per page. try { $result = $apiInstance->getBaseActivityDetails($dtable_uuid, $op_date, $page, $per_page); @@ -102,9 +102,9 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **dtable_uuid** | **string**| The unique identifier of a base. Sometimes also called dtable_uuid. | | -| **op_date** | **string**| | | -| **page** | **int**| | [optional] | -| **per_page** | **int**| | [optional] | +| **op_date** | **string**| Filter by operation date. | | +| **page** | **int**| Page number of results to return. Default is 1. | [optional] | +| **per_page** | **int**| Number of results per page. | [optional] | ### Return type @@ -140,8 +140,8 @@ $apiInstance = new SeaTable\Client\User\ActivitiesLogsApi( $config ); $base_uuid = 5c264e76-0e5a-448a-9f34-580b551364ca; // string | The unique identifier of a base. Sometimes also called dtable_uuid. -$page = 1; // int -$per_page = 2; // int +$page = 1; // int | Page number of results to return. Default is 1. +$per_page = 2; // int | Number of results per page. try { $result = $apiInstance->getBigDataOperationLogs($base_uuid, $page, $per_page); @@ -156,8 +156,8 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **base_uuid** | **string**| The unique identifier of a base. Sometimes also called dtable_uuid. | | -| **page** | **int**| | [optional] | -| **per_page** | **int**| | [optional] | +| **page** | **int**| Page number of results to return. Default is 1. | [optional] | +| **per_page** | **int**| Number of results per page. | [optional] | ### Return type diff --git a/docs/User/Api/AppsApi.md b/docs/User/Api/AppsApi.md index 8855e309..8735ff14 100644 --- a/docs/User/Api/AppsApi.md +++ b/docs/User/Api/AppsApi.md @@ -33,7 +33,7 @@ $apiInstance = new SeaTable\Client\User\AppsApi( new GuzzleHttp\Client(), $config ); -$app_token = 8254d58e-6a67-45ab-be37-87939d80e99f; // string +$app_token = 8254d58e-6a67-45ab-be37-87939d80e99f; // string | The token of the universal app. $is_inactive = new \SeaTable\Client\User\IsInactive(); // \SeaTable\Client\User\IsInactive try { @@ -47,7 +47,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **app_token** | **string**| | | +| **app_token** | **string**| The token of the universal app. | | | **is_inactive** | [**\SeaTable\Client\User\IsInactive**](../Model/IsInactive.md)| | [optional] | ### Return type @@ -69,7 +69,7 @@ importUsersToApp($app_token, $import_users_to_app_request) Import Users to App -Hier muss noch eine Beschreibung ergänzt werden +Imports multiple users to a universal app in a single batch operation. ### Example @@ -83,7 +83,7 @@ $apiInstance = new SeaTable\Client\User\AppsApi( new GuzzleHttp\Client(), $config ); -$app_token = 8254d58e-6a67-45ab-be37-87939d80e99f; // string +$app_token = 8254d58e-6a67-45ab-be37-87939d80e99f; // string | The token of the universal app. $import_users_to_app_request = new \SeaTable\Client\User\ImportUsersToAppRequest(); // \SeaTable\Client\User\ImportUsersToAppRequest try { @@ -97,7 +97,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **app_token** | **string**| | | +| **app_token** | **string**| The token of the universal app. | | | **import_users_to_app_request** | [**\SeaTable\Client\User\ImportUsersToAppRequest**](../Model/ImportUsersToAppRequest.md)| | [optional] | ### Return type @@ -119,7 +119,7 @@ listAppInviteLinks($app_token) List App Invite Links -Hier muss noch eine Beschreibung ergänzt werden +Lists all invite links for a specific universal app. ### Example @@ -133,7 +133,7 @@ $apiInstance = new SeaTable\Client\User\AppsApi( new GuzzleHttp\Client(), $config ); -$app_token = 8254d58e-6a67-45ab-be37-87939d80e99f; // string +$app_token = 8254d58e-6a67-45ab-be37-87939d80e99f; // string | The token of the universal app. try { $apiInstance->listAppInviteLinks($app_token); @@ -146,7 +146,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **app_token** | **string**| | | +| **app_token** | **string**| The token of the universal app. | | ### Return type @@ -167,7 +167,7 @@ listApps(): object List Apps -Hier muss noch eine Beschreibung ergänzt werden +Lists all universal apps that you manage or have access to. ### Example @@ -213,7 +213,7 @@ listUniversalAppUsers($app_token) List Universal App Users -Hier muss noch eine Beschreibung ergänzt werden +Lists all users of a specific universal app. ### Example @@ -227,7 +227,7 @@ $apiInstance = new SeaTable\Client\User\AppsApi( new GuzzleHttp\Client(), $config ); -$app_token = 8254d58e-6a67-45ab-be37-87939d80e99f; // string +$app_token = 8254d58e-6a67-45ab-be37-87939d80e99f; // string | The token of the universal app. try { $apiInstance->listUniversalAppUsers($app_token); @@ -240,7 +240,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **app_token** | **string**| | | +| **app_token** | **string**| The token of the universal app. | | ### Return type diff --git a/docs/User/Api/AttachmentApi.md b/docs/User/Api/AttachmentApi.md index 4dd7754b..926d149e 100644 --- a/docs/User/Api/AttachmentApi.md +++ b/docs/User/Api/AttachmentApi.md @@ -37,7 +37,7 @@ $apiInstance = new SeaTable\Client\User\AttachmentApi( ); $workspace_id = 127; // int | id of your workspace. $base_name = My Projects; // string | name of your base. -$path = /files/2021-01/abc.jpg; // string +$path = /files/2021-01/abc.jpg; // string | The file path relative to the asset directory. try { $result = $apiInstance->checkIfAssetExists($workspace_id, $base_name, $path); @@ -53,7 +53,7 @@ try { | ------------- | ------------- | ------------- | ------------- | | **workspace_id** | **int**| id of your workspace. | | | **base_name** | **string**| name of your base. | | -| **path** | **string**| | [optional] | +| **path** | **string**| The file path relative to the asset directory. | [optional] | ### Return type @@ -89,7 +89,7 @@ $apiInstance = new SeaTable\Client\User\AttachmentApi( $config ); $base_uuid = 5c264e76-0e5a-448a-9f34-580b551364ca; // string | The unique identifier of a base. Sometimes also called dtable_uuid. -$path = /files/2021-01/abc.jpg; // string +$path = /files/2021-01/abc.jpg; // string | The file path relative to the asset directory. try { $result = $apiInstance->deleteBaseAsset($base_uuid, $path); @@ -104,7 +104,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **base_uuid** | **string**| The unique identifier of a base. Sometimes also called dtable_uuid. | | -| **path** | **string**| | [optional] | +| **path** | **string**| The file path relative to the asset directory. | [optional] | ### Return type @@ -169,7 +169,7 @@ AccountTokenAuth ## `getBaseAttachmentUploadLink()` ```php -getBaseAttachmentUploadLink($workspace_id, $base_name): object +getBaseAttachmentUploadLink($workspace_id, $base_name): \SeaTable\Client\User\GetBaseAttachmentUploadLink200Response ``` Get Base Attachment Upload Link @@ -208,7 +208,7 @@ try { ### Return type -**object** +[**\SeaTable\Client\User\GetBaseAttachmentUploadLink200Response**](../Model/GetBaseAttachmentUploadLink200Response.md) ### Authorization @@ -240,7 +240,7 @@ $apiInstance = new SeaTable\Client\User\AttachmentApi( $config ); $base_uuid = 5c264e76-0e5a-448a-9f34-580b551364ca; // string | The unique identifier of a base. Sometimes also called dtable_uuid. -$parent_dir = /; // string +$parent_dir = /; // string | The parent directory path. try { $result = $apiInstance->listBaseAssets($base_uuid, $parent_dir); @@ -255,7 +255,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **base_uuid** | **string**| The unique identifier of a base. Sometimes also called dtable_uuid. | | -| **parent_dir** | **string**| | [optional] | +| **parent_dir** | **string**| The parent directory path. | [optional] | ### Return type diff --git a/docs/User/Api/AutomationsApi.md b/docs/User/Api/AutomationsApi.md index 2d0f5e1d..12a876bf 100644 --- a/docs/User/Api/AutomationsApi.md +++ b/docs/User/Api/AutomationsApi.md @@ -13,7 +13,7 @@ All URIs are relative to https://cloud.seatable.io, except if the operation defi ## `createAutomationRule()` ```php -createAutomationRule($workspace_id, $base_name, $create_automation_rule_request): object +createAutomationRule($workspace_id, $base_name, $create_automation_rule_request): \SeaTable\Client\User\CreateAutomationRule200Response ``` Create Automation Rule @@ -54,7 +54,7 @@ try { ### Return type -**object** +[**\SeaTable\Client\User\CreateAutomationRule200Response**](../Model/CreateAutomationRule200Response.md) ### Authorization @@ -87,7 +87,7 @@ $apiInstance = new SeaTable\Client\User\AutomationsApi( ); $workspace_id = 127; // int | id of your workspace. $base_name = My Projects; // string | name of your base. -$automation_rule_id = 20; // int +$automation_rule_id = 20; // int | The ID of the automation rule. try { $result = $apiInstance->deleteAutomationRule($workspace_id, $base_name, $automation_rule_id); @@ -103,7 +103,7 @@ try { | ------------- | ------------- | ------------- | ------------- | | **workspace_id** | **int**| id of your workspace. | | | **base_name** | **string**| name of your base. | | -| **automation_rule_id** | **int**| | | +| **automation_rule_id** | **int**| The ID of the automation rule. | | ### Return type @@ -170,7 +170,7 @@ AccountTokenAuth ## `updateAutomationRule()` ```php -updateAutomationRule($workspace_id, $base_name, $automation_rule_id, $create_automation_rule_request): object +updateAutomationRule($workspace_id, $base_name, $automation_rule_id, $create_automation_rule_request): \SeaTable\Client\User\CreateAutomationRule200Response ``` Update Automation Rule @@ -191,7 +191,7 @@ $apiInstance = new SeaTable\Client\User\AutomationsApi( ); $workspace_id = 127; // int | id of your workspace. $base_name = My Projects; // string | name of your base. -$automation_rule_id = 20; // int +$automation_rule_id = 20; // int | The ID of the automation rule. $create_automation_rule_request = new \SeaTable\Client\User\CreateAutomationRuleRequest(); // \SeaTable\Client\User\CreateAutomationRuleRequest try { @@ -208,12 +208,12 @@ try { | ------------- | ------------- | ------------- | ------------- | | **workspace_id** | **int**| id of your workspace. | | | **base_name** | **string**| name of your base. | | -| **automation_rule_id** | **int**| | | +| **automation_rule_id** | **int**| The ID of the automation rule. | | | **create_automation_rule_request** | [**\SeaTable\Client\User\CreateAutomationRuleRequest**](../Model/CreateAutomationRuleRequest.md)| | [optional] | ### Return type -**object** +[**\SeaTable\Client\User\CreateAutomationRule200Response**](../Model/CreateAutomationRule200Response.md) ### Authorization diff --git a/docs/User/Api/BasesApi.md b/docs/User/Api/BasesApi.md index f45de3c8..1b15ca30 100644 --- a/docs/User/Api/BasesApi.md +++ b/docs/User/Api/BasesApi.md @@ -19,7 +19,7 @@ All URIs are relative to https://cloud.seatable.io, except if the operation defi | [**moveBaseIntoFolder()**](BasesApi.md#moveBaseIntoFolder) | **POST** /api/v2.1/workspace/{workspace_id}/folder-item-moving/ | Move Base into Folder | | [**restoreGroupTrashedBase()**](BasesApi.md#restoreGroupTrashedBase) | **PUT** /api/v2.1/groups/{group_id}/trash-dtables/{base_uuid}/ | Restore Group Trashed Base | | [**restoreTrashedBase()**](BasesApi.md#restoreTrashedBase) | **PUT** /api/v2.1/trash-dtables/{trashed_base_id}/ | Restore Trashed Base | -| [**searchBaseOrApps()**](BasesApi.md#searchBaseOrApps) | **GET** /api/v2.1/dtable/items-search/ | Search base or apps | +| [**searchBaseOrApps()**](BasesApi.md#searchBaseOrApps) | **GET** /api/v2.1/dtable/items-search/ | Search Base or Apps | | [**unfavoriteBase()**](BasesApi.md#unfavoriteBase) | **DELETE** /api/v2.1/starred-dtables/ | Unfavorite Base | | [**updateBase()**](BasesApi.md#updateBase) | **PUT** /api/v2.1/workspace/{workspace_id}/dtable/ | Update Base | | [**updateFolder()**](BasesApi.md#updateFolder) | **PUT** /api/v2.1/workspace/{workspace_id}/folders/{folder_id}/ | Update Folder | @@ -304,7 +304,7 @@ $apiInstance = new SeaTable\Client\User\BasesApi( $config ); $workspace_id = 127; // int | id of your workspace. -$folder_id = 'folder_id_example'; // string +$folder_id = 'folder_id_example'; // string | The ID of the folder. try { $result = $apiInstance->deleteFolder($workspace_id, $folder_id); @@ -319,7 +319,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **workspace_id** | **int**| id of your workspace. | | -| **folder_id** | **string**| | | +| **folder_id** | **string**| The ID of the folder. | | ### Return type @@ -544,7 +544,7 @@ $apiInstance = new SeaTable\Client\User\BasesApi( new GuzzleHttp\Client(), $config ); -$group_id = 1; // int +$group_id = 1; // int | The ID of the group. try { $result = $apiInstance->listGroupTrashedBases($group_id); @@ -558,7 +558,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **group_id** | **int**| | | +| **group_id** | **int**| The ID of the group. | | ### Return type @@ -593,8 +593,8 @@ $apiInstance = new SeaTable\Client\User\BasesApi( new GuzzleHttp\Client(), $config ); -$page = 1; // int -$per_page = 2; // int +$page = 1; // int | Page number of results to return. Default is 1. +$per_page = 2; // int | Number of results per page. try { $result = $apiInstance->listTrashedBases($page, $per_page); @@ -608,8 +608,8 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **page** | **int**| | [optional] | -| **per_page** | **int**| | [optional] | +| **page** | **int**| Page number of results to return. Default is 1. | [optional] | +| **per_page** | **int**| Number of results per page. | [optional] | ### Return type @@ -701,7 +701,7 @@ $apiInstance = new SeaTable\Client\User\BasesApi( new GuzzleHttp\Client(), $config ); -$group_id = 1; // int +$group_id = 1; // int | The ID of the group. $base_uuid = 5c264e76-0e5a-448a-9f34-580b551364ca; // string | The unique identifier of a base. Sometimes also called dtable_uuid. try { @@ -716,7 +716,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **group_id** | **int**| | | +| **group_id** | **int**| The ID of the group. | | | **base_uuid** | **string**| The unique identifier of a base. Sometimes also called dtable_uuid. | | ### Return type @@ -785,7 +785,7 @@ AccountTokenAuth searchBaseOrApps($query_str, $query_type): object ``` -Search base or apps +Search Base or Apps Search the base or apps of a user. Capitalization is irrelevant for the search and substrings are also allowed. @@ -802,7 +802,7 @@ $apiInstance = new SeaTable\Client\User\BasesApi( $config ); $query_str = test; // string | Search string. Substrings are allowed and capitalization does not matter. -$query_type = 'query_type_example'; // string +$query_type = 'query_type_example'; // string | Filter the search by type. Use `base` to search only bases or `app` to search only apps. try { $result = $apiInstance->searchBaseOrApps($query_str, $query_type); @@ -817,7 +817,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **query_str** | **string**| Search string. Substrings are allowed and capitalization does not matter. | [optional] | -| **query_type** | **string**| | [optional] | +| **query_type** | **string**| Filter the search by type. Use `base` to search only bases or `app` to search only apps. | [optional] | ### Return type @@ -959,7 +959,7 @@ $apiInstance = new SeaTable\Client\User\BasesApi( $config ); $workspace_id = 127; // int | id of your workspace. -$folder_id = 'folder_id_example'; // string +$folder_id = 'folder_id_example'; // string | The ID of the folder. $name = 'name_example'; // string | Name of your folder. If the name already exists in the workspace, the system will add a \\\"(1)\\\" to it. try { @@ -975,7 +975,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **workspace_id** | **int**| id of your workspace. | | -| **folder_id** | **string**| | | +| **folder_id** | **string**| The ID of the folder. | | | **name** | **string**| Name of your folder. If the name already exists in the workspace, the system will add a \\\"(1)\\\" to it. | [optional] | ### Return type diff --git a/docs/User/Api/CommonDatasetApi.md b/docs/User/Api/CommonDatasetApi.md index 1de220cb..9af9ff01 100644 --- a/docs/User/Api/CommonDatasetApi.md +++ b/docs/User/Api/CommonDatasetApi.md @@ -68,7 +68,7 @@ AccountTokenAuth ## `getCommonDataset()` ```php -getCommonDataset($dataset_id): object +getCommonDataset($dataset_id): \SeaTable\Client\User\GetCommonDataset200Response ``` Get Common Dataset @@ -105,7 +105,7 @@ try { ### Return type -**object** +[**\SeaTable\Client\User\GetCommonDataset200Response**](../Model/GetCommonDataset200Response.md) ### Authorization @@ -186,7 +186,7 @@ $apiInstance = new SeaTable\Client\User\CommonDatasetApi( $config ); $dataset_id = 5; // int | The ID of the common dataset. When you e.g. publish a common dataset from a view, the returned `id` is what you need here. -$dst_dtable_uuid = 'dst_dtable_uuid_example'; // string | The name of the base. +$dst_dtable_uuid = 'dst_dtable_uuid_example'; // string | The UUID of the base. try { $result = $apiInstance->importCommonDataset($dataset_id, $dst_dtable_uuid); @@ -201,7 +201,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **dataset_id** | **int**| The ID of the common dataset. When you e.g. publish a common dataset from a view, the returned `id` is what you need here. | | -| **dst_dtable_uuid** | **string**| The name of the base. | [optional] | +| **dst_dtable_uuid** | **string**| The UUID of the base. | [optional] | ### Return type @@ -317,7 +317,7 @@ AccountTokenAuth ## `publishCommonDataset()` ```php -publishCommonDataset($dataset_name, $workspace_id, $dtable_name, $table_name, $view_name): object +publishCommonDataset($dataset_name, $workspace_id, $dtable_name, $table_name, $view_name): \SeaTable\Client\User\PublishCommonDataset200Response ``` Publish Common Dataset @@ -362,7 +362,7 @@ try { ### Return type -**object** +[**\SeaTable\Client\User\PublishCommonDataset200Response**](../Model/PublishCommonDataset200Response.md) ### Authorization diff --git a/docs/User/Api/EmailAccountsApi.md b/docs/User/Api/EmailAccountsApi.md index 1d89e639..e0c46a1d 100644 --- a/docs/User/Api/EmailAccountsApi.md +++ b/docs/User/Api/EmailAccountsApi.md @@ -86,7 +86,7 @@ $apiInstance = new SeaTable\Client\User\EmailAccountsApi( $config ); $base_uuid = 5c264e76-0e5a-448a-9f34-580b551364ca; // string | The unique identifier of a base. Sometimes also called dtable_uuid. -$_3rd_party_account_id = 5; // string +$_3rd_party_account_id = 5; // string | The ID of the third-party account. try { $result = $apiInstance->deleteEmailAccount($base_uuid, $_3rd_party_account_id); @@ -101,7 +101,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **base_uuid** | **string**| The unique identifier of a base. Sometimes also called dtable_uuid. | | -| **_3rd_party_account_id** | **string**| | | +| **_3rd_party_account_id** | **string**| The ID of the third-party account. | | ### Return type @@ -117,7 +117,7 @@ AccountTokenAuth ## `getEmailAccount()` ```php -getEmailAccount($base_uuid, $account_name) +getEmailAccount($base_uuid, $account_name): object ``` Get Email Account @@ -137,10 +137,11 @@ $apiInstance = new SeaTable\Client\User\EmailAccountsApi( $config ); $base_uuid = 5c264e76-0e5a-448a-9f34-580b551364ca; // string | The unique identifier of a base. Sometimes also called dtable_uuid. -$account_name = Email Server2; // string +$account_name = Email Server2; // string | The name of the third-party email account. try { - $apiInstance->getEmailAccount($base_uuid, $account_name); + $result = $apiInstance->getEmailAccount($base_uuid, $account_name); + print_r($result); } catch (Exception $e) { echo 'Exception when calling EmailAccountsApi->getEmailAccount: ', $e->getMessage(), PHP_EOL; } @@ -151,11 +152,11 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **base_uuid** | **string**| The unique identifier of a base. Sometimes also called dtable_uuid. | | -| **account_name** | **string**| | [optional] | +| **account_name** | **string**| The name of the third-party email account. | [optional] | ### Return type -void (empty response body) +**object** ### Authorization @@ -285,7 +286,7 @@ $apiInstance = new SeaTable\Client\User\EmailAccountsApi( $config ); $base_uuid = 5c264e76-0e5a-448a-9f34-580b551364ca; // string | The unique identifier of a base. Sometimes also called dtable_uuid. -$_3rd_party_account_id = 5; // string +$_3rd_party_account_id = 5; // string | The ID of the third-party account. $add_email_account_request = new \SeaTable\Client\User\AddEmailAccountRequest(); // \SeaTable\Client\User\AddEmailAccountRequest try { @@ -301,7 +302,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **base_uuid** | **string**| The unique identifier of a base. Sometimes also called dtable_uuid. | | -| **_3rd_party_account_id** | **string**| | | +| **_3rd_party_account_id** | **string**| The ID of the third-party account. | | | **add_email_account_request** | [**\SeaTable\Client\User\AddEmailAccountRequest**](../Model/AddEmailAccountRequest.md)| | [optional] | ### Return type diff --git a/docs/User/Api/FormsApi.md b/docs/User/Api/FormsApi.md index 09ddb00c..371c78d2 100644 --- a/docs/User/Api/FormsApi.md +++ b/docs/User/Api/FormsApi.md @@ -88,7 +88,7 @@ $apiInstance = new SeaTable\Client\User\FormsApi( new GuzzleHttp\Client(), $config ); -$form_token = 12345678-d378-4c12-8d7a-6da0fb48ee83; // string +$form_token = 12345678-d378-4c12-8d7a-6da0fb48ee83; // string | The token of the form. try { $result = $apiInstance->deleteForm($form_token); @@ -102,7 +102,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **form_token** | **string**| | | +| **form_token** | **string**| The token of the form. | | ### Return type @@ -137,7 +137,7 @@ $apiInstance = new SeaTable\Client\User\FormsApi( new GuzzleHttp\Client(), $config ); -$form_token = 12345678-d378-4c12-8d7a-6da0fb48ee83; // string +$form_token = 12345678-d378-4c12-8d7a-6da0fb48ee83; // string | The token of the form. try { $result = $apiInstance->duplicateForm($form_token); @@ -151,7 +151,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **form_token** | **string**| | | +| **form_token** | **string**| The token of the form. | | ### Return type @@ -283,7 +283,7 @@ $apiInstance = new SeaTable\Client\User\FormsApi( new GuzzleHttp\Client(), $config ); -$form_token = 12345678-d378-4c12-8d7a-6da0fb48ee83; // string +$form_token = 12345678-d378-4c12-8d7a-6da0fb48ee83; // string | The token of the form. $form_config = 'form_config_example'; // string | Define the form's name (required) and other details (optional). For a full list of available options, refer to the instruction above. try { @@ -298,7 +298,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **form_token** | **string**| | | +| **form_token** | **string**| The token of the form. | | | **form_config** | **string**| Define the form's name (required) and other details (optional). For a full list of available options, refer to the instruction above. | [optional] | ### Return type @@ -334,7 +334,7 @@ $apiInstance = new SeaTable\Client\User\FormsApi( new GuzzleHttp\Client(), $config ); -$form_token = 12345678-d378-4c12-8d7a-6da0fb48ee83; // string +$form_token = 12345678-d378-4c12-8d7a-6da0fb48ee83; // string | The token of the form. $form_logo = '/path/to/file.txt'; // \SplFileObject | Path and file name to your logo image. try { @@ -349,7 +349,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **form_token** | **string**| | | +| **form_token** | **string**| The token of the form. | | | **form_logo** | **\SplFileObject****\SplFileObject**| Path and file name to your logo image. | [optional] | ### Return type diff --git a/docs/User/Api/GroupsWorkspacesApi.md b/docs/User/Api/GroupsWorkspacesApi.md index e720b0b2..0a85e937 100644 --- a/docs/User/Api/GroupsWorkspacesApi.md +++ b/docs/User/Api/GroupsWorkspacesApi.md @@ -23,11 +23,13 @@ All URIs are relative to https://cloud.seatable.io, except if the operation defi ## `addGroupMember()` ```php -addGroupMember($group_id, $add_group_member_request): object +addGroupMember($group_id, $add_group_member_request): \SeaTable\Client\User\AddGroupMember201Response ``` Add Group Member +Add a user to a group as a member. + ### Example ```php @@ -40,7 +42,7 @@ $apiInstance = new SeaTable\Client\User\GroupsWorkspacesApi( new GuzzleHttp\Client(), $config ); -$group_id = 1; // int +$group_id = 1; // int | The ID of the group. $add_group_member_request = new \SeaTable\Client\User\AddGroupMemberRequest(); // \SeaTable\Client\User\AddGroupMemberRequest try { @@ -55,12 +57,12 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **group_id** | **int**| | | +| **group_id** | **int**| The ID of the group. | | | **add_group_member_request** | [**\SeaTable\Client\User\AddGroupMemberRequest**](../Model/AddGroupMemberRequest.md)| | [optional] | ### Return type -**object** +[**\SeaTable\Client\User\AddGroupMember201Response**](../Model/AddGroupMember201Response.md) ### Authorization @@ -183,6 +185,8 @@ createGroup($create_group_request): object Create Group +Create a new group. The user who creates the group becomes its owner. + ### Example ```php @@ -230,7 +234,7 @@ deleteGroup($group_id): object Delete Group -Delete a group with its ID. +Delete a group with its ID. > 🚧 Group must be empty > > A group can only be deleted if it contains no bases. Delete or move all bases out of the group first, otherwise the API returns `400` with `\"Cannot delete group with bases\"`. ### Example @@ -244,7 +248,7 @@ $apiInstance = new SeaTable\Client\User\GroupsWorkspacesApi( new GuzzleHttp\Client(), $config ); -$group_id = 1; // int +$group_id = 1; // int | The ID of the group. try { $result = $apiInstance->deleteGroup($group_id); @@ -258,7 +262,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **group_id** | **int**| | | +| **group_id** | **int**| The ID of the group. | | ### Return type @@ -279,6 +283,8 @@ getGroup($group_id): object Get Group +Get the details of a specific group including its name, owner, and admins. + ### Example ```php @@ -291,7 +297,7 @@ $apiInstance = new SeaTable\Client\User\GroupsWorkspacesApi( new GuzzleHttp\Client(), $config ); -$group_id = 1; // int +$group_id = 1; // int | The ID of the group. try { $result = $apiInstance->getGroup($group_id); @@ -305,7 +311,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **group_id** | **int**| | | +| **group_id** | **int**| The ID of the group. | | ### Return type @@ -321,11 +327,13 @@ AccountTokenAuth ## `getGroupMembers()` ```php -getGroupMembers($group_id): object +getGroupMembers($group_id): \SeaTable\Client\User\GetGroupMembers200ResponseInner[] ``` Get Group Members +List all members of a group along with their roles. + ### Example ```php @@ -338,7 +346,7 @@ $apiInstance = new SeaTable\Client\User\GroupsWorkspacesApi( new GuzzleHttp\Client(), $config ); -$group_id = 1; // int +$group_id = 1; // int | The ID of the group. try { $result = $apiInstance->getGroupMembers($group_id); @@ -352,11 +360,11 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **group_id** | **int**| | | +| **group_id** | **int**| The ID of the group. | | ### Return type -**object** +[**\SeaTable\Client\User\GetGroupMembers200ResponseInner[]**](../Model/GetGroupMembers200ResponseInner.md) ### Authorization @@ -482,8 +490,8 @@ $apiInstance = new SeaTable\Client\User\GroupsWorkspacesApi( new GuzzleHttp\Client(), $config ); -$group_id = 1; // int -$group_member = 12345678-d378-4c12-8d7a-6da0fb48ee83; // string +$group_id = 1; // int | The ID of the group. +$group_member = 12345678d3784c128d7a6da0fb48ee83@auth.local; // string | The unique user ID of the group member. try { $result = $apiInstance->removeGroupMember($group_id, $group_member); @@ -497,8 +505,8 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **group_id** | **int**| | | -| **group_member** | **string**| | | +| **group_id** | **int**| The ID of the group. | | +| **group_member** | **string**| The unique user ID of the group member. | | ### Return type @@ -514,7 +522,7 @@ AccountTokenAuth ## `searchGroup()` ```php -searchGroup($q): object +searchGroup($q): \SeaTable\Client\User\SearchGroup200ResponseInner[] ``` Search Group @@ -533,7 +541,7 @@ $apiInstance = new SeaTable\Client\User\GroupsWorkspacesApi( new GuzzleHttp\Client(), $config ); -$q = Micha; // string +$q = Micha; // string | Search query string. Matches against group name. try { $result = $apiInstance->searchGroup($q); @@ -547,11 +555,11 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **q** | **string**| | [optional] | +| **q** | **string**| Search query string. Matches against group name. | [optional] | ### Return type -**object** +[**\SeaTable\Client\User\SearchGroup200ResponseInner[]**](../Model/SearchGroup200ResponseInner.md) ### Authorization @@ -568,7 +576,7 @@ searchGroupMembers($group_id, $q): object Search Group Members -As a group's administrator, you can use this API call to search for members in this group. Just give a search keyword in the `q` param. Attention: Although a fussy search is allowed, unlike the web interface, the search via API is still case sensitive! A successful search will return each member's details that fit to your search criteria. See example. +As a group's administrator, you can use this API call to search for members in this group. Just give a search keyword in the `q` param. Attention: Although a fuzzy search is allowed, unlike the web interface, the search via API is still case sensitive! A successful search will return each member's details that fit to your search criteria. See example. ### Example @@ -582,8 +590,8 @@ $apiInstance = new SeaTable\Client\User\GroupsWorkspacesApi( new GuzzleHttp\Client(), $config ); -$group_id = 1; // int -$q = Micha; // string +$group_id = 1; // int | The ID of the group. +$q = Micha; // string | Search query string. Matches against member name or email. try { $result = $apiInstance->searchGroupMembers($group_id, $q); @@ -597,8 +605,8 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **group_id** | **int**| | | -| **q** | **string**| | [optional] | +| **group_id** | **int**| The ID of the group. | | +| **q** | **string**| Search query string. Matches against member name or email. | [optional] | ### Return type @@ -614,12 +622,12 @@ AccountTokenAuth ## `updateGroup()` ```php -updateGroup($group_id, $update_group_request): object +updateGroup($group_id, $update_group_request): \SeaTable\Client\User\UpdateGroup200Response ``` Update Group -Use this request to rename, and/or change owner of a group. In the request body, both parameters are optional. Only use the ones that you need to update: * `owner` is the new owner of the group, include the user's ID here. If you don't want to change the owner, remove this parameter because if you enter the current owner's ID here, you'll get an error \"User xxx is already group owner\". * `name` is the new name of your group. If you don't want to change the name, remove shi parameter because if you enter the current group name here you'll get an error \"There is already a group with that name\". +Use this request to rename, and/or change owner of a group. In the request body, both parameters are optional. Only use the ones that you need to update: * `owner` is the new owner of the group, include the user's ID here. If you don't want to change the owner, remove this parameter because if you enter the current owner's ID here, you'll get an error \"User xxx is already group owner\". * `name` is the new name of your group. If you don't want to change the name, remove this parameter because if you enter the current group name here you'll get an error \"There is already a group with that name\". ### Example @@ -633,7 +641,7 @@ $apiInstance = new SeaTable\Client\User\GroupsWorkspacesApi( new GuzzleHttp\Client(), $config ); -$group_id = 1; // int +$group_id = 1; // int | The ID of the group. $update_group_request = new \SeaTable\Client\User\UpdateGroupRequest(); // \SeaTable\Client\User\UpdateGroupRequest try { @@ -648,12 +656,12 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **group_id** | **int**| | | +| **group_id** | **int**| The ID of the group. | | | **update_group_request** | [**\SeaTable\Client\User\UpdateGroupRequest**](../Model/UpdateGroupRequest.md)| | [optional] | ### Return type -**object** +[**\SeaTable\Client\User\UpdateGroup200Response**](../Model/UpdateGroup200Response.md) ### Authorization @@ -670,6 +678,8 @@ updateGroupRole($group_id, $group_member, $update_group_role_request): object Update Group Role +Update the role of a group member, for example to promote or demote an admin. + ### Example ```php @@ -682,8 +692,8 @@ $apiInstance = new SeaTable\Client\User\GroupsWorkspacesApi( new GuzzleHttp\Client(), $config ); -$group_id = 1; // int -$group_member = 12345678-d378-4c12-8d7a-6da0fb48ee83; // string +$group_id = 1; // int | The ID of the group. +$group_member = 12345678d3784c128d7a6da0fb48ee83@auth.local; // string | The unique user ID of the group member. $update_group_role_request = new \SeaTable\Client\User\UpdateGroupRoleRequest(); // \SeaTable\Client\User\UpdateGroupRoleRequest try { @@ -698,8 +708,8 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **group_id** | **int**| | | -| **group_member** | **string**| | | +| **group_id** | **int**| The ID of the group. | | +| **group_member** | **string**| The unique user ID of the group member. | | | **update_group_role_request** | [**\SeaTable\Client\User\UpdateGroupRoleRequest**](../Model/UpdateGroupRoleRequest.md)| | [optional] | ### Return type diff --git a/docs/User/Api/ImportExportApi.md b/docs/User/Api/ImportExportApi.md index 6bfb642a..c5f35858 100644 --- a/docs/User/Api/ImportExportApi.md +++ b/docs/User/Api/ImportExportApi.md @@ -13,7 +13,7 @@ All URIs are relative to https://cloud.seatable.io, except if the operation defi | [**importBasefromDTableFile()**](ImportExportApi.md#importBasefromDTableFile) | **POST** /api/v2.1/workspace/{workspace_id}/import-dtable/ | Import Base from dtable file | | [**importBasefromFile()**](ImportExportApi.md#importBasefromFile) | **POST** /api/v2.1/workspace/{workspace_id}/synchronous-import/import-excel-csv-to-base/ | Import Base from xlsx or csv | | [**importTableFromFile()**](ImportExportApi.md#importTableFromFile) | **POST** /api/v2.1/workspace/{workspace_id}/synchronous-import/import-excel-csv-to-table/ | Import Table from xlsx or csv | -| [**updateFromFile()**](ImportExportApi.md#updateFromFile) | **POST** /api/v2.1/workspace/{workspace_id}/synchronous-import/update-table-via-excel-csv/ | Update from xlsx or csv | +| [**updateFromFile()**](ImportExportApi.md#updateFromFile) | **POST** /api/v2.1/workspace/{workspace_id}/synchronous-import/update-table-via-excel-csv/ | Update from XLSX or CSV | ## `appendToTableFromFile()` @@ -24,7 +24,7 @@ appendToTableFromFile($workspace_id, $file, $dtable_uuid, $table_name): object Append Excel CSV -Hier muss noch eine Beschreibung ergänzt werden. +Appends rows from an uploaded Excel or CSV file to an existing table. ### Example @@ -79,6 +79,8 @@ exportBase($dtable_name, $workspace_id, $password, $ignore_asset) Export Base +Export a base as a .dtable file. Optionally exclude assets or provide a base password for encrypted bases. + ### Example ```php @@ -91,7 +93,7 @@ $apiInstance = new SeaTable\Client\User\ImportExportApi( new GuzzleHttp\Client(), $config ); -$dtable_name = Example; // string +$dtable_name = Example; // string | The name of the base to search for. $workspace_id = 127; // int | id of your workspace. $password = 'password_example'; // string | The password of your Base. $ignore_asset = false; // bool | Set this to `true` to export the base without assets. Default is `false`. @@ -107,7 +109,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **dtable_name** | **string**| | | +| **dtable_name** | **string**| The name of the base to search for. | | | **workspace_id** | **int**| id of your workspace. | | | **password** | **string**| The password of your Base. | [optional] | | **ignore_asset** | **bool**| Set this to `true` to export the base without assets. Default is `false`. | [optional] | @@ -141,7 +143,7 @@ require_once(__DIR__ . '/vendor/autoload.php'); $apiInstance = new SeaTable\Client\User\ImportExportApi( new GuzzleHttp\Client() ); -$external_link_token = f84903f9aa454a2481f3; // string +$external_link_token = f84903f9aa454a2481f3; // string | The token of the external link. try { $apiInstance->exportBaseFromExternalLink($external_link_token); @@ -154,7 +156,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **external_link_token** | **string**| | | +| **external_link_token** | **string**| The token of the external link. | | ### Return type @@ -174,7 +176,7 @@ exportBigDataView($workspace_id, $base_name, $table_id, $view_id) Export Big Data View to Excel -Hier muss noch eine Beschreibung ergänzt werden +Exports a big data view as an Excel file. Returns a task ID that can be used to track the export progress. ### Example @@ -228,6 +230,8 @@ exportTable($table_id, $table_name, $dtable_name, $workspace_id) Export Table +Export a single table from a base to an Excel file. + ### Example ```php @@ -242,7 +246,7 @@ $apiInstance = new SeaTable\Client\User\ImportExportApi( ); $table_id = 0000; // string | The id of the table. The id of a table is unique inside a base and is often used to identify a table. **Important: the table_id is not the table_name**. $table_name = Table1; // string | The name of the table. -$dtable_name = Example; // string +$dtable_name = Example; // string | The name of the base to search for. $workspace_id = 127; // int | id of your workspace. try { @@ -258,7 +262,7 @@ try { | ------------- | ------------- | ------------- | ------------- | | **table_id** | **string**| The id of the table. The id of a table is unique inside a base and is often used to identify a table. **Important: the table_id is not the table_name**. | | | **table_name** | **string**| The name of the table. | | -| **dtable_name** | **string**| | | +| **dtable_name** | **string**| The name of the base to search for. | | | **workspace_id** | **int**| id of your workspace. | | ### Return type @@ -280,6 +284,8 @@ exportView($table_id, $table_name, $dtable_name, $view_id, $view_name, $workspac Export View +Export a specific view of a table from a base to an Excel file. + ### Example ```php @@ -294,7 +300,7 @@ $apiInstance = new SeaTable\Client\User\ImportExportApi( ); $table_id = 0000; // string | The id of the table. The id of a table is unique inside a base and is often used to identify a table. **Important: the table_id is not the table_name**. $table_name = Table1; // string | The name of the table. -$dtable_name = Example; // string +$dtable_name = Example; // string | The name of the base to search for. $view_id = Jz4d; // string | id of view, string $view_name = Default View; // string | name of view, required, string $workspace_id = 127; // int | id of your workspace. @@ -312,7 +318,7 @@ try { | ------------- | ------------- | ------------- | ------------- | | **table_id** | **string**| The id of the table. The id of a table is unique inside a base and is often used to identify a table. **Important: the table_id is not the table_name**. | | | **table_name** | **string**| The name of the table. | | -| **dtable_name** | **string**| | | +| **dtable_name** | **string**| The name of the base to search for. | | | **view_id** | **string**| id of view, string | | | **view_name** | **string**| name of view, required, string | | | **workspace_id** | **int**| id of your workspace. | | @@ -491,7 +497,7 @@ AccountTokenAuth updateFromFile($workspace_id, $file, $dtable_uuid, $table_name, $selected_columns): object ``` -Update from xlsx or csv +Update from XLSX or CSV This API call allows you to update a SeaTable database table by uploading an Excel (xlsx) or CSV file. The uploaded file contains rows with data that should be either matched against existing rows in the table for updates or inserted as new rows if no match is found. Matching is performed based on the columns specified in the `selected_columns` parameter. For each row in the uploaded file, the system checks whether there are existing rows where the values in these selected columns match exactly. If a match is found, the existing row is updated with the new data from the file. If no match exists, the row is added as a new entry. > 📘 Example of the `selected_columns` parameter > > - If one column is specified (e.g., `Name`), the update process finds rows where the value in that column matches the corresponding value in the file. Those rows will be updated; unmatched rows result in new rows being created. > - If multiple columns are specified (e.g., `Name,Age`), all these columns must match exactly for a row to be considered a match and updated. > - Rows not matching on all selected columns are treated as new and will be added to the table. diff --git a/docs/User/Api/NotificationsApi.md b/docs/User/Api/NotificationsApi.md index 5f8fcab4..6e81720e 100644 --- a/docs/User/Api/NotificationsApi.md +++ b/docs/User/Api/NotificationsApi.md @@ -14,7 +14,7 @@ All URIs are relative to https://cloud.seatable.io, except if the operation defi ## `addNotificationRule()` ```php -addNotificationRule($workspace_id, $base_name, $add_notification_rule_request): object +addNotificationRule($workspace_id, $base_name, $add_notification_rule_request): \SeaTable\Client\User\AddNotificationRule200Response ``` Add Notification Rule @@ -55,7 +55,7 @@ try { ### Return type -**object** +[**\SeaTable\Client\User\AddNotificationRule200Response**](../Model/AddNotificationRule200Response.md) ### Authorization @@ -88,7 +88,7 @@ $apiInstance = new SeaTable\Client\User\NotificationsApi( ); $workspace_id = 127; // int | id of your workspace. $base_name = My Projects; // string | name of your base. -$notification_rule_id = 1; // string +$notification_rule_id = 1; // string | The ID of the notification rule. try { $result = $apiInstance->deleteNotificationRule($workspace_id, $base_name, $notification_rule_id); @@ -104,7 +104,7 @@ try { | ------------- | ------------- | ------------- | ------------- | | **workspace_id** | **int**| id of your workspace. | | | **base_name** | **string**| name of your base. | | -| **notification_rule_id** | **string**| | | +| **notification_rule_id** | **string**| The ID of the notification rule. | | ### Return type @@ -217,7 +217,7 @@ AccountTokenAuth ## `updateNotificationRule()` ```php -updateNotificationRule($workspace_id, $base_name, $notification_rule_id, $update_notification_rule_request): object +updateNotificationRule($workspace_id, $base_name, $notification_rule_id, $update_notification_rule_request): \SeaTable\Client\User\AddNotificationRule200Response ``` Update Notification Rule @@ -238,7 +238,7 @@ $apiInstance = new SeaTable\Client\User\NotificationsApi( ); $workspace_id = 127; // int | id of your workspace. $base_name = My Projects; // string | name of your base. -$notification_rule_id = 1; // string +$notification_rule_id = 1; // string | The ID of the notification rule. $update_notification_rule_request = new \SeaTable\Client\User\UpdateNotificationRuleRequest(); // \SeaTable\Client\User\UpdateNotificationRuleRequest try { @@ -255,12 +255,12 @@ try { | ------------- | ------------- | ------------- | ------------- | | **workspace_id** | **int**| id of your workspace. | | | **base_name** | **string**| name of your base. | | -| **notification_rule_id** | **string**| | | +| **notification_rule_id** | **string**| The ID of the notification rule. | | | **update_notification_rule_request** | [**\SeaTable\Client\User\UpdateNotificationRuleRequest**](../Model/UpdateNotificationRuleRequest.md)| | [optional] | ### Return type -**object** +[**\SeaTable\Client\User\AddNotificationRule200Response**](../Model/AddNotificationRule200Response.md) ### Authorization diff --git a/docs/User/Api/SharingApi.md b/docs/User/Api/SharingApi.md index 5a635c1f..8e7bac78 100644 --- a/docs/User/Api/SharingApi.md +++ b/docs/User/Api/SharingApi.md @@ -88,7 +88,7 @@ AccountTokenAuth ## `createGroupViewShare()` ```php -createGroupViewShare($workspace_id, $base_name, $table_id, $view_id, $permission, $to_group_id): object +createGroupViewShare($workspace_id, $base_name, $table_id, $view_id, $permission, $to_group_id): \SeaTable\Client\User\CreateGroupViewShare200Response ``` Create Group View Share @@ -135,7 +135,7 @@ try { ### Return type -**object** +[**\SeaTable\Client\User\CreateGroupViewShare200Response**](../Model/CreateGroupViewShare200Response.md) ### Authorization @@ -202,7 +202,7 @@ AccountTokenAuth ## `createUserViewShare()` ```php -createUserViewShare($workspace_id, $base_name, $permission, $to_user, $table_id, $view_id): object +createUserViewShare($workspace_id, $base_name, $permission, $to_user, $table_id, $view_id): \SeaTable\Client\User\CreateUserViewShare200Response ``` Create User View Share @@ -249,7 +249,7 @@ try { ### Return type -**object** +[**\SeaTable\Client\User\CreateUserViewShare200Response**](../Model/CreateUserViewShare200Response.md) ### Authorization @@ -337,7 +337,7 @@ $apiInstance = new SeaTable\Client\User\SharingApi( ); $workspace_id = 127; // int | id of your workspace. $base_name = My Projects; // string | name of your base. -$group_id = 1; // int +$group_id = 1; // int | The ID of the group. try { $result = $apiInstance->deleteGroupShare($workspace_id, $base_name, $group_id); @@ -353,7 +353,7 @@ try { | ------------- | ------------- | ------------- | ------------- | | **workspace_id** | **int**| id of your workspace. | | | **base_name** | **string**| name of your base. | | -| **group_id** | **int**| | | +| **group_id** | **int**| The ID of the group. | | ### Return type @@ -390,7 +390,7 @@ $apiInstance = new SeaTable\Client\User\SharingApi( ); $workspace_id = 127; // int | id of your workspace. $base_name = My Projects; // string | name of your base. -$group_view_share_id = 6; // int +$group_view_share_id = 6; // int | The ID of the group view share. try { $result = $apiInstance->deleteGroupViewShare($workspace_id, $base_name, $group_view_share_id); @@ -406,7 +406,7 @@ try { | ------------- | ------------- | ------------- | ------------- | | **workspace_id** | **int**| id of your workspace. | | | **base_name** | **string**| name of your base. | | -| **group_view_share_id** | **int**| | | +| **group_view_share_id** | **int**| The ID of the group view share. | | ### Return type @@ -477,7 +477,7 @@ AccountTokenAuth ## `deleteUserShare()` ```php -deleteUserShare($workspace_id, $base_name): object +deleteUserShare($workspace_id, $base_name, $email): object ``` Delete User Share @@ -498,9 +498,10 @@ $apiInstance = new SeaTable\Client\User\SharingApi( ); $workspace_id = 127; // int | id of your workspace. $base_name = My Projects; // string | name of your base. +$email = 'email_example'; // string | The user ID ending with @auth.local try { - $result = $apiInstance->deleteUserShare($workspace_id, $base_name); + $result = $apiInstance->deleteUserShare($workspace_id, $base_name, $email); print_r($result); } catch (Exception $e) { echo 'Exception when calling SharingApi->deleteUserShare: ', $e->getMessage(), PHP_EOL; @@ -513,6 +514,7 @@ try { | ------------- | ------------- | ------------- | ------------- | | **workspace_id** | **int**| id of your workspace. | | | **base_name** | **string**| name of your base. | | +| **email** | **string**| The user ID ending with @auth.local | | ### Return type @@ -549,7 +551,7 @@ $apiInstance = new SeaTable\Client\User\SharingApi( ); $workspace_id = 127; // int | id of your workspace. $base_name = My Projects; // string | name of your base. -$user_view_share_id = 15; // int +$user_view_share_id = 15; // int | The ID of the user view share. try { $result = $apiInstance->deleteUserViewShare($workspace_id, $base_name, $user_view_share_id); @@ -565,7 +567,7 @@ try { | ------------- | ------------- | ------------- | ------------- | | **workspace_id** | **int**| id of your workspace. | | | **base_name** | **string**| name of your base. | | -| **user_view_share_id** | **int**| | | +| **user_view_share_id** | **int**| The ID of the user view share. | | ### Return type @@ -600,7 +602,7 @@ $apiInstance = new SeaTable\Client\User\SharingApi( new GuzzleHttp\Client(), $config ); -$user_view_share_id = 15; // int +$user_view_share_id = 15; // int | The ID of the user view share. try { $result = $apiInstance->leaveSharedView($user_view_share_id); @@ -614,7 +616,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **user_view_share_id** | **int**| | | +| **user_view_share_id** | **int**| The ID of the user view share. | | ### Return type @@ -972,7 +974,7 @@ listUserShares($workspace_id, $base_name): object List User Shares -List all the users sharing a base (except the current user). This request only lists off all the individual users sharing the base, which does not includ groups and group members sharing this base. To see which groups are sharing this base, use the request [List Groups Base is Shared To](/reference/listgroupshares). +List all the users sharing a base (except the current user). This request only lists off all the individual users sharing the base, which does not include groups and group members sharing this base. To see which groups are sharing this base, use the request [List Groups Base is Shared To](/reference/listgroupshares). ### Example @@ -1090,7 +1092,7 @@ $apiInstance = new SeaTable\Client\User\SharingApi( ); $workspace_id = 127; // int | id of your workspace. $base_name = My Projects; // string | name of your base. -$group_id = 1; // int +$group_id = 1; // int | The ID of the group. $permission = 'permission_example'; // string | `r` for read only or `rw` for read and write try { @@ -1107,7 +1109,7 @@ try { | ------------- | ------------- | ------------- | ------------- | | **workspace_id** | **int**| id of your workspace. | | | **base_name** | **string**| name of your base. | | -| **group_id** | **int**| | | +| **group_id** | **int**| The ID of the group. | | | **permission** | **string**| `r` for read only or `rw` for read and write | [optional] | ### Return type @@ -1124,7 +1126,7 @@ AccountTokenAuth ## `updateGroupViewShare()` ```php -updateGroupViewShare($workspace_id, $base_name, $group_view_share_id, $permission): object +updateGroupViewShare($workspace_id, $base_name, $group_view_share_id, $permission): \SeaTable\Client\User\CreateGroupViewShare200Response ``` Update Group View Share @@ -1145,7 +1147,7 @@ $apiInstance = new SeaTable\Client\User\SharingApi( ); $workspace_id = 127; // int | id of your workspace. $base_name = My Projects; // string | name of your base. -$group_view_share_id = 6; // int +$group_view_share_id = 6; // int | The ID of the group view share. $permission = 'permission_example'; // string | `r` for read only or `rw` for read and write try { @@ -1162,12 +1164,12 @@ try { | ------------- | ------------- | ------------- | ------------- | | **workspace_id** | **int**| id of your workspace. | | | **base_name** | **string**| name of your base. | | -| **group_view_share_id** | **int**| | | +| **group_view_share_id** | **int**| The ID of the group view share. | | | **permission** | **string**| `r` for read only or `rw` for read and write | [optional] | ### Return type -**object** +[**\SeaTable\Client\User\CreateGroupViewShare200Response**](../Model/CreateGroupViewShare200Response.md) ### Authorization @@ -1234,7 +1236,7 @@ AccountTokenAuth ## `updateUserViewShare()` ```php -updateUserViewShare($workspace_id, $base_name, $user_view_share_id, $permission): object +updateUserViewShare($workspace_id, $base_name, $user_view_share_id, $permission): \SeaTable\Client\User\CreateUserViewShare200Response ``` Update User View Share @@ -1255,7 +1257,7 @@ $apiInstance = new SeaTable\Client\User\SharingApi( ); $workspace_id = 127; // int | id of your workspace. $base_name = My Projects; // string | name of your base. -$user_view_share_id = 15; // int +$user_view_share_id = 15; // int | The ID of the user view share. $permission = 'permission_example'; // string | `r` for read only or `rw` for read and write try { @@ -1272,12 +1274,12 @@ try { | ------------- | ------------- | ------------- | ------------- | | **workspace_id** | **int**| id of your workspace. | | | **base_name** | **string**| name of your base. | | -| **user_view_share_id** | **int**| | | +| **user_view_share_id** | **int**| The ID of the user view share. | | | **permission** | **string**| `r` for read only or `rw` for read and write | [optional] | ### Return type -**object** +[**\SeaTable\Client\User\CreateUserViewShare200Response**](../Model/CreateUserViewShare200Response.md) ### Authorization diff --git a/docs/User/Api/SharingLinksApi.md b/docs/User/Api/SharingLinksApi.md index 122bdbcc..94ade30f 100644 --- a/docs/User/Api/SharingLinksApi.md +++ b/docs/User/Api/SharingLinksApi.md @@ -17,7 +17,7 @@ All URIs are relative to https://cloud.seatable.io, except if the operation defi ## `createBaseExternalLink()` ```php -createBaseExternalLink($workspace_id, $base_name, $password, $expire_days, $token): object +createBaseExternalLink($workspace_id, $base_name, $password, $expire_days, $token): \SeaTable\Client\User\CreateBaseExternalLink200Response ``` Create Base External Link @@ -62,7 +62,7 @@ try { ### Return type -**object** +[**\SeaTable\Client\User\CreateBaseExternalLink200Response**](../Model/CreateBaseExternalLink200Response.md) ### Authorization @@ -74,7 +74,7 @@ AccountTokenAuth ## `createInviteLink()` ```php -createInviteLink($table_name, $workspace_id, $permission, $password, $expire_days): object +createInviteLink($table_name, $workspace_id, $permission, $password, $expire_days): \SeaTable\Client\User\CreateInviteLink200Response ``` Create Invite Link @@ -119,7 +119,7 @@ try { ### Return type -**object** +[**\SeaTable\Client\User\CreateInviteLink200Response**](../Model/CreateInviteLink200Response.md) ### Authorization @@ -131,7 +131,7 @@ AccountTokenAuth ## `createViewExternalLink()` ```php -createViewExternalLink($workspace_id, $base_name, $table_id, $view_id, $token, $password, $expire_days): object +createViewExternalLink($workspace_id, $base_name, $table_id, $view_id, $token, $password, $expire_days): \SeaTable\Client\User\CreateViewExternalLink200Response ``` Create View External Link @@ -180,7 +180,7 @@ try { ### Return type -**object** +[**\SeaTable\Client\User\CreateViewExternalLink200Response**](../Model/CreateViewExternalLink200Response.md) ### Authorization @@ -213,7 +213,7 @@ $apiInstance = new SeaTable\Client\User\SharingLinksApi( ); $workspace_id = 127; // int | id of your workspace. $base_name = My Projects; // string | name of your base. -$external_link_token = f84903f9aa454a2481f3; // string +$external_link_token = f84903f9aa454a2481f3; // string | The token of the external link. try { $result = $apiInstance->deleteExternalLink($workspace_id, $base_name, $external_link_token); @@ -229,7 +229,7 @@ try { | ------------- | ------------- | ------------- | ------------- | | **workspace_id** | **int**| id of your workspace. | | | **base_name** | **string**| name of your base. | | -| **external_link_token** | **string**| | | +| **external_link_token** | **string**| The token of the external link. | | ### Return type @@ -264,7 +264,7 @@ $apiInstance = new SeaTable\Client\User\SharingLinksApi( new GuzzleHttp\Client(), $config ); -$invite_link_token = 65432148a9074901923d; // string +$invite_link_token = 65432148a9074901923d; // string | The token of the invite link. try { $result = $apiInstance->deleteInviteLink($invite_link_token); @@ -278,7 +278,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **invite_link_token** | **string**| | | +| **invite_link_token** | **string**| The token of the invite link. | | ### Return type @@ -315,7 +315,7 @@ $apiInstance = new SeaTable\Client\User\SharingLinksApi( ); $workspace_id = 127; // int | id of your workspace. $base_name = My Projects; // string | name of your base. -$view_external_link_token = f234baec8ce44028978a; // string +$view_external_link_token = f234baec8ce44028978a; // string | The token of the view external link. try { $result = $apiInstance->deleteViewExternalLink($workspace_id, $base_name, $view_external_link_token); @@ -331,7 +331,7 @@ try { | ------------- | ------------- | ------------- | ------------- | | **workspace_id** | **int**| id of your workspace. | | | **base_name** | **string**| name of your base. | | -| **view_external_link_token** | **string**| | | +| **view_external_link_token** | **string**| The token of the view external link. | | ### Return type @@ -352,6 +352,8 @@ listBaseExternalLinks($workspace_id, $base_name): object List Base External Links +List all external links that have been created for a specific base. + ### Example ```php diff --git a/docs/User/Api/SnapshotsApi.md b/docs/User/Api/SnapshotsApi.md index 6c8fe478..ff874609 100644 --- a/docs/User/Api/SnapshotsApi.md +++ b/docs/User/Api/SnapshotsApi.md @@ -69,7 +69,7 @@ listBigDataBackups($workspace_id, $base_name): object List Big Data Backups -List all all available big data backups. +List all available big data backups. ### Example @@ -136,8 +136,8 @@ $apiInstance = new SeaTable\Client\User\SnapshotsApi( ); $workspace_id = 127; // int | id of your workspace. $base_name = My Projects; // string | name of your base. -$page = 1; // int -$per_page = 2; // int +$page = 1; // int | Page number of results to return. Default is 1. +$per_page = 2; // int | Number of results per page. try { $result = $apiInstance->listSnapshots($workspace_id, $base_name, $page, $per_page); @@ -153,8 +153,8 @@ try { | ------------- | ------------- | ------------- | ------------- | | **workspace_id** | **int**| id of your workspace. | | | **base_name** | **string**| name of your base. | | -| **page** | **int**| | [optional] | -| **per_page** | **int**| | [optional] | +| **page** | **int**| Page number of results to return. Default is 1. | [optional] | +| **per_page** | **int**| Number of results per page. | [optional] | ### Return type @@ -191,7 +191,7 @@ $apiInstance = new SeaTable\Client\User\SnapshotsApi( ); $workspace_id = 127; // int | id of your workspace. $base_name = My Projects; // string | name of your base. -$commit_id = 7ee107a4eadb9561e8ce7699494939015f0d101b; // string +$commit_id = 7ee107a4eadb9561e8ce7699494939015f0d101b; // string | The commit ID for a base snapshot. $snapshot_name = 'snapshot_name_example'; // string | The name of the restored base. Optional. If left blank, a default name will be given. try { @@ -208,7 +208,7 @@ try { | ------------- | ------------- | ------------- | ------------- | | **workspace_id** | **int**| id of your workspace. | | | **base_name** | **string**| name of your base. | | -| **commit_id** | **string**| | | +| **commit_id** | **string**| The commit ID for a base snapshot. | | | **snapshot_name** | **string**| The name of the restored base. Optional. If left blank, a default name will be given. | [optional] | ### Return type diff --git a/docs/User/Api/UserApi.md b/docs/User/Api/UserApi.md index 44463b2d..2088d21d 100644 --- a/docs/User/Api/UserApi.md +++ b/docs/User/Api/UserApi.md @@ -66,7 +66,7 @@ AccountTokenAuth ## `getAccountInfo()` ```php -getAccountInfo(): object +getAccountInfo(): \SeaTable\Client\User\GetAccountInfo200Response ``` Get Account Info @@ -100,7 +100,7 @@ This endpoint does not need any parameter. ### Return type -**object** +[**\SeaTable\Client\User\GetAccountInfo200Response**](../Model/GetAccountInfo200Response.md) ### Authorization @@ -112,7 +112,7 @@ AccountTokenAuth ## `getPublicUserInfo()` ```php -getPublicUserInfo($user_id): object +getPublicUserInfo($user_id): \SeaTable\Client\User\GetPublicUserInfo200Response ``` Get Public User Info @@ -131,7 +131,7 @@ $apiInstance = new SeaTable\Client\User\UserApi( new GuzzleHttp\Client(), $config ); -$user_id = 123456789f1e4c8d8e1c31415867317c@auth.local; // string +$user_id = 123456789f1e4c8d8e1c31415867317c@auth.local; // string | The unique user ID in the format `xxx@auth.local`. try { $result = $apiInstance->getPublicUserInfo($user_id); @@ -145,11 +145,11 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **user_id** | **string**| | | +| **user_id** | **string**| The unique user ID in the format `xxx@auth.local`. | | ### Return type -**object** +[**\SeaTable\Client\User\GetPublicUserInfo200Response**](../Model/GetPublicUserInfo200Response.md) ### Authorization @@ -229,7 +229,7 @@ $apiInstance = new SeaTable\Client\User\UserApi( new GuzzleHttp\Client(), $config ); -$q = Micha; // string +$q = Micha; // string | Search query string. Matches against email, name, or contact email. try { $result = $apiInstance->searchUser($q); @@ -243,7 +243,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **q** | **string**| | [optional] | +| **q** | **string**| Search query string. Matches against email, name, or contact email. | [optional] | ### Return type diff --git a/docs/User/Api/WebhooksApi.md b/docs/User/Api/WebhooksApi.md index 613bc793..d4837ea1 100644 --- a/docs/User/Api/WebhooksApi.md +++ b/docs/User/Api/WebhooksApi.md @@ -89,7 +89,7 @@ $apiInstance = new SeaTable\Client\User\WebhooksApi( ); $workspace_id = 127; // int | id of your workspace. $base_name = My Projects; // string | name of your base. -$webhook_id = 1; // int +$webhook_id = 1; // int | The ID of the webhook. try { $result = $apiInstance->deleteWebhook($workspace_id, $base_name, $webhook_id); @@ -105,7 +105,7 @@ try { | ------------- | ------------- | ------------- | ------------- | | **workspace_id** | **int**| id of your workspace. | | | **base_name** | **string**| name of your base. | | -| **webhook_id** | **int**| | | +| **webhook_id** | **int**| The ID of the webhook. | | ### Return type @@ -193,7 +193,7 @@ $apiInstance = new SeaTable\Client\User\WebhooksApi( ); $workspace_id = 127; // int | id of your workspace. $base_name = My Projects; // string | name of your base. -$webhook_id = 1; // int +$webhook_id = 1; // int | The ID of the webhook. $url = 'url_example'; // string | The URL of the webhook. It should start with `http(s)`. Required. $secret = 56; // int | When you set a secret, you'll receive the X-SeaTable-Signature header, whose value is the result of SHA1 encryption of the secret key, in the webhook POST request. Optional. @@ -211,7 +211,7 @@ try { | ------------- | ------------- | ------------- | ------------- | | **workspace_id** | **int**| id of your workspace. | | | **base_name** | **string**| name of your base. | | -| **webhook_id** | **int**| | | +| **webhook_id** | **int**| The ID of the webhook. | | | **url** | **string**| The URL of the webhook. It should start with `http(s)`. Required. | [optional] | | **secret** | **int**| When you set a secret, you'll receive the X-SeaTable-Signature header, whose value is the result of SHA1 encryption of the secret key, in the webhook POST request. Optional. | [optional] | diff --git a/docs/User/Model/AddGroupMember201Response.md b/docs/User/Model/AddGroupMember201Response.md new file mode 100644 index 00000000..8e99a73a --- /dev/null +++ b/docs/User/Model/AddGroupMember201Response.md @@ -0,0 +1,14 @@ +# # AddGroupMember201Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**group_id** | **int** | | [optional] +**name** | **string** | | [optional] +**email** | **string** | | [optional] +**contact_email** | **string** | | [optional] +**login_id** | **string** | | [optional] +**is_admin** | **bool** | | [optional] +**role** | **string** | | [optional] + diff --git a/docs/User/Model/AddNotificationRule200Response.md b/docs/User/Model/AddNotificationRule200Response.md new file mode 100644 index 00000000..1628de4b --- /dev/null +++ b/docs/User/Model/AddNotificationRule200Response.md @@ -0,0 +1,14 @@ +# # AddNotificationRule200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**run_condition** | **string** | | [optional] +**trigger** | **object** | | [optional] +**action** | **object** | | [optional] +**creator** | **string** | | [optional] +**ctime** | **string** | | [optional] +**last_trigger_time** | **string** | | [optional] + diff --git a/docs/User/Model/CreateAutomationRule200Response.md b/docs/User/Model/CreateAutomationRule200Response.md new file mode 100644 index 00000000..9d584c46 --- /dev/null +++ b/docs/User/Model/CreateAutomationRule200Response.md @@ -0,0 +1,17 @@ +# # CreateAutomationRule200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**dtable_uuid** | **string** | | [optional] +**run_condition** | **string** | | [optional] +**trigger** | **object** | | [optional] +**actions** | **object[]** | | [optional] +**creator** | **string** | | [optional] +**ctime** | **string** | | [optional] +**last_trigger_time** | **string** | | [optional] +**is_valid** | **bool** | | [optional] +**trigger_count** | **int** | | [optional] + diff --git a/docs/User/Model/CreateBaseExternalLink200Response.md b/docs/User/Model/CreateBaseExternalLink200Response.md new file mode 100644 index 00000000..d18c22e0 --- /dev/null +++ b/docs/User/Model/CreateBaseExternalLink200Response.md @@ -0,0 +1,13 @@ +# # CreateBaseExternalLink200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**url** | **string** | | [optional] +**token** | **string** | | [optional] +**is_custom** | **bool** | | [optional] +**permission** | **string** | | [optional] +**is_expired** | **bool** | | [optional] +**expire_date** | **string** | | [optional] + diff --git a/docs/User/Model/CreateGroupViewShare200Response.md b/docs/User/Model/CreateGroupViewShare200Response.md new file mode 100644 index 00000000..84c6ec1a --- /dev/null +++ b/docs/User/Model/CreateGroupViewShare200Response.md @@ -0,0 +1,16 @@ +# # CreateGroupViewShare200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**dtable_name** | **string** | | [optional] +**from_user** | **string** | | [optional] +**from_user_name** | **string** | | [optional] +**to_group_id** | **string** | | [optional] +**to_group_name** | **string** | | [optional] +**permission** | **string** | | [optional] +**table_id** | **string** | | [optional] +**view_id** | **string** | | [optional] + diff --git a/docs/User/Model/CreateInviteLink200Response.md b/docs/User/Model/CreateInviteLink200Response.md new file mode 100644 index 00000000..6d340e57 --- /dev/null +++ b/docs/User/Model/CreateInviteLink200Response.md @@ -0,0 +1,16 @@ +# # CreateInviteLink200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**username** | **string** | | [optional] +**permission** | **string** | | [optional] +**token** | **string** | | [optional] +**link** | **string** | | [optional] +**dtable** | **string** | | [optional] +**dtable_id** | **int** | | [optional] +**workspace_id** | **int** | | [optional] +**expire_date** | **string** | | [optional] +**ctime** | **string** | | [optional] + diff --git a/docs/User/Model/CreateUserViewShare200Response.md b/docs/User/Model/CreateUserViewShare200Response.md new file mode 100644 index 00000000..b1c48d37 --- /dev/null +++ b/docs/User/Model/CreateUserViewShare200Response.md @@ -0,0 +1,17 @@ +# # CreateUserViewShare200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**dtable_name** | **string** | | [optional] +**from_user** | **string** | | [optional] +**from_user_name** | **string** | | [optional] +**to_user** | **string** | | [optional] +**to_user_name** | **string** | | [optional] +**permission** | **string** | | [optional] +**table_id** | **string** | | [optional] +**view_id** | **string** | | [optional] +**shared_name** | **string** | | [optional] + diff --git a/docs/User/Model/CreateViewExternalLink200Response.md b/docs/User/Model/CreateViewExternalLink200Response.md new file mode 100644 index 00000000..0b203ecb --- /dev/null +++ b/docs/User/Model/CreateViewExternalLink200Response.md @@ -0,0 +1,20 @@ +# # CreateViewExternalLink200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**from_dtable** | **string** | | [optional] +**creator** | **string** | | [optional] +**creator_name** | **string** | | [optional] +**token** | **string** | | [optional] +**permission** | **string** | | [optional] +**create_at** | **string** | | [optional] +**view_cnt** | **int** | | [optional] +**table_id** | **string** | | [optional] +**view_id** | **string** | | [optional] +**url** | **string** | | [optional] +**is_custom** | **bool** | | [optional] +**expire_date** | **string** | | [optional] + diff --git a/docs/User/Model/GetAccountInfo200Response.md b/docs/User/Model/GetAccountInfo200Response.md new file mode 100644 index 00000000..d4241946 --- /dev/null +++ b/docs/User/Model/GetAccountInfo200Response.md @@ -0,0 +1,26 @@ +# # GetAccountInfo200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**org_id** | **int** | | [optional] +**is_org_staff** | **int** | | [optional] +**space_usage** | **string** | | [optional] +**total** | **int** | | [optional] +**usage** | **int** | | [optional] +**row_usage_rate** | **string** | | [optional] +**row_total** | **int** | | [optional] +**row_usage** | **int** | | [optional] +**avatar_url** | **string** | | [optional] +**email** | **string** | | [optional] +**name** | **string** | | [optional] +**login_id** | **string** | | [optional] +**contact_email** | **string** | | [optional] +**institution** | **string** | | [optional] +**is_staff** | **bool** | | [optional] +**enable_chargebee** | **bool** | | [optional] +**enable_subscription** | **bool** | | [optional] +**dtable_updates_email_interval** | **int** | | [optional] +**dtable_collaborate_email_interval** | **int** | | [optional] + diff --git a/docs/User/Model/GetBaseAttachmentUploadLink200Response.md b/docs/User/Model/GetBaseAttachmentUploadLink200Response.md new file mode 100644 index 00000000..218cf77a --- /dev/null +++ b/docs/User/Model/GetBaseAttachmentUploadLink200Response.md @@ -0,0 +1,11 @@ +# # GetBaseAttachmentUploadLink200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**upload_link** | **string** | | [optional] +**parent_path** | **string** | | [optional] +**img_relative_path** | **string** | | [optional] +**file_relative_path** | **string** | | [optional] + diff --git a/docs/User/Model/GetCommonDataset200Response.md b/docs/User/Model/GetCommonDataset200Response.md new file mode 100644 index 00000000..e8f6538d --- /dev/null +++ b/docs/User/Model/GetCommonDataset200Response.md @@ -0,0 +1,10 @@ +# # GetCommonDataset200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**rows** | **object[]** | | [optional] +**columns** | **object[]** | | [optional] +**related_user_list** | **object[]** | | [optional] + diff --git a/docs/User/Model/GetGroupMembers200ResponseInner.md b/docs/User/Model/GetGroupMembers200ResponseInner.md new file mode 100644 index 00000000..932d1d26 --- /dev/null +++ b/docs/User/Model/GetGroupMembers200ResponseInner.md @@ -0,0 +1,13 @@ +# # GetGroupMembers200ResponseInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | | [optional] +**email** | **string** | | [optional] +**contact_email** | **string** | | [optional] +**is_admin** | **int** | | [optional] +**role** | **string** | | [optional] +**group_id** | **int** | | [optional] + diff --git a/docs/User/Model/GetPublicUserInfo200Response.md b/docs/User/Model/GetPublicUserInfo200Response.md new file mode 100644 index 00000000..acd1313c --- /dev/null +++ b/docs/User/Model/GetPublicUserInfo200Response.md @@ -0,0 +1,11 @@ +# # GetPublicUserInfo200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **string** | | [optional] +**name** | **string** | | [optional] +**avatar_url** | **string** | | [optional] +**contact_email** | **string** | | [optional] + diff --git a/docs/User/Model/PublishCommonDataset200Response.md b/docs/User/Model/PublishCommonDataset200Response.md new file mode 100644 index 00000000..2fd9ec6d --- /dev/null +++ b/docs/User/Model/PublishCommonDataset200Response.md @@ -0,0 +1,16 @@ +# # PublishCommonDataset200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**org_id** | **int** | | [optional] +**group_id** | **int** | | [optional] +**dtable_uuid** | **string** | | [optional] +**table_id** | **string** | | [optional] +**view_id** | **string** | | [optional] +**created_at** | **string** | | [optional] +**creator** | **string** | | [optional] +**dataset_name** | **string** | | [optional] + diff --git a/docs/User/Model/SearchGroup200ResponseInner.md b/docs/User/Model/SearchGroup200ResponseInner.md new file mode 100644 index 00000000..cad02f4d --- /dev/null +++ b/docs/User/Model/SearchGroup200ResponseInner.md @@ -0,0 +1,11 @@ +# # SearchGroup200ResponseInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**name** | **string** | | [optional] +**owner** | **string** | | [optional] +**created_at** | **\DateTime** | | [optional] + diff --git a/docs/User/Model/UpdateGroup200Response.md b/docs/User/Model/UpdateGroup200Response.md new file mode 100644 index 00000000..aa343d5d --- /dev/null +++ b/docs/User/Model/UpdateGroup200Response.md @@ -0,0 +1,14 @@ +# # UpdateGroup200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**parent_group_id** | **int** | | [optional] +**name** | **string** | | [optional] +**owner** | **string** | | [optional] +**created_at** | **string** | | [optional] +**avatar_url** | **string** | | [optional] +**admins** | **string[]** | | [optional] + diff --git a/generate_api.sh b/generate_api.sh index 67e3c43d..40be2983 100755 --- a/generate_api.sh +++ b/generate_api.sh @@ -10,7 +10,7 @@ rm -r ./lib/* rm -r ./docs/* LOG_LEVEL="warn" -TAG="v7.15.0" +TAG="v7.18.0" # generate sysadmin docker run --rm \ diff --git a/lib/ApiException.php b/lib/ApiException.php index d68cb63b..5e5ca38f 100644 --- a/lib/ApiException.php +++ b/lib/ApiException.php @@ -14,7 +14,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ diff --git a/lib/Auth/APITokenApi.php b/lib/Auth/APITokenApi.php index 916f63dc..981a1095 100644 --- a/lib/Auth/APITokenApi.php +++ b/lib/Auth/APITokenApi.php @@ -14,7 +14,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -141,7 +141,7 @@ public function getConfig() * * Create API-Token * - * @param int $workspace_id The id of the workspace. For an explanation how to get the *workspace_id*, check out this [help-article](https://seatable.com/help/workspace-id-einer-gruppe-ermitteln/). Alternatively the API endpoint [get metadata](/reference/getmetadata) can be used. (required) + * @param int $workspace_id The id of the workspace. For an explanation how to get the *workspace_id*, check out this [help-article](https://seatable.com/help/find-workspace-id-group/). Alternatively the API endpoint [get metadata](/reference/getmetadata) can be used. (required) * @param string $base_name The name of your base. (required) * @param string $app_name The name of your app. Every API-Token has a name to identify the purpose. The name of the app must be unique for every base. (required) * @param \SeaTable\Client\Auth\AuthenticationPermission $permission permission (required) @@ -162,7 +162,7 @@ public function createApiToken($workspace_id, $base_name, $app_name, $permission * * Create API-Token * - * @param int $workspace_id The id of the workspace. For an explanation how to get the *workspace_id*, check out this [help-article](https://seatable.com/help/workspace-id-einer-gruppe-ermitteln/). Alternatively the API endpoint [get metadata](/reference/getmetadata) can be used. (required) + * @param int $workspace_id The id of the workspace. For an explanation how to get the *workspace_id*, check out this [help-article](https://seatable.com/help/find-workspace-id-group/). Alternatively the API endpoint [get metadata](/reference/getmetadata) can be used. (required) * @param string $base_name The name of your base. (required) * @param string $app_name The name of your app. Every API-Token has a name to identify the purpose. The name of the app must be unique for every base. (required) * @param \SeaTable\Client\Auth\AuthenticationPermission $permission (required) @@ -250,7 +250,7 @@ public function createApiTokenWithHttpInfo($workspace_id, $base_name, $app_name, * * Create API-Token * - * @param int $workspace_id The id of the workspace. For an explanation how to get the *workspace_id*, check out this [help-article](https://seatable.com/help/workspace-id-einer-gruppe-ermitteln/). Alternatively the API endpoint [get metadata](/reference/getmetadata) can be used. (required) + * @param int $workspace_id The id of the workspace. For an explanation how to get the *workspace_id*, check out this [help-article](https://seatable.com/help/find-workspace-id-group/). Alternatively the API endpoint [get metadata](/reference/getmetadata) can be used. (required) * @param string $base_name The name of your base. (required) * @param string $app_name The name of your app. Every API-Token has a name to identify the purpose. The name of the app must be unique for every base. (required) * @param \SeaTable\Client\Auth\AuthenticationPermission $permission (required) @@ -274,7 +274,7 @@ function ($response) { * * Create API-Token * - * @param int $workspace_id The id of the workspace. For an explanation how to get the *workspace_id*, check out this [help-article](https://seatable.com/help/workspace-id-einer-gruppe-ermitteln/). Alternatively the API endpoint [get metadata](/reference/getmetadata) can be used. (required) + * @param int $workspace_id The id of the workspace. For an explanation how to get the *workspace_id*, check out this [help-article](https://seatable.com/help/find-workspace-id-group/). Alternatively the API endpoint [get metadata](/reference/getmetadata) can be used. (required) * @param string $base_name The name of your base. (required) * @param string $app_name The name of your app. Every API-Token has a name to identify the purpose. The name of the app must be unique for every base. (required) * @param \SeaTable\Client\Auth\AuthenticationPermission $permission (required) @@ -327,7 +327,7 @@ function ($exception) { /** * Create request for operation 'createApiToken' * - * @param int $workspace_id The id of the workspace. For an explanation how to get the *workspace_id*, check out this [help-article](https://seatable.com/help/workspace-id-einer-gruppe-ermitteln/). Alternatively the API endpoint [get metadata](/reference/getmetadata) can be used. (required) + * @param int $workspace_id The id of the workspace. For an explanation how to get the *workspace_id*, check out this [help-article](https://seatable.com/help/find-workspace-id-group/). Alternatively the API endpoint [get metadata](/reference/getmetadata) can be used. (required) * @param string $base_name The name of your base. (required) * @param string $app_name The name of your app. Every API-Token has a name to identify the purpose. The name of the app must be unique for every base. (required) * @param \SeaTable\Client\Auth\AuthenticationPermission $permission (required) @@ -470,7 +470,7 @@ public function createApiTokenRequest($workspace_id, $base_name, $app_name, $per * * Create API-Token (temporary) * - * @param int $workspace_id The id of the workspace. For an explanation how to get the *workspace_id*, check out this [help-article](https://seatable.com/help/workspace-id-einer-gruppe-ermitteln/). Alternatively the API endpoint [get metadata](/reference/getmetadata) can be used. (required) + * @param int $workspace_id The id of the workspace. For an explanation how to get the *workspace_id*, check out this [help-article](https://seatable.com/help/find-workspace-id-group/). Alternatively the API endpoint [get metadata](/reference/getmetadata) can be used. (required) * @param string $base_name The name of your base. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createTempApiToken'] to see the possible values for this operation * @@ -489,7 +489,7 @@ public function createTempApiToken($workspace_id, $base_name, string $contentTyp * * Create API-Token (temporary) * - * @param int $workspace_id The id of the workspace. For an explanation how to get the *workspace_id*, check out this [help-article](https://seatable.com/help/workspace-id-einer-gruppe-ermitteln/). Alternatively the API endpoint [get metadata](/reference/getmetadata) can be used. (required) + * @param int $workspace_id The id of the workspace. For an explanation how to get the *workspace_id*, check out this [help-article](https://seatable.com/help/find-workspace-id-group/). Alternatively the API endpoint [get metadata](/reference/getmetadata) can be used. (required) * @param string $base_name The name of your base. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createTempApiToken'] to see the possible values for this operation * @@ -575,7 +575,7 @@ public function createTempApiTokenWithHttpInfo($workspace_id, $base_name, string * * Create API-Token (temporary) * - * @param int $workspace_id The id of the workspace. For an explanation how to get the *workspace_id*, check out this [help-article](https://seatable.com/help/workspace-id-einer-gruppe-ermitteln/). Alternatively the API endpoint [get metadata](/reference/getmetadata) can be used. (required) + * @param int $workspace_id The id of the workspace. For an explanation how to get the *workspace_id*, check out this [help-article](https://seatable.com/help/find-workspace-id-group/). Alternatively the API endpoint [get metadata](/reference/getmetadata) can be used. (required) * @param string $base_name The name of your base. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createTempApiToken'] to see the possible values for this operation * @@ -597,7 +597,7 @@ function ($response) { * * Create API-Token (temporary) * - * @param int $workspace_id The id of the workspace. For an explanation how to get the *workspace_id*, check out this [help-article](https://seatable.com/help/workspace-id-einer-gruppe-ermitteln/). Alternatively the API endpoint [get metadata](/reference/getmetadata) can be used. (required) + * @param int $workspace_id The id of the workspace. For an explanation how to get the *workspace_id*, check out this [help-article](https://seatable.com/help/find-workspace-id-group/). Alternatively the API endpoint [get metadata](/reference/getmetadata) can be used. (required) * @param string $base_name The name of your base. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createTempApiToken'] to see the possible values for this operation * @@ -648,7 +648,7 @@ function ($exception) { /** * Create request for operation 'createTempApiToken' * - * @param int $workspace_id The id of the workspace. For an explanation how to get the *workspace_id*, check out this [help-article](https://seatable.com/help/workspace-id-einer-gruppe-ermitteln/). Alternatively the API endpoint [get metadata](/reference/getmetadata) can be used. (required) + * @param int $workspace_id The id of the workspace. For an explanation how to get the *workspace_id*, check out this [help-article](https://seatable.com/help/find-workspace-id-group/). Alternatively the API endpoint [get metadata](/reference/getmetadata) can be used. (required) * @param string $base_name The name of your base. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createTempApiToken'] to see the possible values for this operation * @@ -765,7 +765,7 @@ public function createTempApiTokenRequest($workspace_id, $base_name, string $con * * Delete API-Token * - * @param int $workspace_id The id of the workspace. For an explanation how to get the *workspace_id*, check out this [help-article](https://seatable.com/help/workspace-id-einer-gruppe-ermitteln/). Alternatively the API endpoint [get metadata](/reference/getmetadata) can be used. (required) + * @param int $workspace_id The id of the workspace. For an explanation how to get the *workspace_id*, check out this [help-article](https://seatable.com/help/find-workspace-id-group/). Alternatively the API endpoint [get metadata](/reference/getmetadata) can be used. (required) * @param string $base_name The name of your base. (required) * @param string $app_name The name of your app. Every API-Token has a name to identify the purpose. The name of the app must be unique for every base. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteApiToken'] to see the possible values for this operation @@ -785,7 +785,7 @@ public function deleteApiToken($workspace_id, $base_name, $app_name, string $con * * Delete API-Token * - * @param int $workspace_id The id of the workspace. For an explanation how to get the *workspace_id*, check out this [help-article](https://seatable.com/help/workspace-id-einer-gruppe-ermitteln/). Alternatively the API endpoint [get metadata](/reference/getmetadata) can be used. (required) + * @param int $workspace_id The id of the workspace. For an explanation how to get the *workspace_id*, check out this [help-article](https://seatable.com/help/find-workspace-id-group/). Alternatively the API endpoint [get metadata](/reference/getmetadata) can be used. (required) * @param string $base_name The name of your base. (required) * @param string $app_name The name of your app. Every API-Token has a name to identify the purpose. The name of the app must be unique for every base. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteApiToken'] to see the possible values for this operation @@ -872,7 +872,7 @@ public function deleteApiTokenWithHttpInfo($workspace_id, $base_name, $app_name, * * Delete API-Token * - * @param int $workspace_id The id of the workspace. For an explanation how to get the *workspace_id*, check out this [help-article](https://seatable.com/help/workspace-id-einer-gruppe-ermitteln/). Alternatively the API endpoint [get metadata](/reference/getmetadata) can be used. (required) + * @param int $workspace_id The id of the workspace. For an explanation how to get the *workspace_id*, check out this [help-article](https://seatable.com/help/find-workspace-id-group/). Alternatively the API endpoint [get metadata](/reference/getmetadata) can be used. (required) * @param string $base_name The name of your base. (required) * @param string $app_name The name of your app. Every API-Token has a name to identify the purpose. The name of the app must be unique for every base. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteApiToken'] to see the possible values for this operation @@ -895,7 +895,7 @@ function ($response) { * * Delete API-Token * - * @param int $workspace_id The id of the workspace. For an explanation how to get the *workspace_id*, check out this [help-article](https://seatable.com/help/workspace-id-einer-gruppe-ermitteln/). Alternatively the API endpoint [get metadata](/reference/getmetadata) can be used. (required) + * @param int $workspace_id The id of the workspace. For an explanation how to get the *workspace_id*, check out this [help-article](https://seatable.com/help/find-workspace-id-group/). Alternatively the API endpoint [get metadata](/reference/getmetadata) can be used. (required) * @param string $base_name The name of your base. (required) * @param string $app_name The name of your app. Every API-Token has a name to identify the purpose. The name of the app must be unique for every base. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteApiToken'] to see the possible values for this operation @@ -947,7 +947,7 @@ function ($exception) { /** * Create request for operation 'deleteApiToken' * - * @param int $workspace_id The id of the workspace. For an explanation how to get the *workspace_id*, check out this [help-article](https://seatable.com/help/workspace-id-einer-gruppe-ermitteln/). Alternatively the API endpoint [get metadata](/reference/getmetadata) can be used. (required) + * @param int $workspace_id The id of the workspace. For an explanation how to get the *workspace_id*, check out this [help-article](https://seatable.com/help/find-workspace-id-group/). Alternatively the API endpoint [get metadata](/reference/getmetadata) can be used. (required) * @param string $base_name The name of your base. (required) * @param string $app_name The name of your app. Every API-Token has a name to identify the purpose. The name of the app must be unique for every base. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteApiToken'] to see the possible values for this operation @@ -1080,7 +1080,7 @@ public function deleteApiTokenRequest($workspace_id, $base_name, $app_name, stri * * List API-Tokens * - * @param int $workspace_id The id of the workspace. For an explanation how to get the *workspace_id*, check out this [help-article](https://seatable.com/help/workspace-id-einer-gruppe-ermitteln/). Alternatively the API endpoint [get metadata](/reference/getmetadata) can be used. (required) + * @param int $workspace_id The id of the workspace. For an explanation how to get the *workspace_id*, check out this [help-article](https://seatable.com/help/find-workspace-id-group/). Alternatively the API endpoint [get metadata](/reference/getmetadata) can be used. (required) * @param string $base_name The name of your base. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listApiTokens'] to see the possible values for this operation * @@ -1099,7 +1099,7 @@ public function listApiTokens($workspace_id, $base_name, string $contentType = s * * List API-Tokens * - * @param int $workspace_id The id of the workspace. For an explanation how to get the *workspace_id*, check out this [help-article](https://seatable.com/help/workspace-id-einer-gruppe-ermitteln/). Alternatively the API endpoint [get metadata](/reference/getmetadata) can be used. (required) + * @param int $workspace_id The id of the workspace. For an explanation how to get the *workspace_id*, check out this [help-article](https://seatable.com/help/find-workspace-id-group/). Alternatively the API endpoint [get metadata](/reference/getmetadata) can be used. (required) * @param string $base_name The name of your base. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listApiTokens'] to see the possible values for this operation * @@ -1185,7 +1185,7 @@ public function listApiTokensWithHttpInfo($workspace_id, $base_name, string $con * * List API-Tokens * - * @param int $workspace_id The id of the workspace. For an explanation how to get the *workspace_id*, check out this [help-article](https://seatable.com/help/workspace-id-einer-gruppe-ermitteln/). Alternatively the API endpoint [get metadata](/reference/getmetadata) can be used. (required) + * @param int $workspace_id The id of the workspace. For an explanation how to get the *workspace_id*, check out this [help-article](https://seatable.com/help/find-workspace-id-group/). Alternatively the API endpoint [get metadata](/reference/getmetadata) can be used. (required) * @param string $base_name The name of your base. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listApiTokens'] to see the possible values for this operation * @@ -1207,7 +1207,7 @@ function ($response) { * * List API-Tokens * - * @param int $workspace_id The id of the workspace. For an explanation how to get the *workspace_id*, check out this [help-article](https://seatable.com/help/workspace-id-einer-gruppe-ermitteln/). Alternatively the API endpoint [get metadata](/reference/getmetadata) can be used. (required) + * @param int $workspace_id The id of the workspace. For an explanation how to get the *workspace_id*, check out this [help-article](https://seatable.com/help/find-workspace-id-group/). Alternatively the API endpoint [get metadata](/reference/getmetadata) can be used. (required) * @param string $base_name The name of your base. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listApiTokens'] to see the possible values for this operation * @@ -1258,7 +1258,7 @@ function ($exception) { /** * Create request for operation 'listApiTokens' * - * @param int $workspace_id The id of the workspace. For an explanation how to get the *workspace_id*, check out this [help-article](https://seatable.com/help/workspace-id-einer-gruppe-ermitteln/). Alternatively the API endpoint [get metadata](/reference/getmetadata) can be used. (required) + * @param int $workspace_id The id of the workspace. For an explanation how to get the *workspace_id*, check out this [help-article](https://seatable.com/help/find-workspace-id-group/). Alternatively the API endpoint [get metadata](/reference/getmetadata) can be used. (required) * @param string $base_name The name of your base. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listApiTokens'] to see the possible values for this operation * @@ -1375,7 +1375,7 @@ public function listApiTokensRequest($workspace_id, $base_name, string $contentT * * Update API-Token * - * @param int $workspace_id The id of the workspace. For an explanation how to get the *workspace_id*, check out this [help-article](https://seatable.com/help/workspace-id-einer-gruppe-ermitteln/). Alternatively the API endpoint [get metadata](/reference/getmetadata) can be used. (required) + * @param int $workspace_id The id of the workspace. For an explanation how to get the *workspace_id*, check out this [help-article](https://seatable.com/help/find-workspace-id-group/). Alternatively the API endpoint [get metadata](/reference/getmetadata) can be used. (required) * @param string $base_name The name of your base. (required) * @param string $app_name The name of your app. Every API-Token has a name to identify the purpose. The name of the app must be unique for every base. (required) * @param \SeaTable\Client\Auth\AuthenticationPermission $permission permission (required) @@ -1396,7 +1396,7 @@ public function updateApiToken($workspace_id, $base_name, $app_name, $permission * * Update API-Token * - * @param int $workspace_id The id of the workspace. For an explanation how to get the *workspace_id*, check out this [help-article](https://seatable.com/help/workspace-id-einer-gruppe-ermitteln/). Alternatively the API endpoint [get metadata](/reference/getmetadata) can be used. (required) + * @param int $workspace_id The id of the workspace. For an explanation how to get the *workspace_id*, check out this [help-article](https://seatable.com/help/find-workspace-id-group/). Alternatively the API endpoint [get metadata](/reference/getmetadata) can be used. (required) * @param string $base_name The name of your base. (required) * @param string $app_name The name of your app. Every API-Token has a name to identify the purpose. The name of the app must be unique for every base. (required) * @param \SeaTable\Client\Auth\AuthenticationPermission $permission (required) @@ -1484,7 +1484,7 @@ public function updateApiTokenWithHttpInfo($workspace_id, $base_name, $app_name, * * Update API-Token * - * @param int $workspace_id The id of the workspace. For an explanation how to get the *workspace_id*, check out this [help-article](https://seatable.com/help/workspace-id-einer-gruppe-ermitteln/). Alternatively the API endpoint [get metadata](/reference/getmetadata) can be used. (required) + * @param int $workspace_id The id of the workspace. For an explanation how to get the *workspace_id*, check out this [help-article](https://seatable.com/help/find-workspace-id-group/). Alternatively the API endpoint [get metadata](/reference/getmetadata) can be used. (required) * @param string $base_name The name of your base. (required) * @param string $app_name The name of your app. Every API-Token has a name to identify the purpose. The name of the app must be unique for every base. (required) * @param \SeaTable\Client\Auth\AuthenticationPermission $permission (required) @@ -1508,7 +1508,7 @@ function ($response) { * * Update API-Token * - * @param int $workspace_id The id of the workspace. For an explanation how to get the *workspace_id*, check out this [help-article](https://seatable.com/help/workspace-id-einer-gruppe-ermitteln/). Alternatively the API endpoint [get metadata](/reference/getmetadata) can be used. (required) + * @param int $workspace_id The id of the workspace. For an explanation how to get the *workspace_id*, check out this [help-article](https://seatable.com/help/find-workspace-id-group/). Alternatively the API endpoint [get metadata](/reference/getmetadata) can be used. (required) * @param string $base_name The name of your base. (required) * @param string $app_name The name of your app. Every API-Token has a name to identify the purpose. The name of the app must be unique for every base. (required) * @param \SeaTable\Client\Auth\AuthenticationPermission $permission (required) @@ -1561,7 +1561,7 @@ function ($exception) { /** * Create request for operation 'updateApiToken' * - * @param int $workspace_id The id of the workspace. For an explanation how to get the *workspace_id*, check out this [help-article](https://seatable.com/help/workspace-id-einer-gruppe-ermitteln/). Alternatively the API endpoint [get metadata](/reference/getmetadata) can be used. (required) + * @param int $workspace_id The id of the workspace. For an explanation how to get the *workspace_id*, check out this [help-article](https://seatable.com/help/find-workspace-id-group/). Alternatively the API endpoint [get metadata](/reference/getmetadata) can be used. (required) * @param string $base_name The name of your base. (required) * @param string $app_name The name of your app. Every API-Token has a name to identify the purpose. The name of the app must be unique for every base. (required) * @param \SeaTable\Client\Auth\AuthenticationPermission $permission (required) @@ -1723,6 +1723,14 @@ protected function createHttpClientOption() } } + if ($this->config->getCertFile()) { + $options[RequestOptions::CERT] = $this->config->getCertFile(); + } + + if ($this->config->getKeyFile()) { + $options[RequestOptions::SSL_KEY] = $this->config->getKeyFile(); + } + return $options; } diff --git a/lib/Auth/AccessToken.php b/lib/Auth/AccessToken.php index af8f8247..a3cc65d3 100644 --- a/lib/Auth/AccessToken.php +++ b/lib/Auth/AccessToken.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -352,11 +352,11 @@ public function setDtableUuid($dtable_uuid) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -364,12 +364,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -394,11 +394,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Auth/AccountToken.php b/lib/Auth/AccountToken.php index 5c18e3d3..720d3c2c 100644 --- a/lib/Auth/AccountToken.php +++ b/lib/Auth/AccountToken.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -34,7 +34,7 @@ * AccountToken Class Doc Comment * * @category Class - * @description account-token ... + * @description The account token used for authenticating API requests. * @package SeaTable\Client * @author OpenAPI Generator team * @link https://openapi-generator.tech @@ -333,11 +333,11 @@ public function setToken($token) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -345,12 +345,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -375,11 +375,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Auth/AccountTokenApi.php b/lib/Auth/AccountTokenApi.php index bd723232..5c22422d 100644 --- a/lib/Auth/AccountTokenApi.php +++ b/lib/Auth/AccountTokenApi.php @@ -14,7 +14,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -435,6 +435,14 @@ protected function createHttpClientOption() } } + if ($this->config->getCertFile()) { + $options[RequestOptions::CERT] = $this->config->getCertFile(); + } + + if ($this->config->getKeyFile()) { + $options[RequestOptions::SSL_KEY] = $this->config->getKeyFile(); + } + return $options; } diff --git a/lib/Auth/ApiToken.php b/lib/Auth/ApiToken.php index f4052463..fb1b35e3 100644 --- a/lib/Auth/ApiToken.php +++ b/lib/Auth/ApiToken.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -539,11 +539,11 @@ public function setPermission($permission) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -551,12 +551,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -581,11 +581,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Auth/ApiTokenList.php b/lib/Auth/ApiTokenList.php index ed142aea..a5d266d7 100644 --- a/lib/Auth/ApiTokenList.php +++ b/lib/Auth/ApiTokenList.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -34,7 +34,7 @@ * ApiTokenList Class Doc Comment * * @category Class - * @description ... + * @description List of API tokens for a base. * @package SeaTable\Client * @author OpenAPI Generator team * @link https://openapi-generator.tech @@ -318,11 +318,11 @@ public function setApiTokens($api_tokens) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -330,12 +330,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -360,11 +360,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Auth/ApiTokenTemporary.php b/lib/Auth/ApiTokenTemporary.php index ea4ff6d8..d0c24cdc 100644 --- a/lib/Auth/ApiTokenTemporary.php +++ b/lib/Auth/ApiTokenTemporary.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -318,11 +318,11 @@ public function setApiToken($api_token) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -330,12 +330,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -360,11 +360,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Auth/AuthenticationPermission.php b/lib/Auth/AuthenticationPermission.php index b5b017f0..775b97d0 100644 --- a/lib/Auth/AuthenticationPermission.php +++ b/lib/Auth/AuthenticationPermission.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ diff --git a/lib/Auth/BaseTokenApi.php b/lib/Auth/BaseTokenApi.php index c4d3c136..c48b16a2 100644 --- a/lib/Auth/BaseTokenApi.php +++ b/lib/Auth/BaseTokenApi.php @@ -14,7 +14,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -79,9 +79,6 @@ class BaseTokenApi 'getBaseTokenWithApiToken' => [ 'application/json', ], - 'getBaseTokenWithExternLink' => [ - 'application/json', - ], ]; /** @@ -135,7 +132,7 @@ public function getConfig() * * Get Base-Token with Account-Token * - * @param int $workspace_id The id of the workspace. For an explanation how to get the *workspace_id*, check out this [help-article](https://seatable.com/help/workspace-id-einer-gruppe-ermitteln/). Alternatively the API endpoint [get metadata](/reference/getmetadata) can be used. (required) + * @param int $workspace_id The id of the workspace. For an explanation how to get the *workspace_id*, check out this [help-article](https://seatable.com/help/find-workspace-id-group/). Alternatively the API endpoint [get metadata](/reference/getmetadata) can be used. (required) * @param string $base_name The name of your base. (required) * @param string|null $exp Expiration time of the generated access token. Examples: 5h (= 5 hours) or 3d (= 3 days) (optional, default to '3d') * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getBaseTokenWithAccountToken'] to see the possible values for this operation @@ -155,7 +152,7 @@ public function getBaseTokenWithAccountToken($workspace_id, $base_name, $exp = ' * * Get Base-Token with Account-Token * - * @param int $workspace_id The id of the workspace. For an explanation how to get the *workspace_id*, check out this [help-article](https://seatable.com/help/workspace-id-einer-gruppe-ermitteln/). Alternatively the API endpoint [get metadata](/reference/getmetadata) can be used. (required) + * @param int $workspace_id The id of the workspace. For an explanation how to get the *workspace_id*, check out this [help-article](https://seatable.com/help/find-workspace-id-group/). Alternatively the API endpoint [get metadata](/reference/getmetadata) can be used. (required) * @param string $base_name The name of your base. (required) * @param string|null $exp Expiration time of the generated access token. Examples: 5h (= 5 hours) or 3d (= 3 days) (optional, default to '3d') * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getBaseTokenWithAccountToken'] to see the possible values for this operation @@ -242,7 +239,7 @@ public function getBaseTokenWithAccountTokenWithHttpInfo($workspace_id, $base_na * * Get Base-Token with Account-Token * - * @param int $workspace_id The id of the workspace. For an explanation how to get the *workspace_id*, check out this [help-article](https://seatable.com/help/workspace-id-einer-gruppe-ermitteln/). Alternatively the API endpoint [get metadata](/reference/getmetadata) can be used. (required) + * @param int $workspace_id The id of the workspace. For an explanation how to get the *workspace_id*, check out this [help-article](https://seatable.com/help/find-workspace-id-group/). Alternatively the API endpoint [get metadata](/reference/getmetadata) can be used. (required) * @param string $base_name The name of your base. (required) * @param string|null $exp Expiration time of the generated access token. Examples: 5h (= 5 hours) or 3d (= 3 days) (optional, default to '3d') * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getBaseTokenWithAccountToken'] to see the possible values for this operation @@ -265,7 +262,7 @@ function ($response) { * * Get Base-Token with Account-Token * - * @param int $workspace_id The id of the workspace. For an explanation how to get the *workspace_id*, check out this [help-article](https://seatable.com/help/workspace-id-einer-gruppe-ermitteln/). Alternatively the API endpoint [get metadata](/reference/getmetadata) can be used. (required) + * @param int $workspace_id The id of the workspace. For an explanation how to get the *workspace_id*, check out this [help-article](https://seatable.com/help/find-workspace-id-group/). Alternatively the API endpoint [get metadata](/reference/getmetadata) can be used. (required) * @param string $base_name The name of your base. (required) * @param string|null $exp Expiration time of the generated access token. Examples: 5h (= 5 hours) or 3d (= 3 days) (optional, default to '3d') * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getBaseTokenWithAccountToken'] to see the possible values for this operation @@ -317,7 +314,7 @@ function ($exception) { /** * Create request for operation 'getBaseTokenWithAccountToken' * - * @param int $workspace_id The id of the workspace. For an explanation how to get the *workspace_id*, check out this [help-article](https://seatable.com/help/workspace-id-einer-gruppe-ermitteln/). Alternatively the API endpoint [get metadata](/reference/getmetadata) can be used. (required) + * @param int $workspace_id The id of the workspace. For an explanation how to get the *workspace_id*, check out this [help-article](https://seatable.com/help/find-workspace-id-group/). Alternatively the API endpoint [get metadata](/reference/getmetadata) can be used. (required) * @param string $base_name The name of your base. (required) * @param string|null $exp Expiration time of the generated access token. Examples: 5h (= 5 hours) or 3d (= 3 days) (optional, default to '3d') * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getBaseTokenWithAccountToken'] to see the possible values for this operation @@ -450,7 +447,7 @@ public function getBaseTokenWithAccountTokenRequest($workspace_id, $base_name, $ * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return object|object + * @return \SeaTable\Client\Auth\GetBaseTokenWithApiToken200Response|object */ public function getBaseTokenWithApiToken($exp = '3d', string $contentType = self::contentTypes['getBaseTokenWithApiToken'][0]) { @@ -468,7 +465,7 @@ public function getBaseTokenWithApiToken($exp = '3d', string $contentType = self * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of object|object, HTTP status code, HTTP response headers (array of strings) + * @return array of \SeaTable\Client\Auth\GetBaseTokenWithApiToken200Response|object, HTTP status code, HTTP response headers (array of strings) */ public function getBaseTokenWithApiTokenWithHttpInfo($exp = '3d', string $contentType = self::contentTypes['getBaseTokenWithApiToken'][0]) { @@ -500,7 +497,7 @@ public function getBaseTokenWithApiTokenWithHttpInfo($exp = '3d', string $conten switch($statusCode) { case 200: return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\Auth\GetBaseTokenWithApiToken200Response', $request, $response, ); @@ -528,7 +525,7 @@ public function getBaseTokenWithApiTokenWithHttpInfo($exp = '3d', string $conten } return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\Auth\GetBaseTokenWithApiToken200Response', $request, $response, ); @@ -537,7 +534,7 @@ public function getBaseTokenWithApiTokenWithHttpInfo($exp = '3d', string $conten case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - 'object', + '\SeaTable\Client\Auth\GetBaseTokenWithApiToken200Response', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -591,7 +588,7 @@ function ($response) { */ public function getBaseTokenWithApiTokenAsyncWithHttpInfo($exp = '3d', string $contentType = self::contentTypes['getBaseTokenWithApiToken'][0]) { - $returnType = 'object'; + $returnType = '\SeaTable\Client\Auth\GetBaseTokenWithApiToken200Response'; $request = $this->getBaseTokenWithApiTokenRequest($exp, $contentType); return $this->client @@ -721,274 +718,6 @@ public function getBaseTokenWithApiTokenRequest($exp = '3d', string $contentType ); } - /** - * Operation getBaseTokenWithExternLink - * - * Get Base-Token with External-Link - * - * @param string $external_link_token The random string from the external link. Eg: - If the external link is https://cloud.seatable.io/dtable/external-links/c41cef71f5094827a786, the link token is *c41cef71f5094827a786*. - If the external link is a custom link like https://cloud.seatable.io/dtable/external-links/custom/my-personal-link, the link token is only *my-personal-link*. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getBaseTokenWithExternLink'] to see the possible values for this operation - * - * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format - * @throws \InvalidArgumentException - * @return \SeaTable\Client\Auth\AccessToken - */ - public function getBaseTokenWithExternLink($external_link_token, string $contentType = self::contentTypes['getBaseTokenWithExternLink'][0]) - { - list($response) = $this->getBaseTokenWithExternLinkWithHttpInfo($external_link_token, $contentType); - return $response; - } - - /** - * Operation getBaseTokenWithExternLinkWithHttpInfo - * - * Get Base-Token with External-Link - * - * @param string $external_link_token The random string from the external link. Eg: - If the external link is https://cloud.seatable.io/dtable/external-links/c41cef71f5094827a786, the link token is *c41cef71f5094827a786*. - If the external link is a custom link like https://cloud.seatable.io/dtable/external-links/custom/my-personal-link, the link token is only *my-personal-link*. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getBaseTokenWithExternLink'] to see the possible values for this operation - * - * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format - * @throws \InvalidArgumentException - * @return array of \SeaTable\Client\Auth\AccessToken, HTTP status code, HTTP response headers (array of strings) - */ - public function getBaseTokenWithExternLinkWithHttpInfo($external_link_token, string $contentType = self::contentTypes['getBaseTokenWithExternLink'][0]) - { - $request = $this->getBaseTokenWithExternLinkRequest($external_link_token, $contentType); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null - ); - } catch (ConnectException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - null, - null - ); - } - - $statusCode = $response->getStatusCode(); - - - switch($statusCode) { - case 200: - return $this->handleResponseWithDataType( - '\SeaTable\Client\Auth\AccessToken', - $request, - $response, - ); - } - - - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - return $this->handleResponseWithDataType( - '\SeaTable\Client\Auth\AccessToken', - $request, - $response, - ); - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\SeaTable\Client\Auth\AccessToken', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - throw $e; - } - - - throw $e; - } - } - - /** - * Operation getBaseTokenWithExternLinkAsync - * - * Get Base-Token with External-Link - * - * @param string $external_link_token The random string from the external link. Eg: - If the external link is https://cloud.seatable.io/dtable/external-links/c41cef71f5094827a786, the link token is *c41cef71f5094827a786*. - If the external link is a custom link like https://cloud.seatable.io/dtable/external-links/custom/my-personal-link, the link token is only *my-personal-link*. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getBaseTokenWithExternLink'] to see the possible values for this operation - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function getBaseTokenWithExternLinkAsync($external_link_token, string $contentType = self::contentTypes['getBaseTokenWithExternLink'][0]) - { - return $this->getBaseTokenWithExternLinkAsyncWithHttpInfo($external_link_token, $contentType) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation getBaseTokenWithExternLinkAsyncWithHttpInfo - * - * Get Base-Token with External-Link - * - * @param string $external_link_token The random string from the external link. Eg: - If the external link is https://cloud.seatable.io/dtable/external-links/c41cef71f5094827a786, the link token is *c41cef71f5094827a786*. - If the external link is a custom link like https://cloud.seatable.io/dtable/external-links/custom/my-personal-link, the link token is only *my-personal-link*. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getBaseTokenWithExternLink'] to see the possible values for this operation - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function getBaseTokenWithExternLinkAsyncWithHttpInfo($external_link_token, string $contentType = self::contentTypes['getBaseTokenWithExternLink'][0]) - { - $returnType = '\SeaTable\Client\Auth\AccessToken'; - $request = $this->getBaseTokenWithExternLinkRequest($external_link_token, $contentType); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'getBaseTokenWithExternLink' - * - * @param string $external_link_token The random string from the external link. Eg: - If the external link is https://cloud.seatable.io/dtable/external-links/c41cef71f5094827a786, the link token is *c41cef71f5094827a786*. - If the external link is a custom link like https://cloud.seatable.io/dtable/external-links/custom/my-personal-link, the link token is only *my-personal-link*. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getBaseTokenWithExternLink'] to see the possible values for this operation - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - public function getBaseTokenWithExternLinkRequest($external_link_token, string $contentType = self::contentTypes['getBaseTokenWithExternLink'][0]) - { - - // verify the required parameter 'external_link_token' is set - if ($external_link_token === null || (is_array($external_link_token) && count($external_link_token) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $external_link_token when calling getBaseTokenWithExternLink' - ); - } - - - $resourcePath = '/api/v2.1/external-link-tokens/{external_link_token}/access-token/'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - - // path params - if ($external_link_token !== null) { - $resourcePath = str_replace( - '{' . 'external_link_token' . '}', - ObjectSerializer::toPathValue($external_link_token), - $resourcePath - ); - } - - - $headers = $this->headerSelector->selectHeaders( - ['application/json', ], - $contentType, - $multipart - ); - - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } - - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $operationHost = $this->config->getHost(); - $query = ObjectSerializer::buildQuery($queryParams); - return new Request( - 'GET', - $operationHost . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - /** * Create http client option * @@ -1005,6 +734,14 @@ protected function createHttpClientOption() } } + if ($this->config->getCertFile()) { + $options[RequestOptions::CERT] = $this->config->getCertFile(); + } + + if ($this->config->getKeyFile()) { + $options[RequestOptions::SSL_KEY] = $this->config->getKeyFile(); + } + return $options; } diff --git a/lib/Auth/GetBaseTokenWithApiToken200Response.php b/lib/Auth/GetBaseTokenWithApiToken200Response.php new file mode 100644 index 00000000..6bfe301d --- /dev/null +++ b/lib/Auth/GetBaseTokenWithApiToken200Response.php @@ -0,0 +1,612 @@ + + */ +class GetBaseTokenWithApiToken200Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'getBaseTokenWithApiToken_200_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'app_name' => 'string', + 'access_token' => 'string', + 'dtable_uuid' => 'string', + 'dtable_server' => 'string', + 'workspace_id' => 'int', + 'use_api_gateway' => 'bool', + 'dtable_name' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'app_name' => null, + 'access_token' => null, + 'dtable_uuid' => null, + 'dtable_server' => null, + 'workspace_id' => null, + 'use_api_gateway' => null, + 'dtable_name' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'app_name' => false, + 'access_token' => false, + 'dtable_uuid' => false, + 'dtable_server' => false, + 'workspace_id' => false, + 'use_api_gateway' => false, + 'dtable_name' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'app_name' => 'app_name', + 'access_token' => 'access_token', + 'dtable_uuid' => 'dtable_uuid', + 'dtable_server' => 'dtable_server', + 'workspace_id' => 'workspace_id', + 'use_api_gateway' => 'use_api_gateway', + 'dtable_name' => 'dtable_name' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'app_name' => 'setAppName', + 'access_token' => 'setAccessToken', + 'dtable_uuid' => 'setDtableUuid', + 'dtable_server' => 'setDtableServer', + 'workspace_id' => 'setWorkspaceId', + 'use_api_gateway' => 'setUseApiGateway', + 'dtable_name' => 'setDtableName' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'app_name' => 'getAppName', + 'access_token' => 'getAccessToken', + 'dtable_uuid' => 'getDtableUuid', + 'dtable_server' => 'getDtableServer', + 'workspace_id' => 'getWorkspaceId', + 'use_api_gateway' => 'getUseApiGateway', + 'dtable_name' => 'getDtableName' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('app_name', $data ?? [], null); + $this->setIfExists('access_token', $data ?? [], null); + $this->setIfExists('dtable_uuid', $data ?? [], null); + $this->setIfExists('dtable_server', $data ?? [], null); + $this->setIfExists('workspace_id', $data ?? [], null); + $this->setIfExists('use_api_gateway', $data ?? [], null); + $this->setIfExists('dtable_name', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets app_name + * + * @return string|null + */ + public function getAppName() + { + return $this->container['app_name']; + } + + /** + * Sets app_name + * + * @param string|null $app_name app_name + * + * @return self + */ + public function setAppName($app_name) + { + if (is_null($app_name)) { + throw new \InvalidArgumentException('non-nullable app_name cannot be null'); + } + $this->container['app_name'] = $app_name; + + return $this; + } + + /** + * Gets access_token + * + * @return string|null + */ + public function getAccessToken() + { + return $this->container['access_token']; + } + + /** + * Sets access_token + * + * @param string|null $access_token access_token + * + * @return self + */ + public function setAccessToken($access_token) + { + if (is_null($access_token)) { + throw new \InvalidArgumentException('non-nullable access_token cannot be null'); + } + $this->container['access_token'] = $access_token; + + return $this; + } + + /** + * Gets dtable_uuid + * + * @return string|null + */ + public function getDtableUuid() + { + return $this->container['dtable_uuid']; + } + + /** + * Sets dtable_uuid + * + * @param string|null $dtable_uuid dtable_uuid + * + * @return self + */ + public function setDtableUuid($dtable_uuid) + { + if (is_null($dtable_uuid)) { + throw new \InvalidArgumentException('non-nullable dtable_uuid cannot be null'); + } + $this->container['dtable_uuid'] = $dtable_uuid; + + return $this; + } + + /** + * Gets dtable_server + * + * @return string|null + */ + public function getDtableServer() + { + return $this->container['dtable_server']; + } + + /** + * Sets dtable_server + * + * @param string|null $dtable_server dtable_server + * + * @return self + */ + public function setDtableServer($dtable_server) + { + if (is_null($dtable_server)) { + throw new \InvalidArgumentException('non-nullable dtable_server cannot be null'); + } + $this->container['dtable_server'] = $dtable_server; + + return $this; + } + + /** + * Gets workspace_id + * + * @return int|null + */ + public function getWorkspaceId() + { + return $this->container['workspace_id']; + } + + /** + * Sets workspace_id + * + * @param int|null $workspace_id workspace_id + * + * @return self + */ + public function setWorkspaceId($workspace_id) + { + if (is_null($workspace_id)) { + throw new \InvalidArgumentException('non-nullable workspace_id cannot be null'); + } + $this->container['workspace_id'] = $workspace_id; + + return $this; + } + + /** + * Gets use_api_gateway + * + * @return bool|null + */ + public function getUseApiGateway() + { + return $this->container['use_api_gateway']; + } + + /** + * Sets use_api_gateway + * + * @param bool|null $use_api_gateway use_api_gateway + * + * @return self + */ + public function setUseApiGateway($use_api_gateway) + { + if (is_null($use_api_gateway)) { + throw new \InvalidArgumentException('non-nullable use_api_gateway cannot be null'); + } + $this->container['use_api_gateway'] = $use_api_gateway; + + return $this; + } + + /** + * Gets dtable_name + * + * @return string|null + */ + public function getDtableName() + { + return $this->container['dtable_name']; + } + + /** + * Sets dtable_name + * + * @param string|null $dtable_name dtable_name + * + * @return self + */ + public function setDtableName($dtable_name) + { + if (is_null($dtable_name)) { + throw new \InvalidArgumentException('non-nullable dtable_name cannot be null'); + } + $this->container['dtable_name'] = $dtable_name; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Auth/ModelInterface.php b/lib/Auth/ModelInterface.php index 7d611d8d..de754cda 100644 --- a/lib/Auth/ModelInterface.php +++ b/lib/Auth/ModelInterface.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ diff --git a/lib/Base/ActivitiesLogsApi.php b/lib/Base/ActivitiesLogsApi.php index f03e133b..f7353d73 100644 --- a/lib/Base/ActivitiesLogsApi.php +++ b/lib/Base/ActivitiesLogsApi.php @@ -14,7 +14,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -771,6 +771,14 @@ protected function createHttpClientOption() } } + if ($this->config->getCertFile()) { + $options[RequestOptions::CERT] = $this->config->getCertFile(); + } + + if ($this->config->getKeyFile()) { + $options[RequestOptions::SSL_KEY] = $this->config->getKeyFile(); + } + return $options; } diff --git a/lib/Base/AddSingleMultipleSelectOptions.php b/lib/Base/AddSingleMultipleSelectOptions.php index 73b7c08a..ad138eca 100644 --- a/lib/Base/AddSingleMultipleSelectOptions.php +++ b/lib/Base/AddSingleMultipleSelectOptions.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -394,11 +394,11 @@ public function setOptions($options) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -406,12 +406,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -436,11 +436,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/AddSingleMultipleSelectOptionsOptionsInner.php b/lib/Base/AddSingleMultipleSelectOptionsOptionsInner.php index 03fe293a..c903ab66 100644 --- a/lib/Base/AddSingleMultipleSelectOptionsOptionsInner.php +++ b/lib/Base/AddSingleMultipleSelectOptionsOptionsInner.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -385,11 +385,11 @@ public function setTextColor($text_color) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -397,12 +397,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -427,11 +427,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/AppendColumnsRequest.php b/lib/Base/AppendColumnsRequest.php index 5abcda15..e93fc9c2 100644 --- a/lib/Base/AppendColumnsRequest.php +++ b/lib/Base/AppendColumnsRequest.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -351,11 +351,11 @@ public function setColumns($columns) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -363,12 +363,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -393,11 +393,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/AppendColumnsRequestColumnsInner.php b/lib/Base/AppendColumnsRequestColumnsInner.php index 1c2ea5be..4ec89ccf 100644 --- a/lib/Base/AppendColumnsRequestColumnsInner.php +++ b/lib/Base/AppendColumnsRequestColumnsInner.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -245,7 +245,7 @@ public function getModelName() return self::$openAPIModelName; } - public const COLUMN_TYPE_FILE = 'file'; + public const COLUMN_TYPE_BUTTON = 'button'; /** * Gets allowable values of the enum @@ -255,7 +255,7 @@ public function getModelName() public function getColumnTypeAllowableValues() { return [ - self::COLUMN_TYPE_FILE, + self::COLUMN_TYPE_BUTTON, ]; } @@ -469,11 +469,11 @@ public function setColumnData($column_data) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -481,12 +481,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -511,11 +511,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/AppendRow.php b/lib/Base/AppendRow.php index fd2a341d..9b7dfe73 100644 --- a/lib/Base/AppendRow.php +++ b/lib/Base/AppendRow.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -392,11 +392,11 @@ public function setApplyDefault($apply_default) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -404,12 +404,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -434,11 +434,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/AppendRows.php b/lib/Base/AppendRows.php index 7c0a810b..0391825c 100644 --- a/lib/Base/AppendRows.php +++ b/lib/Base/AppendRows.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -392,11 +392,11 @@ public function setApplyDefault($apply_default) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -404,12 +404,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -434,11 +434,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/AppendRows200Response.php b/lib/Base/AppendRows200Response.php new file mode 100644 index 00000000..0bc1f647 --- /dev/null +++ b/lib/Base/AppendRows200Response.php @@ -0,0 +1,476 @@ + + */ +class AppendRows200Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'appendRows_200_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'inserted_row_count' => 'int', + 'row_ids' => 'object[]', + 'first_row' => 'object' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'inserted_row_count' => null, + 'row_ids' => null, + 'first_row' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'inserted_row_count' => false, + 'row_ids' => false, + 'first_row' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'inserted_row_count' => 'inserted_row_count', + 'row_ids' => 'row_ids', + 'first_row' => 'first_row' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'inserted_row_count' => 'setInsertedRowCount', + 'row_ids' => 'setRowIds', + 'first_row' => 'setFirstRow' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'inserted_row_count' => 'getInsertedRowCount', + 'row_ids' => 'getRowIds', + 'first_row' => 'getFirstRow' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('inserted_row_count', $data ?? [], null); + $this->setIfExists('row_ids', $data ?? [], null); + $this->setIfExists('first_row', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets inserted_row_count + * + * @return int|null + */ + public function getInsertedRowCount() + { + return $this->container['inserted_row_count']; + } + + /** + * Sets inserted_row_count + * + * @param int|null $inserted_row_count inserted_row_count + * + * @return self + */ + public function setInsertedRowCount($inserted_row_count) + { + if (is_null($inserted_row_count)) { + throw new \InvalidArgumentException('non-nullable inserted_row_count cannot be null'); + } + $this->container['inserted_row_count'] = $inserted_row_count; + + return $this; + } + + /** + * Gets row_ids + * + * @return object[]|null + */ + public function getRowIds() + { + return $this->container['row_ids']; + } + + /** + * Sets row_ids + * + * @param object[]|null $row_ids row_ids + * + * @return self + */ + public function setRowIds($row_ids) + { + if (is_null($row_ids)) { + throw new \InvalidArgumentException('non-nullable row_ids cannot be null'); + } + $this->container['row_ids'] = $row_ids; + + return $this; + } + + /** + * Gets first_row + * + * @return object|null + */ + public function getFirstRow() + { + return $this->container['first_row']; + } + + /** + * Sets first_row + * + * @param object|null $first_row first_row + * + * @return self + */ + public function setFirstRow($first_row) + { + if (is_null($first_row)) { + throw new \InvalidArgumentException('non-nullable first_row cannot be null'); + } + $this->container['first_row'] = $first_row; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Base/ArchiveView.php b/lib/Base/ArchiveView.php index 06fdbdc6..18d8e5e8 100644 --- a/lib/Base/ArchiveView.php +++ b/lib/Base/ArchiveView.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -341,7 +341,7 @@ public function getViewName() /** * Sets view_name * - * @param string $view_name The name of the view to perform the operation on. Alternatively, you can use the `view_id` instead of `view_name`. If using `view_id`, ensure that the key in the request body is replaced accordingly. **Example:** Instead of `view_name: Default View` you an use `view_id: 0000`. + * @param string $view_name The name of the view to perform the operation on. Alternatively, you can use the `view_id` instead of `view_name`. If using `view_id`, ensure that the key in the request body is replaced accordingly. **Example:** Instead of `view_name: Default View` you can use `view_id: 0000`. * * @return self */ @@ -357,11 +357,11 @@ public function setViewName($view_name) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -369,12 +369,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -399,11 +399,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/AutomaticFilterPredicate.php b/lib/Base/AutomaticFilterPredicate.php index bf906a8a..b0925190 100644 --- a/lib/Base/AutomaticFilterPredicate.php +++ b/lib/Base/AutomaticFilterPredicate.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ diff --git a/lib/Base/AutonumberColumn.php b/lib/Base/AutonumberColumn.php index 2fd80513..b13eaf62 100644 --- a/lib/Base/AutonumberColumn.php +++ b/lib/Base/AutonumberColumn.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -467,11 +467,11 @@ public function setColumnData($column_data) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -479,12 +479,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -509,11 +509,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/AutonumberColumnFormat.php b/lib/Base/AutonumberColumnFormat.php index 72ab8fb6..f78387be 100644 --- a/lib/Base/AutonumberColumnFormat.php +++ b/lib/Base/AutonumberColumnFormat.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -34,7 +34,7 @@ * AutonumberColumnFormat Class Doc Comment * * @category Class - * @description Specify the auto number column. + * @description Specify the auto number column. The `format` field defines the number pattern (e.g. \"0000\" for 4 digits). Use `prefix_type` to add a prefix: \"string\" for a custom text prefix, or \"date\" for a date-based prefix. * @package SeaTable\Client * @author OpenAPI Generator team * @link https://openapi-generator.tech @@ -57,7 +57,10 @@ class AutonumberColumnFormat implements ModelInterface, ArrayAccess, \JsonSerial * @var string[] */ protected static $openAPITypes = [ - 'format' => 'string' + 'format' => 'string', + 'digits' => 'int', + 'prefix_type' => 'string', + 'prefix' => 'string' ]; /** @@ -68,7 +71,10 @@ class AutonumberColumnFormat implements ModelInterface, ArrayAccess, \JsonSerial * @psalm-var array */ protected static $openAPIFormats = [ - 'format' => null + 'format' => null, + 'digits' => null, + 'prefix_type' => null, + 'prefix' => null ]; /** @@ -77,7 +83,10 @@ class AutonumberColumnFormat implements ModelInterface, ArrayAccess, \JsonSerial * @var boolean[] */ protected static array $openAPINullables = [ - 'format' => false + 'format' => false, + 'digits' => false, + 'prefix_type' => false, + 'prefix' => false ]; /** @@ -166,7 +175,10 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'format' => 'format' + 'format' => 'format', + 'digits' => 'digits', + 'prefix_type' => 'prefix_type', + 'prefix' => 'prefix' ]; /** @@ -175,7 +187,10 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'format' => 'setFormat' + 'format' => 'setFormat', + 'digits' => 'setDigits', + 'prefix_type' => 'setPrefixType', + 'prefix' => 'setPrefix' ]; /** @@ -184,7 +199,10 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'format' => 'getFormat' + 'format' => 'getFormat', + 'digits' => 'getDigits', + 'prefix_type' => 'getPrefixType', + 'prefix' => 'getPrefix' ]; /** @@ -228,6 +246,21 @@ public function getModelName() return self::$openAPIModelName; } + public const PREFIX_TYPE_STRING = 'string'; + public const PREFIX_TYPE_DATE = 'date'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getPrefixTypeAllowableValues() + { + return [ + self::PREFIX_TYPE_STRING, + self::PREFIX_TYPE_DATE, + ]; + } /** * Associative array for storing property values @@ -245,6 +278,9 @@ public function getModelName() public function __construct(?array $data = null) { $this->setIfExists('format', $data ?? [], null); + $this->setIfExists('digits', $data ?? [], null); + $this->setIfExists('prefix_type', $data ?? [], null); + $this->setIfExists('prefix', $data ?? [], null); } /** @@ -277,6 +313,18 @@ public function listInvalidProperties() if ($this->container['format'] === null) { $invalidProperties[] = "'format' can't be null"; } + if ($this->container['digits'] === null) { + $invalidProperties[] = "'digits' can't be null"; + } + $allowedValues = $this->getPrefixTypeAllowableValues(); + if (!is_null($this->container['prefix_type']) && !in_array($this->container['prefix_type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'prefix_type', must be one of '%s'", + $this->container['prefix_type'], + implode("', '", $allowedValues) + ); + } + return $invalidProperties; } @@ -305,7 +353,7 @@ public function getFormat() /** * Sets format * - * @param string $format format + * @param string $format The number format pattern. * * @return self */ @@ -318,14 +366,105 @@ public function setFormat($format) return $this; } + + /** + * Gets digits + * + * @return int + */ + public function getDigits() + { + return $this->container['digits']; + } + + /** + * Sets digits + * + * @param int $digits Number of digits (must match the zeros in `format`). + * + * @return self + */ + public function setDigits($digits) + { + if (is_null($digits)) { + throw new \InvalidArgumentException('non-nullable digits cannot be null'); + } + $this->container['digits'] = $digits; + + return $this; + } + + /** + * Gets prefix_type + * + * @return string|null + */ + public function getPrefixType() + { + return $this->container['prefix_type']; + } + + /** + * Sets prefix_type + * + * @param string|null $prefix_type Type of prefix — \"string\" for a custom prefix, \"date\" for a date-based prefix (YYYYMMDD). + * + * @return self + */ + public function setPrefixType($prefix_type) + { + if (is_null($prefix_type)) { + throw new \InvalidArgumentException('non-nullable prefix_type cannot be null'); + } + $allowedValues = $this->getPrefixTypeAllowableValues(); + if (!in_array($prefix_type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'prefix_type', must be one of '%s'", + $prefix_type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['prefix_type'] = $prefix_type; + + return $this; + } + + /** + * Gets prefix + * + * @return string|null + */ + public function getPrefix() + { + return $this->container['prefix']; + } + + /** + * Sets prefix + * + * @param string|null $prefix The prefix value (only used when `prefix_type` is \"string\"). + * + * @return self + */ + public function setPrefix($prefix) + { + if (is_null($prefix)) { + throw new \InvalidArgumentException('non-nullable prefix cannot be null'); + } + $this->container['prefix'] = $prefix; + + return $this; + } /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -333,12 +472,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -363,11 +502,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/AutonumberColumnWithTableName.php b/lib/Base/AutonumberColumnWithTableName.php index 4dce9a5b..64cefa42 100644 --- a/lib/Base/AutonumberColumnWithTableName.php +++ b/lib/Base/AutonumberColumnWithTableName.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -503,11 +503,11 @@ public function setColumnData($column_data) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -515,12 +515,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -545,11 +545,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/Base.php b/lib/Base/Base.php index 72afbeee..ed9961e2 100644 --- a/lib/Base/Base.php +++ b/lib/Base/Base.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -565,11 +565,11 @@ public function setIdRowMap($id_row_map) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -577,12 +577,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -607,11 +607,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/BaseInfoApi.php b/lib/Base/BaseInfoApi.php index 1ab244c1..c7ea1949 100644 --- a/lib/Base/BaseInfoApi.php +++ b/lib/Base/BaseInfoApi.php @@ -14,7 +14,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -137,7 +137,7 @@ public function getConfig() * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return object + * @return object|object */ public function getMetadata($base_uuid, string $contentType = self::contentTypes['getMetadata'][0]) { @@ -155,7 +155,7 @@ public function getMetadata($base_uuid, string $contentType = self::contentTypes * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) + * @return array of object|object, HTTP status code, HTTP response headers (array of strings) */ public function getMetadataWithHttpInfo($base_uuid, string $contentType = self::contentTypes['getMetadata'][0]) { @@ -191,6 +191,12 @@ public function getMetadataWithHttpInfo($base_uuid, string $contentType = self:: $request, $response, ); + case 403: + return $this->handleResponseWithDataType( + 'object', + $request, + $response, + ); } @@ -223,6 +229,14 @@ public function getMetadataWithHttpInfo($base_uuid, string $contentType = self:: ); $e->setResponseObject($data); throw $e; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + 'object', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; } @@ -693,6 +707,14 @@ protected function createHttpClientOption() } } + if ($this->config->getCertFile()) { + $options[RequestOptions::CERT] = $this->config->getCertFile(); + } + + if ($this->config->getKeyFile()) { + $options[RequestOptions::SSL_KEY] = $this->config->getKeyFile(); + } + return $options; } diff --git a/lib/Base/BigDataApi.php b/lib/Base/BigDataApi.php index f080eb45..2ed44ba0 100644 --- a/lib/Base/BigDataApi.php +++ b/lib/Base/BigDataApi.php @@ -14,7 +14,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -1034,11 +1034,12 @@ public function moveRowsToBigDataRequest($base_uuid, $archive_view = null, strin * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return void + * @return object */ public function moveRowsToNormalBackend($base_uuid, $move_rows_to_normal_backend_request = null, string $contentType = self::contentTypes['moveRowsToNormalBackend'][0]) { - $this->moveRowsToNormalBackendWithHttpInfo($base_uuid, $move_rows_to_normal_backend_request, $contentType); + list($response) = $this->moveRowsToNormalBackendWithHttpInfo($base_uuid, $move_rows_to_normal_backend_request, $contentType); + return $response; } /** @@ -1052,7 +1053,7 @@ public function moveRowsToNormalBackend($base_uuid, $move_rows_to_normal_backend * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of null, HTTP status code, HTTP response headers (array of strings) + * @return array of object, HTTP status code, HTTP response headers (array of strings) */ public function moveRowsToNormalBackendWithHttpInfo($base_uuid, $move_rows_to_normal_backend_request = null, string $contentType = self::contentTypes['moveRowsToNormalBackend'][0]) { @@ -1081,9 +1082,45 @@ public function moveRowsToNormalBackendWithHttpInfo($base_uuid, $move_rows_to_no $statusCode = $response->getStatusCode(); - return [null, $statusCode, $response->getHeaders()]; + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + 'object', + $request, + $response, + ); + } + + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + 'object', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + 'object', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; } @@ -1127,14 +1164,27 @@ function ($response) { */ public function moveRowsToNormalBackendAsyncWithHttpInfo($base_uuid, $move_rows_to_normal_backend_request = null, string $contentType = self::contentTypes['moveRowsToNormalBackend'][0]) { - $returnType = ''; + $returnType = 'object'; $request = $this->moveRowsToNormalBackendRequest($base_uuid, $move_rows_to_normal_backend_request, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) ->then( function ($response) use ($returnType) { - return [null, $response->getStatusCode(), $response->getHeaders()]; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; }, function ($exception) { $response = $exception->getResponse(); @@ -1198,7 +1248,7 @@ public function moveRowsToNormalBackendRequest($base_uuid, $move_rows_to_normal_ $headers = $this->headerSelector->selectHeaders( - [], + ['application/json', ], $contentType, $multipart ); @@ -1575,6 +1625,14 @@ protected function createHttpClientOption() } } + if ($this->config->getCertFile()) { + $options[RequestOptions::CERT] = $this->config->getCertFile(); + } + + if ($this->config->getKeyFile()) { + $options[RequestOptions::SSL_KEY] = $this->config->getKeyFile(); + } + return $options; } diff --git a/lib/Base/ButtonColumn.php b/lib/Base/ButtonColumn.php index 0321fda9..166993a4 100644 --- a/lib/Base/ButtonColumn.php +++ b/lib/Base/ButtonColumn.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -246,7 +246,7 @@ public function getModelName() return self::$openAPIModelName; } - public const COLUMN_TYPE_FILE = 'file'; + public const COLUMN_TYPE_BUTTON = 'button'; /** * Gets allowable values of the enum @@ -256,7 +256,7 @@ public function getModelName() public function getColumnTypeAllowableValues() { return [ - self::COLUMN_TYPE_FILE, + self::COLUMN_TYPE_BUTTON, ]; } @@ -470,11 +470,11 @@ public function setColumnData($column_data) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -482,12 +482,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -512,11 +512,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/ButtonColumnFormat.php b/lib/Base/ButtonColumnFormat.php index 82419399..0c7f19ef 100644 --- a/lib/Base/ButtonColumnFormat.php +++ b/lib/Base/ButtonColumnFormat.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -546,11 +546,11 @@ public function setSelectedColumns($selected_columns) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -558,12 +558,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -588,11 +588,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/ButtonColumnFormatSelectedColumnsInner.php b/lib/Base/ButtonColumnFormatSelectedColumnsInner.php index 1cd9eb0c..2d1edc53 100644 --- a/lib/Base/ButtonColumnFormatSelectedColumnsInner.php +++ b/lib/Base/ButtonColumnFormatSelectedColumnsInner.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -351,11 +351,11 @@ public function setValue($value) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -363,12 +363,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -393,11 +393,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/ButtonColumnWithTableName.php b/lib/Base/ButtonColumnWithTableName.php index 13ca9fd3..8b42e9b3 100644 --- a/lib/Base/ButtonColumnWithTableName.php +++ b/lib/Base/ButtonColumnWithTableName.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -251,7 +251,7 @@ public function getModelName() return self::$openAPIModelName; } - public const COLUMN_TYPE_FILE = 'file'; + public const COLUMN_TYPE_BUTTON = 'button'; /** * Gets allowable values of the enum @@ -261,7 +261,7 @@ public function getModelName() public function getColumnTypeAllowableValues() { return [ - self::COLUMN_TYPE_FILE, + self::COLUMN_TYPE_BUTTON, ]; } @@ -506,11 +506,11 @@ public function setColumnData($column_data) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -518,12 +518,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -548,11 +548,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/CheckboxColumn.php b/lib/Base/CheckboxColumn.php index 28cff9bc..53a8ac96 100644 --- a/lib/Base/CheckboxColumn.php +++ b/lib/Base/CheckboxColumn.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -433,11 +433,11 @@ public function setAnchorColumn($anchor_column) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -445,12 +445,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -475,11 +475,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/CheckboxColumnWithTableName.php b/lib/Base/CheckboxColumnWithTableName.php index 04d46a59..dc108053 100644 --- a/lib/Base/CheckboxColumnWithTableName.php +++ b/lib/Base/CheckboxColumnWithTableName.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -469,11 +469,11 @@ public function setAnchorColumn($anchor_column) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -481,12 +481,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -511,11 +511,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/CheckboxFilterPredicate.php b/lib/Base/CheckboxFilterPredicate.php index 78f8953a..8865cd13 100644 --- a/lib/Base/CheckboxFilterPredicate.php +++ b/lib/Base/CheckboxFilterPredicate.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ diff --git a/lib/Base/CollaboratorColumn.php b/lib/Base/CollaboratorColumn.php index 3533877f..1da1a007 100644 --- a/lib/Base/CollaboratorColumn.php +++ b/lib/Base/CollaboratorColumn.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -433,11 +433,11 @@ public function setAnchorColumn($anchor_column) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -445,12 +445,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -475,11 +475,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/CollaboratorColumnWithTableName.php b/lib/Base/CollaboratorColumnWithTableName.php index 44537f76..22ef34ee 100644 --- a/lib/Base/CollaboratorColumnWithTableName.php +++ b/lib/Base/CollaboratorColumnWithTableName.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -469,11 +469,11 @@ public function setAnchorColumn($anchor_column) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -481,12 +481,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -511,11 +511,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/CollaboratorFilterPredicate.php b/lib/Base/CollaboratorFilterPredicate.php index 47904121..477bced0 100644 --- a/lib/Base/CollaboratorFilterPredicate.php +++ b/lib/Base/CollaboratorFilterPredicate.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ diff --git a/lib/Base/ColumnsApi.php b/lib/Base/ColumnsApi.php index 2460cc88..a8a3b8ef 100644 --- a/lib/Base/ColumnsApi.php +++ b/lib/Base/ColumnsApi.php @@ -14,7 +14,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -1311,7 +1311,7 @@ public function deleteSelectOptionRequest($base_uuid, $delete_select_options = n * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return object + * @return \SeaTable\Client\Base\UpdateColumn200Response */ public function insertColumn($base_uuid, $insert_column_request = null, string $contentType = self::contentTypes['insertColumn'][0]) { @@ -1330,7 +1330,7 @@ public function insertColumn($base_uuid, $insert_column_request = null, string $ * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) + * @return array of \SeaTable\Client\Base\UpdateColumn200Response, HTTP status code, HTTP response headers (array of strings) */ public function insertColumnWithHttpInfo($base_uuid, $insert_column_request = null, string $contentType = self::contentTypes['insertColumn'][0]) { @@ -1362,7 +1362,7 @@ public function insertColumnWithHttpInfo($base_uuid, $insert_column_request = nu switch($statusCode) { case 200: return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\Base\UpdateColumn200Response', $request, $response, ); @@ -1384,7 +1384,7 @@ public function insertColumnWithHttpInfo($base_uuid, $insert_column_request = nu } return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\Base\UpdateColumn200Response', $request, $response, ); @@ -1393,7 +1393,7 @@ public function insertColumnWithHttpInfo($base_uuid, $insert_column_request = nu case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - 'object', + '\SeaTable\Client\Base\UpdateColumn200Response', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1441,7 +1441,7 @@ function ($response) { */ public function insertColumnAsyncWithHttpInfo($base_uuid, $insert_column_request = null, string $contentType = self::contentTypes['insertColumn'][0]) { - $returnType = 'object'; + $returnType = '\SeaTable\Client\Base\UpdateColumn200Response'; $request = $this->insertColumnRequest($base_uuid, $insert_column_request, $contentType); return $this->client @@ -1595,7 +1595,7 @@ public function insertColumnRequest($base_uuid, $insert_column_request = null, s * * @param string $table_name The name of the table to perform the operation on. Alternatively, you can use the `table_id` instead of `table_name`. If using `table_id`, ensure that the key in the request body is replaced accordingly. **Example:** Instead of `table_name: Table1` you can use `table_id: 0000`. (required) * @param string $base_uuid The unique identifier of a base. Sometimes also called dtable_uuid. (required) - * @param string|null $view_name The name of the view to perform the operation on. Alternatively, you can use the `view_id` instead of `view_name`. If using `view_id`, ensure that the key in the request body is replaced accordingly. **Example:** Instead of `view_name: Default View` you an use `view_id: 0000`. (optional) + * @param string|null $view_name The name of the view to perform the operation on. Alternatively, you can use the `view_id` instead of `view_name`. If using `view_id`, ensure that the key in the request body is replaced accordingly. **Example:** Instead of `view_name: Default View` you can use `view_id: 0000`. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listColumns'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -1615,7 +1615,7 @@ public function listColumns($table_name, $base_uuid, $view_name = null, string $ * * @param string $table_name The name of the table to perform the operation on. Alternatively, you can use the `table_id` instead of `table_name`. If using `table_id`, ensure that the key in the request body is replaced accordingly. **Example:** Instead of `table_name: Table1` you can use `table_id: 0000`. (required) * @param string $base_uuid The unique identifier of a base. Sometimes also called dtable_uuid. (required) - * @param string|null $view_name The name of the view to perform the operation on. Alternatively, you can use the `view_id` instead of `view_name`. If using `view_id`, ensure that the key in the request body is replaced accordingly. **Example:** Instead of `view_name: Default View` you an use `view_id: 0000`. (optional) + * @param string|null $view_name The name of the view to perform the operation on. Alternatively, you can use the `view_id` instead of `view_name`. If using `view_id`, ensure that the key in the request body is replaced accordingly. **Example:** Instead of `view_name: Default View` you can use `view_id: 0000`. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listColumns'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -1702,7 +1702,7 @@ public function listColumnsWithHttpInfo($table_name, $base_uuid, $view_name = nu * * @param string $table_name The name of the table to perform the operation on. Alternatively, you can use the `table_id` instead of `table_name`. If using `table_id`, ensure that the key in the request body is replaced accordingly. **Example:** Instead of `table_name: Table1` you can use `table_id: 0000`. (required) * @param string $base_uuid The unique identifier of a base. Sometimes also called dtable_uuid. (required) - * @param string|null $view_name The name of the view to perform the operation on. Alternatively, you can use the `view_id` instead of `view_name`. If using `view_id`, ensure that the key in the request body is replaced accordingly. **Example:** Instead of `view_name: Default View` you an use `view_id: 0000`. (optional) + * @param string|null $view_name The name of the view to perform the operation on. Alternatively, you can use the `view_id` instead of `view_name`. If using `view_id`, ensure that the key in the request body is replaced accordingly. **Example:** Instead of `view_name: Default View` you can use `view_id: 0000`. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listColumns'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1725,7 +1725,7 @@ function ($response) { * * @param string $table_name The name of the table to perform the operation on. Alternatively, you can use the `table_id` instead of `table_name`. If using `table_id`, ensure that the key in the request body is replaced accordingly. **Example:** Instead of `table_name: Table1` you can use `table_id: 0000`. (required) * @param string $base_uuid The unique identifier of a base. Sometimes also called dtable_uuid. (required) - * @param string|null $view_name The name of the view to perform the operation on. Alternatively, you can use the `view_id` instead of `view_name`. If using `view_id`, ensure that the key in the request body is replaced accordingly. **Example:** Instead of `view_name: Default View` you an use `view_id: 0000`. (optional) + * @param string|null $view_name The name of the view to perform the operation on. Alternatively, you can use the `view_id` instead of `view_name`. If using `view_id`, ensure that the key in the request body is replaced accordingly. **Example:** Instead of `view_name: Default View` you can use `view_id: 0000`. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listColumns'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1777,7 +1777,7 @@ function ($exception) { * * @param string $table_name The name of the table to perform the operation on. Alternatively, you can use the `table_id` instead of `table_name`. If using `table_id`, ensure that the key in the request body is replaced accordingly. **Example:** Instead of `table_name: Table1` you can use `table_id: 0000`. (required) * @param string $base_uuid The unique identifier of a base. Sometimes also called dtable_uuid. (required) - * @param string|null $view_name The name of the view to perform the operation on. Alternatively, you can use the `view_id` instead of `view_name`. If using `view_id`, ensure that the key in the request body is replaced accordingly. **Example:** Instead of `view_name: Default View` you an use `view_id: 0000`. (optional) + * @param string|null $view_name The name of the view to perform the operation on. Alternatively, you can use the `view_id` instead of `view_name`. If using `view_id`, ensure that the key in the request body is replaced accordingly. **Example:** Instead of `view_name: Default View` you can use `view_id: 0000`. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listColumns'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1910,7 +1910,7 @@ public function listColumnsRequest($table_name, $base_uuid, $view_name = null, s * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return object + * @return \SeaTable\Client\Base\UpdateColumn200Response */ public function updateColumn($base_uuid, $update_column = null, string $contentType = self::contentTypes['updateColumn'][0]) { @@ -1929,7 +1929,7 @@ public function updateColumn($base_uuid, $update_column = null, string $contentT * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) + * @return array of \SeaTable\Client\Base\UpdateColumn200Response, HTTP status code, HTTP response headers (array of strings) */ public function updateColumnWithHttpInfo($base_uuid, $update_column = null, string $contentType = self::contentTypes['updateColumn'][0]) { @@ -1961,7 +1961,7 @@ public function updateColumnWithHttpInfo($base_uuid, $update_column = null, stri switch($statusCode) { case 200: return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\Base\UpdateColumn200Response', $request, $response, ); @@ -1983,7 +1983,7 @@ public function updateColumnWithHttpInfo($base_uuid, $update_column = null, stri } return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\Base\UpdateColumn200Response', $request, $response, ); @@ -1992,7 +1992,7 @@ public function updateColumnWithHttpInfo($base_uuid, $update_column = null, stri case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - 'object', + '\SeaTable\Client\Base\UpdateColumn200Response', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2040,7 +2040,7 @@ function ($response) { */ public function updateColumnAsyncWithHttpInfo($base_uuid, $update_column = null, string $contentType = self::contentTypes['updateColumn'][0]) { - $returnType = 'object'; + $returnType = '\SeaTable\Client\Base\UpdateColumn200Response'; $request = $this->updateColumnRequest($base_uuid, $update_column, $contentType); return $this->client @@ -2779,6 +2779,14 @@ protected function createHttpClientOption() } } + if ($this->config->getCertFile()) { + $options[RequestOptions::CERT] = $this->config->getCertFile(); + } + + if ($this->config->getKeyFile()) { + $options[RequestOptions::SSL_KEY] = $this->config->getKeyFile(); + } + return $options; } diff --git a/lib/Base/CreateRowComment.php b/lib/Base/CreateRowComment.php index 09b1ba98..83e45e64 100644 --- a/lib/Base/CreateRowComment.php +++ b/lib/Base/CreateRowComment.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -317,11 +317,11 @@ public function setComment($comment) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -329,12 +329,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -359,11 +359,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/CreateTableRequest.php b/lib/Base/CreateTableRequest.php index db3ca062..3d8650f7 100644 --- a/lib/Base/CreateTableRequest.php +++ b/lib/Base/CreateTableRequest.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -357,11 +357,11 @@ public function setColumns($columns) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -369,12 +369,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -399,11 +399,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/CreateTableRequestColumnsInner.php b/lib/Base/CreateTableRequestColumnsInner.php index f486cc9c..6ca688d3 100644 --- a/lib/Base/CreateTableRequestColumnsInner.php +++ b/lib/Base/CreateTableRequestColumnsInner.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -245,7 +245,7 @@ public function getModelName() return self::$openAPIModelName; } - public const COLUMN_TYPE_FILE = 'file'; + public const COLUMN_TYPE_BUTTON = 'button'; /** * Gets allowable values of the enum @@ -255,7 +255,7 @@ public function getModelName() public function getColumnTypeAllowableValues() { return [ - self::COLUMN_TYPE_FILE, + self::COLUMN_TYPE_BUTTON, ]; } @@ -469,11 +469,11 @@ public function setColumnData($column_data) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -481,12 +481,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -511,11 +511,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/CreateView200Response.php b/lib/Base/CreateView200Response.php new file mode 100644 index 00000000..9280f13a --- /dev/null +++ b/lib/Base/CreateView200Response.php @@ -0,0 +1,952 @@ + + */ +class CreateView200Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'createView_200_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + '_id' => 'string', + 'name' => 'string', + 'type' => 'string', + 'is_locked' => 'bool', + 'filter_conjunction' => 'string', + 'filters' => 'object[]', + 'sorts' => 'object[]', + 'groupbys' => 'object[]', + 'group_rows' => 'object[]', + 'groups' => 'object[]', + 'colorbys' => 'object', + 'hidden_columns' => 'object[]', + 'rows' => 'object[]', + 'formula_rows' => 'object', + 'link_rows' => 'object', + 'summaries' => 'object', + 'colors' => 'object' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + '_id' => null, + 'name' => null, + 'type' => null, + 'is_locked' => null, + 'filter_conjunction' => null, + 'filters' => null, + 'sorts' => null, + 'groupbys' => null, + 'group_rows' => null, + 'groups' => null, + 'colorbys' => null, + 'hidden_columns' => null, + 'rows' => null, + 'formula_rows' => null, + 'link_rows' => null, + 'summaries' => null, + 'colors' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + '_id' => false, + 'name' => false, + 'type' => false, + 'is_locked' => false, + 'filter_conjunction' => false, + 'filters' => false, + 'sorts' => false, + 'groupbys' => false, + 'group_rows' => false, + 'groups' => false, + 'colorbys' => false, + 'hidden_columns' => false, + 'rows' => false, + 'formula_rows' => false, + 'link_rows' => false, + 'summaries' => false, + 'colors' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + '_id' => '_id', + 'name' => 'name', + 'type' => 'type', + 'is_locked' => 'is_locked', + 'filter_conjunction' => 'filter_conjunction', + 'filters' => 'filters', + 'sorts' => 'sorts', + 'groupbys' => 'groupbys', + 'group_rows' => 'group_rows', + 'groups' => 'groups', + 'colorbys' => 'colorbys', + 'hidden_columns' => 'hidden_columns', + 'rows' => 'rows', + 'formula_rows' => 'formula_rows', + 'link_rows' => 'link_rows', + 'summaries' => 'summaries', + 'colors' => 'colors' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + '_id' => 'setId', + 'name' => 'setName', + 'type' => 'setType', + 'is_locked' => 'setIsLocked', + 'filter_conjunction' => 'setFilterConjunction', + 'filters' => 'setFilters', + 'sorts' => 'setSorts', + 'groupbys' => 'setGroupbys', + 'group_rows' => 'setGroupRows', + 'groups' => 'setGroups', + 'colorbys' => 'setColorbys', + 'hidden_columns' => 'setHiddenColumns', + 'rows' => 'setRows', + 'formula_rows' => 'setFormulaRows', + 'link_rows' => 'setLinkRows', + 'summaries' => 'setSummaries', + 'colors' => 'setColors' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + '_id' => 'getId', + 'name' => 'getName', + 'type' => 'getType', + 'is_locked' => 'getIsLocked', + 'filter_conjunction' => 'getFilterConjunction', + 'filters' => 'getFilters', + 'sorts' => 'getSorts', + 'groupbys' => 'getGroupbys', + 'group_rows' => 'getGroupRows', + 'groups' => 'getGroups', + 'colorbys' => 'getColorbys', + 'hidden_columns' => 'getHiddenColumns', + 'rows' => 'getRows', + 'formula_rows' => 'getFormulaRows', + 'link_rows' => 'getLinkRows', + 'summaries' => 'getSummaries', + 'colors' => 'getColors' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('_id', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('is_locked', $data ?? [], null); + $this->setIfExists('filter_conjunction', $data ?? [], null); + $this->setIfExists('filters', $data ?? [], null); + $this->setIfExists('sorts', $data ?? [], null); + $this->setIfExists('groupbys', $data ?? [], null); + $this->setIfExists('group_rows', $data ?? [], null); + $this->setIfExists('groups', $data ?? [], null); + $this->setIfExists('colorbys', $data ?? [], null); + $this->setIfExists('hidden_columns', $data ?? [], null); + $this->setIfExists('rows', $data ?? [], null); + $this->setIfExists('formula_rows', $data ?? [], null); + $this->setIfExists('link_rows', $data ?? [], null); + $this->setIfExists('summaries', $data ?? [], null); + $this->setIfExists('colors', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets _id + * + * @return string|null + */ + public function getId() + { + return $this->container['_id']; + } + + /** + * Sets _id + * + * @param string|null $_id _id + * + * @return self + */ + public function setId($_id) + { + if (is_null($_id)) { + throw new \InvalidArgumentException('non-nullable _id cannot be null'); + } + $this->container['_id'] = $_id; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name name + * + * @return self + */ + public function setName($name) + { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets type + * + * @return string|null + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type type + * + * @return self + */ + public function setType($type) + { + if (is_null($type)) { + throw new \InvalidArgumentException('non-nullable type cannot be null'); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets is_locked + * + * @return bool|null + */ + public function getIsLocked() + { + return $this->container['is_locked']; + } + + /** + * Sets is_locked + * + * @param bool|null $is_locked is_locked + * + * @return self + */ + public function setIsLocked($is_locked) + { + if (is_null($is_locked)) { + throw new \InvalidArgumentException('non-nullable is_locked cannot be null'); + } + $this->container['is_locked'] = $is_locked; + + return $this; + } + + /** + * Gets filter_conjunction + * + * @return string|null + */ + public function getFilterConjunction() + { + return $this->container['filter_conjunction']; + } + + /** + * Sets filter_conjunction + * + * @param string|null $filter_conjunction filter_conjunction + * + * @return self + */ + public function setFilterConjunction($filter_conjunction) + { + if (is_null($filter_conjunction)) { + throw new \InvalidArgumentException('non-nullable filter_conjunction cannot be null'); + } + $this->container['filter_conjunction'] = $filter_conjunction; + + return $this; + } + + /** + * Gets filters + * + * @return object[]|null + */ + public function getFilters() + { + return $this->container['filters']; + } + + /** + * Sets filters + * + * @param object[]|null $filters filters + * + * @return self + */ + public function setFilters($filters) + { + if (is_null($filters)) { + throw new \InvalidArgumentException('non-nullable filters cannot be null'); + } + $this->container['filters'] = $filters; + + return $this; + } + + /** + * Gets sorts + * + * @return object[]|null + */ + public function getSorts() + { + return $this->container['sorts']; + } + + /** + * Sets sorts + * + * @param object[]|null $sorts sorts + * + * @return self + */ + public function setSorts($sorts) + { + if (is_null($sorts)) { + throw new \InvalidArgumentException('non-nullable sorts cannot be null'); + } + $this->container['sorts'] = $sorts; + + return $this; + } + + /** + * Gets groupbys + * + * @return object[]|null + */ + public function getGroupbys() + { + return $this->container['groupbys']; + } + + /** + * Sets groupbys + * + * @param object[]|null $groupbys groupbys + * + * @return self + */ + public function setGroupbys($groupbys) + { + if (is_null($groupbys)) { + throw new \InvalidArgumentException('non-nullable groupbys cannot be null'); + } + $this->container['groupbys'] = $groupbys; + + return $this; + } + + /** + * Gets group_rows + * + * @return object[]|null + */ + public function getGroupRows() + { + return $this->container['group_rows']; + } + + /** + * Sets group_rows + * + * @param object[]|null $group_rows group_rows + * + * @return self + */ + public function setGroupRows($group_rows) + { + if (is_null($group_rows)) { + throw new \InvalidArgumentException('non-nullable group_rows cannot be null'); + } + $this->container['group_rows'] = $group_rows; + + return $this; + } + + /** + * Gets groups + * + * @return object[]|null + */ + public function getGroups() + { + return $this->container['groups']; + } + + /** + * Sets groups + * + * @param object[]|null $groups groups + * + * @return self + */ + public function setGroups($groups) + { + if (is_null($groups)) { + throw new \InvalidArgumentException('non-nullable groups cannot be null'); + } + $this->container['groups'] = $groups; + + return $this; + } + + /** + * Gets colorbys + * + * @return object|null + */ + public function getColorbys() + { + return $this->container['colorbys']; + } + + /** + * Sets colorbys + * + * @param object|null $colorbys colorbys + * + * @return self + */ + public function setColorbys($colorbys) + { + if (is_null($colorbys)) { + throw new \InvalidArgumentException('non-nullable colorbys cannot be null'); + } + $this->container['colorbys'] = $colorbys; + + return $this; + } + + /** + * Gets hidden_columns + * + * @return object[]|null + */ + public function getHiddenColumns() + { + return $this->container['hidden_columns']; + } + + /** + * Sets hidden_columns + * + * @param object[]|null $hidden_columns hidden_columns + * + * @return self + */ + public function setHiddenColumns($hidden_columns) + { + if (is_null($hidden_columns)) { + throw new \InvalidArgumentException('non-nullable hidden_columns cannot be null'); + } + $this->container['hidden_columns'] = $hidden_columns; + + return $this; + } + + /** + * Gets rows + * + * @return object[]|null + */ + public function getRows() + { + return $this->container['rows']; + } + + /** + * Sets rows + * + * @param object[]|null $rows rows + * + * @return self + */ + public function setRows($rows) + { + if (is_null($rows)) { + throw new \InvalidArgumentException('non-nullable rows cannot be null'); + } + $this->container['rows'] = $rows; + + return $this; + } + + /** + * Gets formula_rows + * + * @return object|null + */ + public function getFormulaRows() + { + return $this->container['formula_rows']; + } + + /** + * Sets formula_rows + * + * @param object|null $formula_rows formula_rows + * + * @return self + */ + public function setFormulaRows($formula_rows) + { + if (is_null($formula_rows)) { + throw new \InvalidArgumentException('non-nullable formula_rows cannot be null'); + } + $this->container['formula_rows'] = $formula_rows; + + return $this; + } + + /** + * Gets link_rows + * + * @return object|null + */ + public function getLinkRows() + { + return $this->container['link_rows']; + } + + /** + * Sets link_rows + * + * @param object|null $link_rows link_rows + * + * @return self + */ + public function setLinkRows($link_rows) + { + if (is_null($link_rows)) { + throw new \InvalidArgumentException('non-nullable link_rows cannot be null'); + } + $this->container['link_rows'] = $link_rows; + + return $this; + } + + /** + * Gets summaries + * + * @return object|null + */ + public function getSummaries() + { + return $this->container['summaries']; + } + + /** + * Sets summaries + * + * @param object|null $summaries summaries + * + * @return self + */ + public function setSummaries($summaries) + { + if (is_null($summaries)) { + throw new \InvalidArgumentException('non-nullable summaries cannot be null'); + } + $this->container['summaries'] = $summaries; + + return $this; + } + + /** + * Gets colors + * + * @return object|null + */ + public function getColors() + { + return $this->container['colors']; + } + + /** + * Sets colors + * + * @param object|null $colors colors + * + * @return self + */ + public function setColors($colors) + { + if (is_null($colors)) { + throw new \InvalidArgumentException('non-nullable colors cannot be null'); + } + $this->container['colors'] = $colors; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Base/CreatorColumn.php b/lib/Base/CreatorColumn.php index 19c5b17d..5f02e70e 100644 --- a/lib/Base/CreatorColumn.php +++ b/lib/Base/CreatorColumn.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -433,11 +433,11 @@ public function setAnchorColumn($anchor_column) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -445,12 +445,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -475,11 +475,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/CreatorColumnWithTableName.php b/lib/Base/CreatorColumnWithTableName.php index b599bd1a..ca26ee24 100644 --- a/lib/Base/CreatorColumnWithTableName.php +++ b/lib/Base/CreatorColumnWithTableName.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -469,11 +469,11 @@ public function setAnchorColumn($anchor_column) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -481,12 +481,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -511,11 +511,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/CreatorFilterPredicate.php b/lib/Base/CreatorFilterPredicate.php index 308e1908..ee98854f 100644 --- a/lib/Base/CreatorFilterPredicate.php +++ b/lib/Base/CreatorFilterPredicate.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ diff --git a/lib/Base/CtimeColumn.php b/lib/Base/CtimeColumn.php index db72b586..a7a77882 100644 --- a/lib/Base/CtimeColumn.php +++ b/lib/Base/CtimeColumn.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -433,11 +433,11 @@ public function setAnchorColumn($anchor_column) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -445,12 +445,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -475,11 +475,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/CtimeColumnWithTableName.php b/lib/Base/CtimeColumnWithTableName.php index a44b0c5f..892e71a9 100644 --- a/lib/Base/CtimeColumnWithTableName.php +++ b/lib/Base/CtimeColumnWithTableName.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -469,11 +469,11 @@ public function setAnchorColumn($anchor_column) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -481,12 +481,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -511,11 +511,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/DateColumn.php b/lib/Base/DateColumn.php index e81f1d0a..4c06eeee 100644 --- a/lib/Base/DateColumn.php +++ b/lib/Base/DateColumn.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -467,11 +467,11 @@ public function setColumnData($column_data) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -479,12 +479,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -509,11 +509,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/DateColumnFormat.php b/lib/Base/DateColumnFormat.php index d1a3f116..1f559e49 100644 --- a/lib/Base/DateColumnFormat.php +++ b/lib/Base/DateColumnFormat.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -366,11 +366,11 @@ public function setFormat($format) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -378,12 +378,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -408,11 +408,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/DateColumnWithTableName.php b/lib/Base/DateColumnWithTableName.php index 99956d01..4e4fefbb 100644 --- a/lib/Base/DateColumnWithTableName.php +++ b/lib/Base/DateColumnWithTableName.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -503,11 +503,11 @@ public function setColumnData($column_data) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -515,12 +515,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -545,11 +545,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/DateFilterPredicate.php b/lib/Base/DateFilterPredicate.php index 7a5d20c3..d69c9993 100644 --- a/lib/Base/DateFilterPredicate.php +++ b/lib/Base/DateFilterPredicate.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ diff --git a/lib/Base/DateFilterTermModifier.php b/lib/Base/DateFilterTermModifier.php index 926bca18..519dd878 100644 --- a/lib/Base/DateFilterTermModifier.php +++ b/lib/Base/DateFilterTermModifier.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ diff --git a/lib/Base/DeleteColumn.php b/lib/Base/DeleteColumn.php index 99f0c1af..6278ab29 100644 --- a/lib/Base/DeleteColumn.php +++ b/lib/Base/DeleteColumn.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -366,11 +366,11 @@ public function setColumn($column) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -378,12 +378,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -408,11 +408,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/DeleteRow.php b/lib/Base/DeleteRow.php index 3e797808..455dafd3 100644 --- a/lib/Base/DeleteRow.php +++ b/lib/Base/DeleteRow.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -287,8 +287,8 @@ public function listInvalidProperties() if ($this->container['row_id'] === null) { $invalidProperties[] = "'row_id' can't be null"; } - if (!preg_match("/^[a-zA-Z0-9\\-\\_]{22}$/", $this->container['row_id'])) { - $invalidProperties[] = "invalid value for 'row_id', must be conform to the pattern /^[a-zA-Z0-9\\-\\_]{22}$/."; + if (!preg_match("/^[A-Za-z0-9\\-\\_]{22}$/", $this->container['row_id'])) { + $invalidProperties[] = "invalid value for 'row_id', must be conform to the pattern /^[A-Za-z0-9\\-\\_]{22}$/."; } return $invalidProperties; @@ -356,8 +356,8 @@ public function setRowId($row_id) throw new \InvalidArgumentException('non-nullable row_id cannot be null'); } - if ((!preg_match("/^[a-zA-Z0-9\\-\\_]{22}$/", ObjectSerializer::toString($row_id)))) { - throw new \InvalidArgumentException("invalid value for \$row_id when calling DeleteRow., must conform to the pattern /^[a-zA-Z0-9\\-\\_]{22}$/."); + if ((!preg_match("/^[A-Za-z0-9\\-\\_]{22}$/", ObjectSerializer::toString($row_id)))) { + throw new \InvalidArgumentException("invalid value for \$row_id when calling DeleteRow., must conform to the pattern /^[A-Za-z0-9\\-\\_]{22}$/."); } $this->container['row_id'] = $row_id; @@ -367,11 +367,11 @@ public function setRowId($row_id) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -379,12 +379,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -409,11 +409,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/DeleteRows.php b/lib/Base/DeleteRows.php index f319769d..de8da7b9 100644 --- a/lib/Base/DeleteRows.php +++ b/lib/Base/DeleteRows.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -342,7 +342,7 @@ public function getRowIds() /** * Sets row_ids * - * @param string[] $row_ids Defines the rows which should be updated. + * @param string[] $row_ids Defines the rows which should be deleted. * * @return self */ @@ -358,11 +358,11 @@ public function setRowIds($row_ids) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -370,12 +370,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -400,11 +400,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/DeleteSelectOptions.php b/lib/Base/DeleteSelectOptions.php index c5c75ac7..872bc409 100644 --- a/lib/Base/DeleteSelectOptions.php +++ b/lib/Base/DeleteSelectOptions.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -403,11 +403,11 @@ public function setOptionNames($option_names) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -415,12 +415,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -445,11 +445,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/DeleteTable.php b/lib/Base/DeleteTable.php index a1991e50..00b708ec 100644 --- a/lib/Base/DeleteTable.php +++ b/lib/Base/DeleteTable.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -321,11 +321,11 @@ public function setTableName($table_name) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -333,12 +333,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -363,11 +363,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/DuplicateTable.php b/lib/Base/DuplicateTable.php index 10bcf98f..1dbf540e 100644 --- a/lib/Base/DuplicateTable.php +++ b/lib/Base/DuplicateTable.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -357,11 +357,11 @@ public function setIsDuplicateRecords($is_duplicate_records) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -369,12 +369,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -399,11 +399,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/DuplicateTable200Response.php b/lib/Base/DuplicateTable200Response.php new file mode 100644 index 00000000..908d2027 --- /dev/null +++ b/lib/Base/DuplicateTable200Response.php @@ -0,0 +1,578 @@ + + */ +class DuplicateTable200Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'duplicateTable_200_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + '_id' => 'string', + 'name' => 'string', + 'columns' => 'object[]', + 'rows' => 'object[]', + 'id_row_map' => 'object', + 'views' => 'object[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + '_id' => null, + 'name' => null, + 'columns' => null, + 'rows' => null, + 'id_row_map' => null, + 'views' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + '_id' => false, + 'name' => false, + 'columns' => false, + 'rows' => false, + 'id_row_map' => false, + 'views' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + '_id' => '_id', + 'name' => 'name', + 'columns' => 'columns', + 'rows' => 'rows', + 'id_row_map' => 'id_row_map', + 'views' => 'views' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + '_id' => 'setId', + 'name' => 'setName', + 'columns' => 'setColumns', + 'rows' => 'setRows', + 'id_row_map' => 'setIdRowMap', + 'views' => 'setViews' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + '_id' => 'getId', + 'name' => 'getName', + 'columns' => 'getColumns', + 'rows' => 'getRows', + 'id_row_map' => 'getIdRowMap', + 'views' => 'getViews' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('_id', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('columns', $data ?? [], null); + $this->setIfExists('rows', $data ?? [], null); + $this->setIfExists('id_row_map', $data ?? [], null); + $this->setIfExists('views', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets _id + * + * @return string|null + */ + public function getId() + { + return $this->container['_id']; + } + + /** + * Sets _id + * + * @param string|null $_id _id + * + * @return self + */ + public function setId($_id) + { + if (is_null($_id)) { + throw new \InvalidArgumentException('non-nullable _id cannot be null'); + } + $this->container['_id'] = $_id; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name name + * + * @return self + */ + public function setName($name) + { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets columns + * + * @return object[]|null + */ + public function getColumns() + { + return $this->container['columns']; + } + + /** + * Sets columns + * + * @param object[]|null $columns columns + * + * @return self + */ + public function setColumns($columns) + { + if (is_null($columns)) { + throw new \InvalidArgumentException('non-nullable columns cannot be null'); + } + $this->container['columns'] = $columns; + + return $this; + } + + /** + * Gets rows + * + * @return object[]|null + */ + public function getRows() + { + return $this->container['rows']; + } + + /** + * Sets rows + * + * @param object[]|null $rows rows + * + * @return self + */ + public function setRows($rows) + { + if (is_null($rows)) { + throw new \InvalidArgumentException('non-nullable rows cannot be null'); + } + $this->container['rows'] = $rows; + + return $this; + } + + /** + * Gets id_row_map + * + * @return object|null + */ + public function getIdRowMap() + { + return $this->container['id_row_map']; + } + + /** + * Sets id_row_map + * + * @param object|null $id_row_map id_row_map + * + * @return self + */ + public function setIdRowMap($id_row_map) + { + if (is_null($id_row_map)) { + throw new \InvalidArgumentException('non-nullable id_row_map cannot be null'); + } + $this->container['id_row_map'] = $id_row_map; + + return $this; + } + + /** + * Gets views + * + * @return object[]|null + */ + public function getViews() + { + return $this->container['views']; + } + + /** + * Sets views + * + * @param object[]|null $views views + * + * @return self + */ + public function setViews($views) + { + if (is_null($views)) { + throw new \InvalidArgumentException('non-nullable views cannot be null'); + } + $this->container['views'] = $views; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Base/DurationColumn.php b/lib/Base/DurationColumn.php index fe081abb..d7c590cd 100644 --- a/lib/Base/DurationColumn.php +++ b/lib/Base/DurationColumn.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -467,11 +467,11 @@ public function setColumnData($column_data) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -479,12 +479,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -509,11 +509,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/DurationColumnFormat.php b/lib/Base/DurationColumnFormat.php index c8e7afa4..8ebbb217 100644 --- a/lib/Base/DurationColumnFormat.php +++ b/lib/Base/DurationColumnFormat.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -420,11 +420,11 @@ public function setDurationFormat($duration_format) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -432,12 +432,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -462,11 +462,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/DurationColumnWithTableName.php b/lib/Base/DurationColumnWithTableName.php index b519b0c2..78331de7 100644 --- a/lib/Base/DurationColumnWithTableName.php +++ b/lib/Base/DurationColumnWithTableName.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -503,11 +503,11 @@ public function setColumnData($column_data) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -515,12 +515,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -545,11 +545,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/EmailColumn.php b/lib/Base/EmailColumn.php index 8ee2a714..e3ac3577 100644 --- a/lib/Base/EmailColumn.php +++ b/lib/Base/EmailColumn.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -433,11 +433,11 @@ public function setAnchorColumn($anchor_column) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -445,12 +445,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -475,11 +475,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/EmailColumnWithTableName.php b/lib/Base/EmailColumnWithTableName.php index ed4cc1a1..b229b001 100644 --- a/lib/Base/EmailColumnWithTableName.php +++ b/lib/Base/EmailColumnWithTableName.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -469,11 +469,11 @@ public function setAnchorColumn($anchor_column) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -481,12 +481,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -511,11 +511,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/EmailFilterPredicate.php b/lib/Base/EmailFilterPredicate.php index 26b42f0e..5061fd76 100644 --- a/lib/Base/EmailFilterPredicate.php +++ b/lib/Base/EmailFilterPredicate.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ diff --git a/lib/Base/FileColumn.php b/lib/Base/FileColumn.php index c256ac66..26638908 100644 --- a/lib/Base/FileColumn.php +++ b/lib/Base/FileColumn.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -433,11 +433,11 @@ public function setAnchorColumn($anchor_column) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -445,12 +445,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -475,11 +475,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/FileColumnWithTableName.php b/lib/Base/FileColumnWithTableName.php index 86ec819e..56fd24ff 100644 --- a/lib/Base/FileColumnWithTableName.php +++ b/lib/Base/FileColumnWithTableName.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -469,11 +469,11 @@ public function setAnchorColumn($anchor_column) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -481,12 +481,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -511,11 +511,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/FilterConjunction.php b/lib/Base/FilterConjunction.php index 58d55b0f..efb8a442 100644 --- a/lib/Base/FilterConjunction.php +++ b/lib/Base/FilterConjunction.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -32,7 +32,7 @@ * FilterConjunction Class Doc Comment * * @category Class - * @description If your view has multiple filters you have to decide how the filters are should hang together. + * @description If your view has multiple filters you have to decide how the filters should hang together. * @package SeaTable\Client * @author OpenAPI Generator team * @link https://openapi-generator.tech diff --git a/lib/Base/FiltersAutomatic.php b/lib/Base/FiltersAutomatic.php index ab19fd0d..1f712f3e 100644 --- a/lib/Base/FiltersAutomatic.php +++ b/lib/Base/FiltersAutomatic.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -385,11 +385,11 @@ public function setFilterTerm($filter_term) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -397,12 +397,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -427,11 +427,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/FiltersCheckbox.php b/lib/Base/FiltersCheckbox.php index 8fa782e6..f951e2c5 100644 --- a/lib/Base/FiltersCheckbox.php +++ b/lib/Base/FiltersCheckbox.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -385,11 +385,11 @@ public function setFilterTerm($filter_term) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -397,12 +397,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -427,11 +427,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/FiltersCollaborator.php b/lib/Base/FiltersCollaborator.php index d7956a8d..9a5f538a 100644 --- a/lib/Base/FiltersCollaborator.php +++ b/lib/Base/FiltersCollaborator.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -385,11 +385,11 @@ public function setFilterTerm($filter_term) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -397,12 +397,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -427,11 +427,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/FiltersCreated.php b/lib/Base/FiltersCreated.php index cdffa966..cad6d38e 100644 --- a/lib/Base/FiltersCreated.php +++ b/lib/Base/FiltersCreated.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -419,11 +419,11 @@ public function setFilterTermModifier($filter_term_modifier) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -431,12 +431,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -461,11 +461,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/FiltersCreator.php b/lib/Base/FiltersCreator.php index 017cb159..ff458a5e 100644 --- a/lib/Base/FiltersCreator.php +++ b/lib/Base/FiltersCreator.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -385,11 +385,11 @@ public function setFilterTerm($filter_term) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -397,12 +397,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -427,11 +427,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/FiltersDate.php b/lib/Base/FiltersDate.php index 6da3135c..1a436706 100644 --- a/lib/Base/FiltersDate.php +++ b/lib/Base/FiltersDate.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -428,11 +428,11 @@ public function setFilterTermModifier($filter_term_modifier) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -440,12 +440,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -470,11 +470,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/FiltersDateTime.php b/lib/Base/FiltersDateTime.php index eb832751..48b3c892 100644 --- a/lib/Base/FiltersDateTime.php +++ b/lib/Base/FiltersDateTime.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -419,11 +419,11 @@ public function setFilterTermModifier($filter_term_modifier) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -431,12 +431,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -461,11 +461,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/FiltersDuration.php b/lib/Base/FiltersDuration.php index ed861842..2266a00f 100644 --- a/lib/Base/FiltersDuration.php +++ b/lib/Base/FiltersDuration.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -385,11 +385,11 @@ public function setFilterTerm($filter_term) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -397,12 +397,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -427,11 +427,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/FiltersEditor.php b/lib/Base/FiltersEditor.php index bc146972..f49b45da 100644 --- a/lib/Base/FiltersEditor.php +++ b/lib/Base/FiltersEditor.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -385,11 +385,11 @@ public function setFilterTerm($filter_term) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -397,12 +397,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -427,11 +427,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/FiltersEmail.php b/lib/Base/FiltersEmail.php index dbaddda9..7d2b2193 100644 --- a/lib/Base/FiltersEmail.php +++ b/lib/Base/FiltersEmail.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -57,7 +57,7 @@ class FiltersEmail implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPITypes = [ 'column_key' => 'string', - 'email_filter_predicate' => '\SeaTable\Client\Base\EmailFilterPredicate', + 'filter_predicate' => '\SeaTable\Client\Base\EmailFilterPredicate', 'filter_term' => 'string' ]; @@ -70,7 +70,7 @@ class FiltersEmail implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPIFormats = [ 'column_key' => null, - 'email_filter_predicate' => null, + 'filter_predicate' => null, 'filter_term' => null ]; @@ -81,7 +81,7 @@ class FiltersEmail implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static array $openAPINullables = [ 'column_key' => false, - 'email_filter_predicate' => false, + 'filter_predicate' => false, 'filter_term' => false ]; @@ -172,7 +172,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'column_key' => 'column_key', - 'email_filter_predicate' => 'email_filter_predicate', + 'filter_predicate' => 'filter_predicate', 'filter_term' => 'filter_term' ]; @@ -183,7 +183,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'column_key' => 'setColumnKey', - 'email_filter_predicate' => 'setEmailFilterPredicate', + 'filter_predicate' => 'setFilterPredicate', 'filter_term' => 'setFilterTerm' ]; @@ -194,7 +194,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'column_key' => 'getColumnKey', - 'email_filter_predicate' => 'getEmailFilterPredicate', + 'filter_predicate' => 'getFilterPredicate', 'filter_term' => 'getFilterTerm' ]; @@ -256,7 +256,7 @@ public function getModelName() public function __construct(?array $data = null) { $this->setIfExists('column_key', $data ?? [], null); - $this->setIfExists('email_filter_predicate', $data ?? [], null); + $this->setIfExists('filter_predicate', $data ?? [], null); $this->setIfExists('filter_term', $data ?? [], null); } @@ -330,28 +330,28 @@ public function setColumnKey($column_key) } /** - * Gets email_filter_predicate + * Gets filter_predicate * * @return \SeaTable\Client\Base\EmailFilterPredicate|null */ - public function getEmailFilterPredicate() + public function getFilterPredicate() { - return $this->container['email_filter_predicate']; + return $this->container['filter_predicate']; } /** - * Sets email_filter_predicate + * Sets filter_predicate * - * @param \SeaTable\Client\Base\EmailFilterPredicate|null $email_filter_predicate email_filter_predicate + * @param \SeaTable\Client\Base\EmailFilterPredicate|null $filter_predicate filter_predicate * * @return self */ - public function setEmailFilterPredicate($email_filter_predicate) + public function setFilterPredicate($filter_predicate) { - if (is_null($email_filter_predicate)) { - throw new \InvalidArgumentException('non-nullable email_filter_predicate cannot be null'); + if (is_null($filter_predicate)) { + throw new \InvalidArgumentException('non-nullable filter_predicate cannot be null'); } - $this->container['email_filter_predicate'] = $email_filter_predicate; + $this->container['filter_predicate'] = $filter_predicate; return $this; } @@ -385,11 +385,11 @@ public function setFilterTerm($filter_term) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -397,12 +397,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -427,11 +427,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/FiltersFile.php b/lib/Base/FiltersFile.php index 682792fc..0ac6b733 100644 --- a/lib/Base/FiltersFile.php +++ b/lib/Base/FiltersFile.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -385,11 +385,11 @@ public function setFilterTerm($filter_term) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -397,12 +397,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -427,11 +427,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/FiltersFormula.php b/lib/Base/FiltersFormula.php index efd87904..c91def4c 100644 --- a/lib/Base/FiltersFormula.php +++ b/lib/Base/FiltersFormula.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -385,11 +385,11 @@ public function setFilterTerm($filter_term) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -397,12 +397,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -427,11 +427,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/FiltersGeolocation.php b/lib/Base/FiltersGeolocation.php index 25dfc685..2848463d 100644 --- a/lib/Base/FiltersGeolocation.php +++ b/lib/Base/FiltersGeolocation.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -385,11 +385,11 @@ public function setFilterTerm($filter_term) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -397,12 +397,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -427,11 +427,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/FiltersImage.php b/lib/Base/FiltersImage.php index 8318ca47..3aceae43 100644 --- a/lib/Base/FiltersImage.php +++ b/lib/Base/FiltersImage.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -385,11 +385,11 @@ public function setFilterTerm($filter_term) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -397,12 +397,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -427,11 +427,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/FiltersLink.php b/lib/Base/FiltersLink.php index ad2e5b15..bbfb5bd1 100644 --- a/lib/Base/FiltersLink.php +++ b/lib/Base/FiltersLink.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -385,11 +385,11 @@ public function setFilterTerm($filter_term) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -397,12 +397,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -427,11 +427,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/FiltersLinkFormula.php b/lib/Base/FiltersLinkFormula.php index 55bd47c5..9b082788 100644 --- a/lib/Base/FiltersLinkFormula.php +++ b/lib/Base/FiltersLinkFormula.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -385,11 +385,11 @@ public function setFilterTerm($filter_term) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -397,12 +397,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -427,11 +427,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/FiltersLongText.php b/lib/Base/FiltersLongText.php index b5266fb3..88ac1a1a 100644 --- a/lib/Base/FiltersLongText.php +++ b/lib/Base/FiltersLongText.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -385,11 +385,11 @@ public function setFilterTerm($filter_term) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -397,12 +397,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -427,11 +427,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/FiltersModified.php b/lib/Base/FiltersModified.php index df1acb7f..85220849 100644 --- a/lib/Base/FiltersModified.php +++ b/lib/Base/FiltersModified.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -419,11 +419,11 @@ public function setFilterTermModifier($filter_term_modifier) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -431,12 +431,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -461,11 +461,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/FiltersMultiSelect.php b/lib/Base/FiltersMultiSelect.php index d9405a3a..2cef0afc 100644 --- a/lib/Base/FiltersMultiSelect.php +++ b/lib/Base/FiltersMultiSelect.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -385,11 +385,11 @@ public function setFilterTerm($filter_term) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -397,12 +397,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -427,11 +427,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/FiltersNumber.php b/lib/Base/FiltersNumber.php index 455d8d7f..fb2944ee 100644 --- a/lib/Base/FiltersNumber.php +++ b/lib/Base/FiltersNumber.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -385,11 +385,11 @@ public function setFilterTerm($filter_term) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -397,12 +397,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -427,11 +427,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/FiltersPercentage.php b/lib/Base/FiltersPercentage.php index 501df440..de24068c 100644 --- a/lib/Base/FiltersPercentage.php +++ b/lib/Base/FiltersPercentage.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -385,11 +385,11 @@ public function setFilterTerm($filter_term) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -397,12 +397,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -427,11 +427,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/FiltersRating.php b/lib/Base/FiltersRating.php index 9e5fcd04..a271bf8a 100644 --- a/lib/Base/FiltersRating.php +++ b/lib/Base/FiltersRating.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -385,11 +385,11 @@ public function setFilterTerm($filter_term) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -397,12 +397,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -427,11 +427,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/FiltersSingleSelect.php b/lib/Base/FiltersSingleSelect.php index 4eb77339..d0f874de 100644 --- a/lib/Base/FiltersSingleSelect.php +++ b/lib/Base/FiltersSingleSelect.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -385,11 +385,11 @@ public function setFilterTerm($filter_term) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -397,12 +397,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -427,11 +427,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/FiltersText.php b/lib/Base/FiltersText.php index d266340d..74735f3c 100644 --- a/lib/Base/FiltersText.php +++ b/lib/Base/FiltersText.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -385,11 +385,11 @@ public function setFilterTerm($filter_term) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -397,12 +397,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -427,11 +427,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/FiltersUrl.php b/lib/Base/FiltersUrl.php index 94f2a82f..8fee562b 100644 --- a/lib/Base/FiltersUrl.php +++ b/lib/Base/FiltersUrl.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -385,11 +385,11 @@ public function setFilterTerm($filter_term) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -397,12 +397,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -427,11 +427,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/FormulaColumn.php b/lib/Base/FormulaColumn.php index 430e2719..5a5aa282 100644 --- a/lib/Base/FormulaColumn.php +++ b/lib/Base/FormulaColumn.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -470,11 +470,11 @@ public function setColumnData($column_data) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -482,12 +482,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -512,11 +512,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/FormulaColumnFormat.php b/lib/Base/FormulaColumnFormat.php index 786e12dd..d23fc416 100644 --- a/lib/Base/FormulaColumnFormat.php +++ b/lib/Base/FormulaColumnFormat.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -321,11 +321,11 @@ public function setFormula($formula) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -333,12 +333,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -363,11 +363,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/FormulaColumnWithTableName.php b/lib/Base/FormulaColumnWithTableName.php index 33872fdf..0040feda 100644 --- a/lib/Base/FormulaColumnWithTableName.php +++ b/lib/Base/FormulaColumnWithTableName.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -506,11 +506,11 @@ public function setColumnData($column_data) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -518,12 +518,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -548,11 +548,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/FreezeUnfreezeColumn.php b/lib/Base/FreezeUnfreezeColumn.php index a556c857..65c9310e 100644 --- a/lib/Base/FreezeUnfreezeColumn.php +++ b/lib/Base/FreezeUnfreezeColumn.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -472,11 +472,11 @@ public function setFrozen($frozen) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -484,12 +484,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -514,11 +514,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/GenerateSnapshot.php b/lib/Base/GenerateSnapshot.php index aa5b2b62..34ae5b74 100644 --- a/lib/Base/GenerateSnapshot.php +++ b/lib/Base/GenerateSnapshot.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -317,11 +317,11 @@ public function setDtableName($dtable_name) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -329,12 +329,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -359,11 +359,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/GeoColumnFormat.php b/lib/Base/GeoColumnFormat.php index 2a493895..b069a450 100644 --- a/lib/Base/GeoColumnFormat.php +++ b/lib/Base/GeoColumnFormat.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -229,7 +229,7 @@ public function getModelName() } public const GEO_FORMAT_LNG_LAT = 'lng_lat'; - public const GEO_FORMAT_COUNTY_REGION = 'county_region'; + public const GEO_FORMAT_COUNTRY_REGION = 'country_region'; /** * Gets allowable values of the enum @@ -240,7 +240,7 @@ public function getGeoFormatAllowableValues() { return [ self::GEO_FORMAT_LNG_LAT, - self::GEO_FORMAT_COUNTY_REGION, + self::GEO_FORMAT_COUNTRY_REGION, ]; } @@ -352,11 +352,11 @@ public function setGeoFormat($geo_format) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -364,12 +364,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -394,11 +394,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/GeolocationColumn.php b/lib/Base/GeolocationColumn.php index 1d72ffbb..95eeb89a 100644 --- a/lib/Base/GeolocationColumn.php +++ b/lib/Base/GeolocationColumn.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -246,7 +246,7 @@ public function getModelName() return self::$openAPIModelName; } - public const COLUMN_TYPE_CHECKBOX = 'checkbox'; + public const COLUMN_TYPE_GEOLOCATION = 'geolocation'; /** * Gets allowable values of the enum @@ -256,7 +256,7 @@ public function getModelName() public function getColumnTypeAllowableValues() { return [ - self::COLUMN_TYPE_CHECKBOX, + self::COLUMN_TYPE_GEOLOCATION, ]; } @@ -467,11 +467,11 @@ public function setColumnData($column_data) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -479,12 +479,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -509,11 +509,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/GeolocationColumnWithTableName.php b/lib/Base/GeolocationColumnWithTableName.php index b6e7a7c0..c719f0be 100644 --- a/lib/Base/GeolocationColumnWithTableName.php +++ b/lib/Base/GeolocationColumnWithTableName.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -251,7 +251,7 @@ public function getModelName() return self::$openAPIModelName; } - public const COLUMN_TYPE_CHECKBOX = 'checkbox'; + public const COLUMN_TYPE_GEOLOCATION = 'geolocation'; /** * Gets allowable values of the enum @@ -261,7 +261,7 @@ public function getModelName() public function getColumnTypeAllowableValues() { return [ - self::COLUMN_TYPE_CHECKBOX, + self::COLUMN_TYPE_GEOLOCATION, ]; } @@ -503,11 +503,11 @@ public function setColumnData($column_data) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -515,12 +515,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -545,11 +545,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/GetComment200Response.php b/lib/Base/GetComment200Response.php new file mode 100644 index 00000000..84ee2de9 --- /dev/null +++ b/lib/Base/GetComment200Response.php @@ -0,0 +1,646 @@ + + */ +class GetComment200Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'getComment_200_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'id' => 'int', + 'author' => 'string', + 'comment' => 'string', + 'dtable_uuid' => 'string', + 'row_id' => 'string', + 'created_at' => 'string', + 'updated_at' => 'string', + 'resolved' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'id' => null, + 'author' => null, + 'comment' => null, + 'dtable_uuid' => null, + 'row_id' => null, + 'created_at' => null, + 'updated_at' => null, + 'resolved' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'id' => false, + 'author' => false, + 'comment' => false, + 'dtable_uuid' => false, + 'row_id' => false, + 'created_at' => false, + 'updated_at' => false, + 'resolved' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'author' => 'author', + 'comment' => 'comment', + 'dtable_uuid' => 'dtable_uuid', + 'row_id' => 'row_id', + 'created_at' => 'created_at', + 'updated_at' => 'updated_at', + 'resolved' => 'resolved' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'author' => 'setAuthor', + 'comment' => 'setComment', + 'dtable_uuid' => 'setDtableUuid', + 'row_id' => 'setRowId', + 'created_at' => 'setCreatedAt', + 'updated_at' => 'setUpdatedAt', + 'resolved' => 'setResolved' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'author' => 'getAuthor', + 'comment' => 'getComment', + 'dtable_uuid' => 'getDtableUuid', + 'row_id' => 'getRowId', + 'created_at' => 'getCreatedAt', + 'updated_at' => 'getUpdatedAt', + 'resolved' => 'getResolved' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('author', $data ?? [], null); + $this->setIfExists('comment', $data ?? [], null); + $this->setIfExists('dtable_uuid', $data ?? [], null); + $this->setIfExists('row_id', $data ?? [], null); + $this->setIfExists('created_at', $data ?? [], null); + $this->setIfExists('updated_at', $data ?? [], null); + $this->setIfExists('resolved', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return int|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int|null $id id + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets author + * + * @return string|null + */ + public function getAuthor() + { + return $this->container['author']; + } + + /** + * Sets author + * + * @param string|null $author author + * + * @return self + */ + public function setAuthor($author) + { + if (is_null($author)) { + throw new \InvalidArgumentException('non-nullable author cannot be null'); + } + $this->container['author'] = $author; + + return $this; + } + + /** + * Gets comment + * + * @return string|null + */ + public function getComment() + { + return $this->container['comment']; + } + + /** + * Sets comment + * + * @param string|null $comment comment + * + * @return self + */ + public function setComment($comment) + { + if (is_null($comment)) { + throw new \InvalidArgumentException('non-nullable comment cannot be null'); + } + $this->container['comment'] = $comment; + + return $this; + } + + /** + * Gets dtable_uuid + * + * @return string|null + */ + public function getDtableUuid() + { + return $this->container['dtable_uuid']; + } + + /** + * Sets dtable_uuid + * + * @param string|null $dtable_uuid dtable_uuid + * + * @return self + */ + public function setDtableUuid($dtable_uuid) + { + if (is_null($dtable_uuid)) { + throw new \InvalidArgumentException('non-nullable dtable_uuid cannot be null'); + } + $this->container['dtable_uuid'] = $dtable_uuid; + + return $this; + } + + /** + * Gets row_id + * + * @return string|null + */ + public function getRowId() + { + return $this->container['row_id']; + } + + /** + * Sets row_id + * + * @param string|null $row_id row_id + * + * @return self + */ + public function setRowId($row_id) + { + if (is_null($row_id)) { + throw new \InvalidArgumentException('non-nullable row_id cannot be null'); + } + $this->container['row_id'] = $row_id; + + return $this; + } + + /** + * Gets created_at + * + * @return string|null + */ + public function getCreatedAt() + { + return $this->container['created_at']; + } + + /** + * Sets created_at + * + * @param string|null $created_at created_at + * + * @return self + */ + public function setCreatedAt($created_at) + { + if (is_null($created_at)) { + throw new \InvalidArgumentException('non-nullable created_at cannot be null'); + } + $this->container['created_at'] = $created_at; + + return $this; + } + + /** + * Gets updated_at + * + * @return string|null + */ + public function getUpdatedAt() + { + return $this->container['updated_at']; + } + + /** + * Sets updated_at + * + * @param string|null $updated_at updated_at + * + * @return self + */ + public function setUpdatedAt($updated_at) + { + if (is_null($updated_at)) { + throw new \InvalidArgumentException('non-nullable updated_at cannot be null'); + } + $this->container['updated_at'] = $updated_at; + + return $this; + } + + /** + * Gets resolved + * + * @return int|null + */ + public function getResolved() + { + return $this->container['resolved']; + } + + /** + * Sets resolved + * + * @param int|null $resolved resolved + * + * @return self + */ + public function setResolved($resolved) + { + if (is_null($resolved)) { + throw new \InvalidArgumentException('non-nullable resolved cannot be null'); + } + $this->container['resolved'] = $resolved; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Base/GetRow200Response.php b/lib/Base/GetRow200Response.php new file mode 100644 index 00000000..e149d940 --- /dev/null +++ b/lib/Base/GetRow200Response.php @@ -0,0 +1,578 @@ + + */ +class GetRow200Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'getRow_200_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + '_id' => 'string', + '_mtime' => 'string', + 'name' => 'string', + 'date' => 'string', + 'content' => 'string', + 'link' => 'object[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + '_id' => null, + '_mtime' => null, + 'name' => null, + 'date' => null, + 'content' => null, + 'link' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + '_id' => false, + '_mtime' => false, + 'name' => false, + 'date' => false, + 'content' => false, + 'link' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + '_id' => '_id', + '_mtime' => '_mtime', + 'name' => 'Name', + 'date' => 'Date', + 'content' => 'Content', + 'link' => 'link' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + '_id' => 'setId', + '_mtime' => 'setMtime', + 'name' => 'setName', + 'date' => 'setDate', + 'content' => 'setContent', + 'link' => 'setLink' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + '_id' => 'getId', + '_mtime' => 'getMtime', + 'name' => 'getName', + 'date' => 'getDate', + 'content' => 'getContent', + 'link' => 'getLink' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('_id', $data ?? [], null); + $this->setIfExists('_mtime', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('date', $data ?? [], null); + $this->setIfExists('content', $data ?? [], null); + $this->setIfExists('link', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets _id + * + * @return string|null + */ + public function getId() + { + return $this->container['_id']; + } + + /** + * Sets _id + * + * @param string|null $_id _id + * + * @return self + */ + public function setId($_id) + { + if (is_null($_id)) { + throw new \InvalidArgumentException('non-nullable _id cannot be null'); + } + $this->container['_id'] = $_id; + + return $this; + } + + /** + * Gets _mtime + * + * @return string|null + */ + public function getMtime() + { + return $this->container['_mtime']; + } + + /** + * Sets _mtime + * + * @param string|null $_mtime _mtime + * + * @return self + */ + public function setMtime($_mtime) + { + if (is_null($_mtime)) { + throw new \InvalidArgumentException('non-nullable _mtime cannot be null'); + } + $this->container['_mtime'] = $_mtime; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name name + * + * @return self + */ + public function setName($name) + { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets date + * + * @return string|null + */ + public function getDate() + { + return $this->container['date']; + } + + /** + * Sets date + * + * @param string|null $date date + * + * @return self + */ + public function setDate($date) + { + if (is_null($date)) { + throw new \InvalidArgumentException('non-nullable date cannot be null'); + } + $this->container['date'] = $date; + + return $this; + } + + /** + * Gets content + * + * @return string|null + */ + public function getContent() + { + return $this->container['content']; + } + + /** + * Sets content + * + * @param string|null $content content + * + * @return self + */ + public function setContent($content) + { + if (is_null($content)) { + throw new \InvalidArgumentException('non-nullable content cannot be null'); + } + $this->container['content'] = $content; + + return $this; + } + + /** + * Gets link + * + * @return object[]|null + */ + public function getLink() + { + return $this->container['link']; + } + + /** + * Sets link + * + * @param object[]|null $link link + * + * @return self + */ + public function setLink($link) + { + if (is_null($link)) { + throw new \InvalidArgumentException('non-nullable link cannot be null'); + } + $this->container['link'] = $link; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Base/ImageColumn.php b/lib/Base/ImageColumn.php index 961ebb03..9def4b48 100644 --- a/lib/Base/ImageColumn.php +++ b/lib/Base/ImageColumn.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -433,11 +433,11 @@ public function setAnchorColumn($anchor_column) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -445,12 +445,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -475,11 +475,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/ImageColumnWithTableName.php b/lib/Base/ImageColumnWithTableName.php index f31913fb..135edd4d 100644 --- a/lib/Base/ImageColumnWithTableName.php +++ b/lib/Base/ImageColumnWithTableName.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -469,11 +469,11 @@ public function setAnchorColumn($anchor_column) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -481,12 +481,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -511,11 +511,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/ImageFilterPredicate.php b/lib/Base/ImageFilterPredicate.php index 1e479f14..03a26e24 100644 --- a/lib/Base/ImageFilterPredicate.php +++ b/lib/Base/ImageFilterPredicate.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ diff --git a/lib/Base/InsertColumnRequest.php b/lib/Base/InsertColumnRequest.php index f5a7fbf5..d7e2cf74 100644 --- a/lib/Base/InsertColumnRequest.php +++ b/lib/Base/InsertColumnRequest.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -251,7 +251,7 @@ public function getModelName() return self::$openAPIModelName; } - public const COLUMN_TYPE_FILE = 'file'; + public const COLUMN_TYPE_BUTTON = 'button'; /** * Gets allowable values of the enum @@ -261,7 +261,7 @@ public function getModelName() public function getColumnTypeAllowableValues() { return [ - self::COLUMN_TYPE_FILE, + self::COLUMN_TYPE_BUTTON, ]; } @@ -506,11 +506,11 @@ public function setColumnData($column_data) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -518,12 +518,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -548,11 +548,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/InsertRow.php b/lib/Base/InsertRow.php index 8be3d8e3..a9cf1423 100644 --- a/lib/Base/InsertRow.php +++ b/lib/Base/InsertRow.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -34,7 +34,7 @@ * InsertRow Class Doc Comment * * @category Class - * @description Insert a row below or above another row your specified by his row-ID. + * @description Insert a row below or above another row you specified by its row ID. * @package SeaTable\Client * @author OpenAPI Generator team * @link https://openapi-generator.tech @@ -496,11 +496,11 @@ public function setApplyDefault($apply_default) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -508,12 +508,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -538,11 +538,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/InsertRowsIntoBigData.php b/lib/Base/InsertRowsIntoBigData.php index 951eb738..2d6aebc2 100644 --- a/lib/Base/InsertRowsIntoBigData.php +++ b/lib/Base/InsertRowsIntoBigData.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -357,11 +357,11 @@ public function setRows($rows) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -369,12 +369,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -399,11 +399,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/LastModifierColumn.php b/lib/Base/LastModifierColumn.php index 4d69e43e..3f4a0432 100644 --- a/lib/Base/LastModifierColumn.php +++ b/lib/Base/LastModifierColumn.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -433,11 +433,11 @@ public function setAnchorColumn($anchor_column) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -445,12 +445,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -475,11 +475,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/LastModifierColumnWithTableName.php b/lib/Base/LastModifierColumnWithTableName.php index e3620e1d..73c8f92d 100644 --- a/lib/Base/LastModifierColumnWithTableName.php +++ b/lib/Base/LastModifierColumnWithTableName.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -469,11 +469,11 @@ public function setAnchorColumn($anchor_column) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -481,12 +481,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -511,11 +511,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/LinkColumn.php b/lib/Base/LinkColumn.php index ac5f2e1e..d3d45586 100644 --- a/lib/Base/LinkColumn.php +++ b/lib/Base/LinkColumn.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -470,11 +470,11 @@ public function setColumnData($column_data) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -482,12 +482,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -512,11 +512,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/LinkColumnFormat.php b/lib/Base/LinkColumnFormat.php index ee1f54bb..5bad17fd 100644 --- a/lib/Base/LinkColumnFormat.php +++ b/lib/Base/LinkColumnFormat.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -358,11 +358,11 @@ public function setOtherTable($other_table) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -370,12 +370,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -400,11 +400,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/LinkColumnWithTableName.php b/lib/Base/LinkColumnWithTableName.php index b5e3a694..be323bfe 100644 --- a/lib/Base/LinkColumnWithTableName.php +++ b/lib/Base/LinkColumnWithTableName.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -506,11 +506,11 @@ public function setColumnData($column_data) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -518,12 +518,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -548,11 +548,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/LinkFilterPredicate.php b/lib/Base/LinkFilterPredicate.php index 07da2a53..bdcac6fb 100644 --- a/lib/Base/LinkFilterPredicate.php +++ b/lib/Base/LinkFilterPredicate.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ diff --git a/lib/Base/LinkFormulaColumn.php b/lib/Base/LinkFormulaColumn.php index ff42718f..67a2def8 100644 --- a/lib/Base/LinkFormulaColumn.php +++ b/lib/Base/LinkFormulaColumn.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -470,11 +470,11 @@ public function setColumnData($column_data) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -482,12 +482,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -512,11 +512,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/LinkFormulaColumnColumnData.php b/lib/Base/LinkFormulaColumnColumnData.php index 14edf794..7e4d3eff 100644 --- a/lib/Base/LinkFormulaColumnColumnData.php +++ b/lib/Base/LinkFormulaColumnColumnData.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -648,11 +648,11 @@ public function setComparisonColumn($comparison_column) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -660,12 +660,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -690,11 +690,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/LinkFormulaColumnCountLinksFormat.php b/lib/Base/LinkFormulaColumnCountLinksFormat.php index 97234fab..874ff86f 100644 --- a/lib/Base/LinkFormulaColumnCountLinksFormat.php +++ b/lib/Base/LinkFormulaColumnCountLinksFormat.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -390,11 +390,11 @@ public function setLinkColumn($link_column) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -402,12 +402,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -432,11 +432,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/LinkFormulaColumnFindmaxFormat.php b/lib/Base/LinkFormulaColumnFindmaxFormat.php index 39f6f980..d1e31bb9 100644 --- a/lib/Base/LinkFormulaColumnFindmaxFormat.php +++ b/lib/Base/LinkFormulaColumnFindmaxFormat.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -464,11 +464,11 @@ public function setComparisonColumn($comparison_column) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -476,12 +476,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -506,11 +506,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/LinkFormulaColumnFindminFormat.php b/lib/Base/LinkFormulaColumnFindminFormat.php index 2ca4c4e7..e43c950a 100644 --- a/lib/Base/LinkFormulaColumnFindminFormat.php +++ b/lib/Base/LinkFormulaColumnFindminFormat.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -464,11 +464,11 @@ public function setComparisonColumn($comparison_column) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -476,12 +476,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -506,11 +506,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/LinkFormulaColumnLookupFormat.php b/lib/Base/LinkFormulaColumnLookupFormat.php index 0ef48574..ce24390d 100644 --- a/lib/Base/LinkFormulaColumnLookupFormat.php +++ b/lib/Base/LinkFormulaColumnLookupFormat.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -461,11 +461,11 @@ public function setLevel2LinkedColumn($level2_linked_column) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -473,12 +473,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -503,11 +503,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/LinkFormulaColumnRollupFormat.php b/lib/Base/LinkFormulaColumnRollupFormat.php index 353b257a..e5dd3ca4 100644 --- a/lib/Base/LinkFormulaColumnRollupFormat.php +++ b/lib/Base/LinkFormulaColumnRollupFormat.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -504,11 +504,11 @@ public function setSummaryMethod($summary_method) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -516,12 +516,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -546,11 +546,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/LinkFormulaColumnWithTableName.php b/lib/Base/LinkFormulaColumnWithTableName.php index e74f0949..f84255ac 100644 --- a/lib/Base/LinkFormulaColumnWithTableName.php +++ b/lib/Base/LinkFormulaColumnWithTableName.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -506,11 +506,11 @@ public function setColumnData($column_data) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -518,12 +518,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -548,11 +548,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/LinksApi.php b/lib/Base/LinksApi.php index 6ce69e36..a70502ff 100644 --- a/lib/Base/LinksApi.php +++ b/lib/Base/LinksApi.php @@ -14,7 +14,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -1883,6 +1883,14 @@ protected function createHttpClientOption() } } + if ($this->config->getCertFile()) { + $options[RequestOptions::CERT] = $this->config->getCertFile(); + } + + if ($this->config->getKeyFile()) { + $options[RequestOptions::SSL_KEY] = $this->config->getKeyFile(); + } + return $options; } diff --git a/lib/Base/ListRowLinks.php b/lib/Base/ListRowLinks.php index becf9984..09553f53 100644 --- a/lib/Base/ListRowLinks.php +++ b/lib/Base/ListRowLinks.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -394,11 +394,11 @@ public function setRows($rows) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -406,12 +406,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -436,11 +436,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/ListRowLinksRowsInner.php b/lib/Base/ListRowLinksRowsInner.php index 06ffe3c2..0ffaa169 100644 --- a/lib/Base/ListRowLinksRowsInner.php +++ b/lib/Base/ListRowLinksRowsInner.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -290,8 +290,8 @@ public function listInvalidProperties() if ($this->container['row_id'] === null) { $invalidProperties[] = "'row_id' can't be null"; } - if (!preg_match("/^[a-zA-Z0-9\\-\\_]{22}$/", $this->container['row_id'])) { - $invalidProperties[] = "invalid value for 'row_id', must be conform to the pattern /^[a-zA-Z0-9\\-\\_]{22}$/."; + if (!preg_match("/^[A-Za-z0-9\\-\\_]{22}$/", $this->container['row_id'])) { + $invalidProperties[] = "invalid value for 'row_id', must be conform to the pattern /^[A-Za-z0-9\\-\\_]{22}$/."; } return $invalidProperties; @@ -332,8 +332,8 @@ public function setRowId($row_id) throw new \InvalidArgumentException('non-nullable row_id cannot be null'); } - if ((!preg_match("/^[a-zA-Z0-9\\-\\_]{22}$/", ObjectSerializer::toString($row_id)))) { - throw new \InvalidArgumentException("invalid value for \$row_id when calling ListRowLinksRowsInner., must conform to the pattern /^[a-zA-Z0-9\\-\\_]{22}$/."); + if ((!preg_match("/^[A-Za-z0-9\\-\\_]{22}$/", ObjectSerializer::toString($row_id)))) { + throw new \InvalidArgumentException("invalid value for \$row_id when calling ListRowLinksRowsInner., must conform to the pattern /^[A-Za-z0-9\\-\\_]{22}$/."); } $this->container['row_id'] = $row_id; @@ -354,7 +354,7 @@ public function getOffset() /** * Sets offset * - * @param int|null $offset Offset is the beginning number of your query. If your record is linked to multiple records, use e.g. 0 to start quering from the 1st element or e.g. 5 to start querying from the 6th element, etc. Attention: The returned list of linked rows is not ordered by its original order on the web interface, but rather by created time (ctime). Default is 0. + * @param int|null $offset Offset is the beginning number of your query. If your record is linked to multiple records, use e.g. 0 to start querying from the 1st element or e.g. 5 to start querying from the 6th element, etc. Attention: The returned list of linked rows is not ordered by its original order on the web interface, but rather by created time (ctime). Default is 0. * * @return self */ @@ -397,11 +397,11 @@ public function setLimit($limit) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -409,12 +409,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -439,11 +439,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/LongTextColumn.php b/lib/Base/LongTextColumn.php index d551db33..54f362da 100644 --- a/lib/Base/LongTextColumn.php +++ b/lib/Base/LongTextColumn.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -433,11 +433,11 @@ public function setAnchorColumn($anchor_column) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -445,12 +445,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -475,11 +475,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/LongTextColumnWithTableName.php b/lib/Base/LongTextColumnWithTableName.php index 8672be8a..b34d84ea 100644 --- a/lib/Base/LongTextColumnWithTableName.php +++ b/lib/Base/LongTextColumnWithTableName.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -469,11 +469,11 @@ public function setAnchorColumn($anchor_column) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -481,12 +481,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -511,11 +511,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/MatchLinkColumns.php b/lib/Base/MatchLinkColumns.php index 40739524..27d6677e 100644 --- a/lib/Base/MatchLinkColumns.php +++ b/lib/Base/MatchLinkColumns.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -34,7 +34,7 @@ * MatchLinkColumns Class Doc Comment * * @category Class - * @description update multiple rows + * @description Match and link rows from two tables based on matching column values. * @package SeaTable\Client * @author OpenAPI Generator team * @link https://openapi-generator.tech @@ -373,11 +373,11 @@ public function setMatchingKeys($matching_keys) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -385,12 +385,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -415,11 +415,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/MatchLinkColumnsMatchingKeysInner.php b/lib/Base/MatchLinkColumnsMatchingKeysInner.php index 8199b315..5148d76d 100644 --- a/lib/Base/MatchLinkColumnsMatchingKeysInner.php +++ b/lib/Base/MatchLinkColumnsMatchingKeysInner.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -351,11 +351,11 @@ public function setTable2Key($table2_key) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -363,12 +363,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -393,11 +393,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/ModelInterface.php b/lib/Base/ModelInterface.php index 4092882b..3d3054c5 100644 --- a/lib/Base/ModelInterface.php +++ b/lib/Base/ModelInterface.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ diff --git a/lib/Base/MoveColumn.php b/lib/Base/MoveColumn.php index 8759de90..c93283ab 100644 --- a/lib/Base/MoveColumn.php +++ b/lib/Base/MoveColumn.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -472,11 +472,11 @@ public function setTargetColumn($target_column) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -484,12 +484,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -514,11 +514,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/MoveRowsToNormalBackendRequest.php b/lib/Base/MoveRowsToNormalBackendRequest.php index 85ddb931..5b3a401b 100644 --- a/lib/Base/MoveRowsToNormalBackendRequest.php +++ b/lib/Base/MoveRowsToNormalBackendRequest.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -351,11 +351,11 @@ public function setRowIds($row_ids) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -363,12 +363,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -393,11 +393,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/MtimeColumn.php b/lib/Base/MtimeColumn.php index c7937e8a..2e452c63 100644 --- a/lib/Base/MtimeColumn.php +++ b/lib/Base/MtimeColumn.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -433,11 +433,11 @@ public function setAnchorColumn($anchor_column) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -445,12 +445,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -475,11 +475,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/MtimeColumnWithTableName.php b/lib/Base/MtimeColumnWithTableName.php index aa11be6b..cbdeb4a1 100644 --- a/lib/Base/MtimeColumnWithTableName.php +++ b/lib/Base/MtimeColumnWithTableName.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -469,11 +469,11 @@ public function setAnchorColumn($anchor_column) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -481,12 +481,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -511,11 +511,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/MultipleSelectColumn.php b/lib/Base/MultipleSelectColumn.php index 08728647..d74e42dc 100644 --- a/lib/Base/MultipleSelectColumn.php +++ b/lib/Base/MultipleSelectColumn.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -467,11 +467,11 @@ public function setColumnData($column_data) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -479,12 +479,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -509,11 +509,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/MultipleSelectColumnWithTableName.php b/lib/Base/MultipleSelectColumnWithTableName.php index 09f90f9f..7ef32cb8 100644 --- a/lib/Base/MultipleSelectColumnWithTableName.php +++ b/lib/Base/MultipleSelectColumnWithTableName.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -503,11 +503,11 @@ public function setColumnData($column_data) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -515,12 +515,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -545,11 +545,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/MultipleSelectFilterPredicate.php b/lib/Base/MultipleSelectFilterPredicate.php index c43366f3..0dfed88e 100644 --- a/lib/Base/MultipleSelectFilterPredicate.php +++ b/lib/Base/MultipleSelectFilterPredicate.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ diff --git a/lib/Base/NewView.php b/lib/Base/NewView.php index 45e119e6..500ee0d8 100644 --- a/lib/Base/NewView.php +++ b/lib/Base/NewView.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -427,11 +427,11 @@ public function setIsLocked($is_locked) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -439,12 +439,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -469,11 +469,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/NotificationsApi.php b/lib/Base/NotificationsApi.php index 49f740b3..ab5d13a7 100644 --- a/lib/Base/NotificationsApi.php +++ b/lib/Base/NotificationsApi.php @@ -14,7 +14,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -1292,7 +1292,7 @@ public function markBaseNotificationsAsSeenRequest($base_uuid, $seen = null, str /** * Operation sendToastNotification * - * Send toast notification + * Send Toast Notification * * @param string $base_uuid The unique identifier of a base. Sometimes also called dtable_uuid. (required) * @param \SeaTable\Client\Base\SendToastNotificationRequest|null $send_toast_notification_request send_toast_notification_request (optional) @@ -1311,7 +1311,7 @@ public function sendToastNotification($base_uuid, $send_toast_notification_reque /** * Operation sendToastNotificationWithHttpInfo * - * Send toast notification + * Send Toast Notification * * @param string $base_uuid The unique identifier of a base. Sometimes also called dtable_uuid. (required) * @param \SeaTable\Client\Base\SendToastNotificationRequest|null $send_toast_notification_request (optional) @@ -1397,7 +1397,7 @@ public function sendToastNotificationWithHttpInfo($base_uuid, $send_toast_notifi /** * Operation sendToastNotificationAsync * - * Send toast notification + * Send Toast Notification * * @param string $base_uuid The unique identifier of a base. Sometimes also called dtable_uuid. (required) * @param \SeaTable\Client\Base\SendToastNotificationRequest|null $send_toast_notification_request (optional) @@ -1419,7 +1419,7 @@ function ($response) { /** * Operation sendToastNotificationAsyncWithHttpInfo * - * Send toast notification + * Send Toast Notification * * @param string $base_uuid The unique identifier of a base. Sometimes also called dtable_uuid. (required) * @param \SeaTable\Client\Base\SendToastNotificationRequest|null $send_toast_notification_request (optional) @@ -1593,6 +1593,14 @@ protected function createHttpClientOption() } } + if ($this->config->getCertFile()) { + $options[RequestOptions::CERT] = $this->config->getCertFile(); + } + + if ($this->config->getKeyFile()) { + $options[RequestOptions::SSL_KEY] = $this->config->getKeyFile(); + } + return $options; } diff --git a/lib/Base/NumberColumn.php b/lib/Base/NumberColumn.php index d85710b4..fe4b51bf 100644 --- a/lib/Base/NumberColumn.php +++ b/lib/Base/NumberColumn.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -467,11 +467,11 @@ public function setColumnData($column_data) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -479,12 +479,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -509,11 +509,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/NumberColumnFormat.php b/lib/Base/NumberColumnFormat.php index e8162970..df3f4e97 100644 --- a/lib/Base/NumberColumnFormat.php +++ b/lib/Base/NumberColumnFormat.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -500,11 +500,11 @@ public function setThousands($thousands) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -512,12 +512,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -542,11 +542,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/NumberColumnWithTableName.php b/lib/Base/NumberColumnWithTableName.php index 6850fc23..f7e8b846 100644 --- a/lib/Base/NumberColumnWithTableName.php +++ b/lib/Base/NumberColumnWithTableName.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -503,11 +503,11 @@ public function setColumnData($column_data) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -515,12 +515,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -545,11 +545,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/NumberFilterPredicate.php b/lib/Base/NumberFilterPredicate.php index ea11fcce..c34c110b 100644 --- a/lib/Base/NumberFilterPredicate.php +++ b/lib/Base/NumberFilterPredicate.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ diff --git a/lib/Base/QuerySQL400Response.php b/lib/Base/QuerySQL400Response.php new file mode 100644 index 00000000..fe815325 --- /dev/null +++ b/lib/Base/QuerySQL400Response.php @@ -0,0 +1,408 @@ + + */ +class QuerySQL400Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'querySQL_400_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'error_message' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'error_message' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'error_message' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'error_message' => 'error_message' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'error_message' => 'setErrorMessage' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'error_message' => 'getErrorMessage' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('error_message', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets error_message + * + * @return string|null + */ + public function getErrorMessage() + { + return $this->container['error_message']; + } + + /** + * Sets error_message + * + * @param string|null $error_message error_message + * + * @return self + */ + public function setErrorMessage($error_message) + { + if (is_null($error_message)) { + throw new \InvalidArgumentException('non-nullable error_message cannot be null'); + } + $this->container['error_message'] = $error_message; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Base/RatingColumn.php b/lib/Base/RatingColumn.php index de9f140d..e1771977 100644 --- a/lib/Base/RatingColumn.php +++ b/lib/Base/RatingColumn.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -470,11 +470,11 @@ public function setColumnData($column_data) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -482,12 +482,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -512,11 +512,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/RatingColumnFormat.php b/lib/Base/RatingColumnFormat.php index 6ecdd430..3b64cbc2 100644 --- a/lib/Base/RatingColumnFormat.php +++ b/lib/Base/RatingColumnFormat.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -449,11 +449,11 @@ public function setRateStyleType($rate_style_type) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -461,12 +461,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -491,11 +491,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/RatingColumnWithTableName.php b/lib/Base/RatingColumnWithTableName.php index 6aefa119..bcc84c16 100644 --- a/lib/Base/RatingColumnWithTableName.php +++ b/lib/Base/RatingColumnWithTableName.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -506,11 +506,11 @@ public function setColumnData($column_data) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -518,12 +518,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -548,11 +548,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/RatingFilterTerm.php b/lib/Base/RatingFilterTerm.php index 2fdd3981..fa97beb8 100644 --- a/lib/Base/RatingFilterTerm.php +++ b/lib/Base/RatingFilterTerm.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ diff --git a/lib/Base/RenameColumn.php b/lib/Base/RenameColumn.php index 20c4fee7..e8c9bdf0 100644 --- a/lib/Base/RenameColumn.php +++ b/lib/Base/RenameColumn.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -472,11 +472,11 @@ public function setNewColumnName($new_column_name) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -484,12 +484,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -514,11 +514,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/RenameTable.php b/lib/Base/RenameTable.php index 733bed09..9700df0c 100644 --- a/lib/Base/RenameTable.php +++ b/lib/Base/RenameTable.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -358,11 +358,11 @@ public function setNewTableName($new_table_name) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -370,12 +370,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -400,11 +400,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/ResizeColumn.php b/lib/Base/ResizeColumn.php index 4dd40842..b5aecae5 100644 --- a/lib/Base/ResizeColumn.php +++ b/lib/Base/ResizeColumn.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -472,11 +472,11 @@ public function setNewColumnWidth($new_column_width) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -484,12 +484,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -514,11 +514,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/RowCommentsApi.php b/lib/Base/RowCommentsApi.php index aa5307fa..cbf4de8e 100644 --- a/lib/Base/RowCommentsApi.php +++ b/lib/Base/RowCommentsApi.php @@ -14,7 +14,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -151,6 +151,7 @@ public function getConfig() * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return object + * @deprecated */ public function deleteComment($base_uuid, $comment_id, string $contentType = self::contentTypes['deleteComment'][0]) { @@ -170,6 +171,7 @@ public function deleteComment($base_uuid, $comment_id, string $contentType = sel * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of object, HTTP status code, HTTP response headers (array of strings) + * @deprecated */ public function deleteCommentWithHttpInfo($base_uuid, $comment_id, string $contentType = self::contentTypes['deleteComment'][0]) { @@ -255,6 +257,7 @@ public function deleteCommentWithHttpInfo($base_uuid, $comment_id, string $conte * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface + * @deprecated */ public function deleteCommentAsync($base_uuid, $comment_id, string $contentType = self::contentTypes['deleteComment'][0]) { @@ -277,6 +280,7 @@ function ($response) { * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface + * @deprecated */ public function deleteCommentAsyncWithHttpInfo($base_uuid, $comment_id, string $contentType = self::contentTypes['deleteComment'][0]) { @@ -328,6 +332,7 @@ function ($exception) { * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request + * @deprecated */ public function deleteCommentRequest($base_uuid, $comment_id, string $contentType = self::contentTypes['deleteComment'][0]) { @@ -448,7 +453,8 @@ public function deleteCommentRequest($base_uuid, $comment_id, string $contentTyp * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return object + * @return \SeaTable\Client\Base\GetComment200Response + * @deprecated */ public function getComment($base_uuid, $comment_id, string $contentType = self::contentTypes['getComment'][0]) { @@ -467,7 +473,8 @@ public function getComment($base_uuid, $comment_id, string $contentType = self:: * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) + * @return array of \SeaTable\Client\Base\GetComment200Response, HTTP status code, HTTP response headers (array of strings) + * @deprecated */ public function getCommentWithHttpInfo($base_uuid, $comment_id, string $contentType = self::contentTypes['getComment'][0]) { @@ -499,7 +506,7 @@ public function getCommentWithHttpInfo($base_uuid, $comment_id, string $contentT switch($statusCode) { case 200: return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\Base\GetComment200Response', $request, $response, ); @@ -521,7 +528,7 @@ public function getCommentWithHttpInfo($base_uuid, $comment_id, string $contentT } return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\Base\GetComment200Response', $request, $response, ); @@ -530,7 +537,7 @@ public function getCommentWithHttpInfo($base_uuid, $comment_id, string $contentT case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - 'object', + '\SeaTable\Client\Base\GetComment200Response', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -553,6 +560,7 @@ public function getCommentWithHttpInfo($base_uuid, $comment_id, string $contentT * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface + * @deprecated */ public function getCommentAsync($base_uuid, $comment_id, string $contentType = self::contentTypes['getComment'][0]) { @@ -575,10 +583,11 @@ function ($response) { * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface + * @deprecated */ public function getCommentAsyncWithHttpInfo($base_uuid, $comment_id, string $contentType = self::contentTypes['getComment'][0]) { - $returnType = 'object'; + $returnType = '\SeaTable\Client\Base\GetComment200Response'; $request = $this->getCommentRequest($base_uuid, $comment_id, $contentType); return $this->client @@ -626,6 +635,7 @@ function ($exception) { * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request + * @deprecated */ public function getCommentRequest($base_uuid, $comment_id, string $contentType = self::contentTypes['getComment'][0]) { @@ -1315,7 +1325,7 @@ public function getRowCommentsCountRequest($base_uuid, $row_id, string $contentT * List Comments within Days * * @param string $base_uuid The unique identifier of a base. Sometimes also called dtable_uuid. (required) - * @param int|null $days days (optional) + * @param int|null $days Number of days to look back for comments. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listCommentsWithinDays'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -1334,7 +1344,7 @@ public function listCommentsWithinDays($base_uuid, $days = null, string $content * List Comments within Days * * @param string $base_uuid The unique identifier of a base. Sometimes also called dtable_uuid. (required) - * @param int|null $days (optional) + * @param int|null $days Number of days to look back for comments. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listCommentsWithinDays'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -1420,7 +1430,7 @@ public function listCommentsWithinDaysWithHttpInfo($base_uuid, $days = null, str * List Comments within Days * * @param string $base_uuid The unique identifier of a base. Sometimes also called dtable_uuid. (required) - * @param int|null $days (optional) + * @param int|null $days Number of days to look back for comments. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listCommentsWithinDays'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1442,7 +1452,7 @@ function ($response) { * List Comments within Days * * @param string $base_uuid The unique identifier of a base. Sometimes also called dtable_uuid. (required) - * @param int|null $days (optional) + * @param int|null $days Number of days to look back for comments. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listCommentsWithinDays'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1493,7 +1503,7 @@ function ($exception) { * Create request for operation 'listCommentsWithinDays' * * @param string $base_uuid The unique identifier of a base. Sometimes also called dtable_uuid. (required) - * @param int|null $days (optional) + * @param int|null $days Number of days to look back for comments. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listCommentsWithinDays'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1917,6 +1927,14 @@ protected function createHttpClientOption() } } + if ($this->config->getCertFile()) { + $options[RequestOptions::CERT] = $this->config->getCertFile(); + } + + if ($this->config->getKeyFile()) { + $options[RequestOptions::SSL_KEY] = $this->config->getKeyFile(); + } + return $options; } diff --git a/lib/Base/RowLinkCreateUpdateDelete.php b/lib/Base/RowLinkCreateUpdateDelete.php index 7a7307e0..98f29e0a 100644 --- a/lib/Base/RowLinkCreateUpdateDelete.php +++ b/lib/Base/RowLinkCreateUpdateDelete.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -464,11 +464,11 @@ public function setOtherRowsIdsMap($other_rows_ids_map) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -476,12 +476,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -506,11 +506,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/Rows.php b/lib/Base/Rows.php index 2c08e292..9bf6aad2 100644 --- a/lib/Base/Rows.php +++ b/lib/Base/Rows.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -321,11 +321,11 @@ public function setRows($rows) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -333,12 +333,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -363,11 +363,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/RowsApi.php b/lib/Base/RowsApi.php index 47e136b5..9eb804c7 100644 --- a/lib/Base/RowsApi.php +++ b/lib/Base/RowsApi.php @@ -14,7 +14,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -156,7 +156,7 @@ public function getConfig() * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return object + * @return \SeaTable\Client\Base\AppendRows200Response */ public function appendRows($base_uuid, $append_rows = null, string $contentType = self::contentTypes['appendRows'][0]) { @@ -175,7 +175,7 @@ public function appendRows($base_uuid, $append_rows = null, string $contentType * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) + * @return array of \SeaTable\Client\Base\AppendRows200Response, HTTP status code, HTTP response headers (array of strings) */ public function appendRowsWithHttpInfo($base_uuid, $append_rows = null, string $contentType = self::contentTypes['appendRows'][0]) { @@ -207,7 +207,7 @@ public function appendRowsWithHttpInfo($base_uuid, $append_rows = null, string $ switch($statusCode) { case 200: return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\Base\AppendRows200Response', $request, $response, ); @@ -229,7 +229,7 @@ public function appendRowsWithHttpInfo($base_uuid, $append_rows = null, string $ } return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\Base\AppendRows200Response', $request, $response, ); @@ -238,7 +238,7 @@ public function appendRowsWithHttpInfo($base_uuid, $append_rows = null, string $ case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - 'object', + '\SeaTable\Client\Base\AppendRows200Response', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -286,7 +286,7 @@ function ($response) { */ public function appendRowsAsyncWithHttpInfo($base_uuid, $append_rows = null, string $contentType = self::contentTypes['appendRows'][0]) { - $returnType = 'object'; + $returnType = '\SeaTable\Client\Base\AppendRows200Response'; $request = $this->appendRowsRequest($base_uuid, $append_rows, $contentType); return $this->client @@ -734,7 +734,7 @@ public function deleteRowRequest($base_uuid, $delete_rows = null, string $conten * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return object + * @return \SeaTable\Client\Base\GetRow200Response|object|object */ public function getRow($base_uuid, $row_id, $table_name, $convert_keys = null, string $contentType = self::contentTypes['getRow'][0]) { @@ -755,7 +755,7 @@ public function getRow($base_uuid, $row_id, $table_name, $convert_keys = null, s * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) + * @return array of \SeaTable\Client\Base\GetRow200Response|object|object, HTTP status code, HTTP response headers (array of strings) */ public function getRowWithHttpInfo($base_uuid, $row_id, $table_name, $convert_keys = null, string $contentType = self::contentTypes['getRow'][0]) { @@ -786,6 +786,18 @@ public function getRowWithHttpInfo($base_uuid, $row_id, $table_name, $convert_ke switch($statusCode) { case 200: + return $this->handleResponseWithDataType( + '\SeaTable\Client\Base\GetRow200Response', + $request, + $response, + ); + case 403: + return $this->handleResponseWithDataType( + 'object', + $request, + $response, + ); + case 404: return $this->handleResponseWithDataType( 'object', $request, @@ -809,13 +821,29 @@ public function getRowWithHttpInfo($base_uuid, $row_id, $table_name, $convert_ke } return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\Base\GetRow200Response', $request, $response, ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\SeaTable\Client\Base\GetRow200Response', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + 'object', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), 'object', @@ -870,7 +898,7 @@ function ($response) { */ public function getRowAsyncWithHttpInfo($base_uuid, $row_id, $table_name, $convert_keys = null, string $contentType = self::contentTypes['getRow'][0]) { - $returnType = 'object'; + $returnType = '\SeaTable\Client\Base\GetRow200Response'; $request = $this->getRowRequest($base_uuid, $row_id, $table_name, $convert_keys, $contentType); return $this->client @@ -940,8 +968,8 @@ public function getRowRequest($base_uuid, $row_id, $table_name, $convert_keys = 'Missing the required parameter $row_id when calling getRow' ); } - if (!preg_match("/^[A-Za-z0-9]{22}$/", $row_id)) { - throw new \InvalidArgumentException("invalid value for \"row_id\" when calling RowsApi.getRow, must conform to the pattern /^[A-Za-z0-9]{22}$/."); + if (!preg_match("/^[A-Za-z0-9\\-\\_]{22}$/", $row_id)) { + throw new \InvalidArgumentException("invalid value for \"row_id\" when calling RowsApi.getRow, must conform to the pattern /^[A-Za-z0-9\\-\\_]{22}$/."); } // verify the required parameter 'table_name' is set @@ -1062,7 +1090,7 @@ public function getRowRequest($base_uuid, $row_id, $table_name, $convert_keys = * * @param string $base_uuid The unique identifier of a base. Sometimes also called dtable_uuid. (required) * @param string $table_name The name of the table to perform the operation on. Alternatively, you can use the `table_id` instead of `table_name`. If using `table_id`, ensure that the key in the request body is replaced accordingly. **Example:** Instead of `table_name: Table1` you can use `table_id: 0000`. (required) - * @param string|null $view_name The name of the view to perform the operation on. Alternatively, you can use the `view_id` instead of `view_name`. If using `view_id`, ensure that the key in the request body is replaced accordingly. **Example:** Instead of `view_name: Default View` you an use `view_id: 0000`. (optional) + * @param string|null $view_name The name of the view to perform the operation on. Alternatively, you can use the `view_id` instead of `view_name`. If using `view_id`, ensure that the key in the request body is replaced accordingly. **Example:** Instead of `view_name: Default View` you can use `view_id: 0000`. (optional) * @param int|null $start Starting position (number) of the returned rows. 0 by default. (optional) * @param int|null $limit Number of rows that should be returned. 1000 by default. (optional) * @param bool|null $convert_keys Determines if the columns are returned as their keys (false by default) or their names (true). (optional) @@ -1085,7 +1113,7 @@ public function listRows($base_uuid, $table_name, $view_name = null, $start = nu * * @param string $base_uuid The unique identifier of a base. Sometimes also called dtable_uuid. (required) * @param string $table_name The name of the table to perform the operation on. Alternatively, you can use the `table_id` instead of `table_name`. If using `table_id`, ensure that the key in the request body is replaced accordingly. **Example:** Instead of `table_name: Table1` you can use `table_id: 0000`. (required) - * @param string|null $view_name The name of the view to perform the operation on. Alternatively, you can use the `view_id` instead of `view_name`. If using `view_id`, ensure that the key in the request body is replaced accordingly. **Example:** Instead of `view_name: Default View` you an use `view_id: 0000`. (optional) + * @param string|null $view_name The name of the view to perform the operation on. Alternatively, you can use the `view_id` instead of `view_name`. If using `view_id`, ensure that the key in the request body is replaced accordingly. **Example:** Instead of `view_name: Default View` you can use `view_id: 0000`. (optional) * @param int|null $start Starting position (number) of the returned rows. 0 by default. (optional) * @param int|null $limit Number of rows that should be returned. 1000 by default. (optional) * @param bool|null $convert_keys Determines if the columns are returned as their keys (false by default) or their names (true). (optional) @@ -1175,7 +1203,7 @@ public function listRowsWithHttpInfo($base_uuid, $table_name, $view_name = null, * * @param string $base_uuid The unique identifier of a base. Sometimes also called dtable_uuid. (required) * @param string $table_name The name of the table to perform the operation on. Alternatively, you can use the `table_id` instead of `table_name`. If using `table_id`, ensure that the key in the request body is replaced accordingly. **Example:** Instead of `table_name: Table1` you can use `table_id: 0000`. (required) - * @param string|null $view_name The name of the view to perform the operation on. Alternatively, you can use the `view_id` instead of `view_name`. If using `view_id`, ensure that the key in the request body is replaced accordingly. **Example:** Instead of `view_name: Default View` you an use `view_id: 0000`. (optional) + * @param string|null $view_name The name of the view to perform the operation on. Alternatively, you can use the `view_id` instead of `view_name`. If using `view_id`, ensure that the key in the request body is replaced accordingly. **Example:** Instead of `view_name: Default View` you can use `view_id: 0000`. (optional) * @param int|null $start Starting position (number) of the returned rows. 0 by default. (optional) * @param int|null $limit Number of rows that should be returned. 1000 by default. (optional) * @param bool|null $convert_keys Determines if the columns are returned as their keys (false by default) or their names (true). (optional) @@ -1201,7 +1229,7 @@ function ($response) { * * @param string $base_uuid The unique identifier of a base. Sometimes also called dtable_uuid. (required) * @param string $table_name The name of the table to perform the operation on. Alternatively, you can use the `table_id` instead of `table_name`. If using `table_id`, ensure that the key in the request body is replaced accordingly. **Example:** Instead of `table_name: Table1` you can use `table_id: 0000`. (required) - * @param string|null $view_name The name of the view to perform the operation on. Alternatively, you can use the `view_id` instead of `view_name`. If using `view_id`, ensure that the key in the request body is replaced accordingly. **Example:** Instead of `view_name: Default View` you an use `view_id: 0000`. (optional) + * @param string|null $view_name The name of the view to perform the operation on. Alternatively, you can use the `view_id` instead of `view_name`. If using `view_id`, ensure that the key in the request body is replaced accordingly. **Example:** Instead of `view_name: Default View` you can use `view_id: 0000`. (optional) * @param int|null $start Starting position (number) of the returned rows. 0 by default. (optional) * @param int|null $limit Number of rows that should be returned. 1000 by default. (optional) * @param bool|null $convert_keys Determines if the columns are returned as their keys (false by default) or their names (true). (optional) @@ -1256,7 +1284,7 @@ function ($exception) { * * @param string $base_uuid The unique identifier of a base. Sometimes also called dtable_uuid. (required) * @param string $table_name The name of the table to perform the operation on. Alternatively, you can use the `table_id` instead of `table_name`. If using `table_id`, ensure that the key in the request body is replaced accordingly. **Example:** Instead of `table_name: Table1` you can use `table_id: 0000`. (required) - * @param string|null $view_name The name of the view to perform the operation on. Alternatively, you can use the `view_id` instead of `view_name`. If using `view_id`, ensure that the key in the request body is replaced accordingly. **Example:** Instead of `view_name: Default View` you an use `view_id: 0000`. (optional) + * @param string|null $view_name The name of the view to perform the operation on. Alternatively, you can use the `view_id` instead of `view_name`. If using `view_id`, ensure that the key in the request body is replaced accordingly. **Example:** Instead of `view_name: Default View` you can use `view_id: 0000`. (optional) * @param int|null $start Starting position (number) of the returned rows. 0 by default. (optional) * @param int|null $limit Number of rows that should be returned. 1000 by default. (optional) * @param bool|null $convert_keys Determines if the columns are returned as their keys (false by default) or their names (true). (optional) @@ -1716,7 +1744,7 @@ public function lockRowsRequest($base_uuid, $table_with_row_ids = null, string $ * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \SeaTable\Client\Base\SqlQueryResponse + * @return \SeaTable\Client\Base\SqlQueryResponse|\SeaTable\Client\Base\QuerySQL400Response */ public function querySQL($base_uuid, $sql_query = null, string $contentType = self::contentTypes['querySQL'][0]) { @@ -1735,7 +1763,7 @@ public function querySQL($base_uuid, $sql_query = null, string $contentType = se * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \SeaTable\Client\Base\SqlQueryResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \SeaTable\Client\Base\SqlQueryResponse|\SeaTable\Client\Base\QuerySQL400Response, HTTP status code, HTTP response headers (array of strings) */ public function querySQLWithHttpInfo($base_uuid, $sql_query = null, string $contentType = self::contentTypes['querySQL'][0]) { @@ -1771,6 +1799,12 @@ public function querySQLWithHttpInfo($base_uuid, $sql_query = null, string $cont $request, $response, ); + case 400: + return $this->handleResponseWithDataType( + '\SeaTable\Client\Base\QuerySQL400Response', + $request, + $response, + ); } @@ -1803,6 +1837,14 @@ public function querySQLWithHttpInfo($base_uuid, $sql_query = null, string $cont ); $e->setResponseObject($data); throw $e; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\SeaTable\Client\Base\QuerySQL400Response', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; } @@ -2585,6 +2627,14 @@ protected function createHttpClientOption() } } + if ($this->config->getCertFile()) { + $options[RequestOptions::CERT] = $this->config->getCertFile(); + } + + if ($this->config->getKeyFile()) { + $options[RequestOptions::SSL_KEY] = $this->config->getKeyFile(); + } + return $options; } diff --git a/lib/Base/RowsWithTableName.php b/lib/Base/RowsWithTableName.php index 01c78d22..8b1160b2 100644 --- a/lib/Base/RowsWithTableName.php +++ b/lib/Base/RowsWithTableName.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -357,11 +357,11 @@ public function setRows($rows) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -369,12 +369,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -399,11 +399,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/SelectColumnFormat.php b/lib/Base/SelectColumnFormat.php index 86b6ffb7..9388478a 100644 --- a/lib/Base/SelectColumnFormat.php +++ b/lib/Base/SelectColumnFormat.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -318,11 +318,11 @@ public function setOptions($options) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -330,12 +330,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -360,11 +360,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/SelectColumnFormatOptionsInner.php b/lib/Base/SelectColumnFormatOptionsInner.php index 32cfc478..a84a5571 100644 --- a/lib/Base/SelectColumnFormatOptionsInner.php +++ b/lib/Base/SelectColumnFormatOptionsInner.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -306,16 +306,16 @@ public function listInvalidProperties() $invalidProperties[] = "invalid value for 'id', must be conform to the pattern /^([A-Za-z0-9]){6}$/."; } - if (!is_null($this->container['color']) && !preg_match("/#([A-Za-z0-9]){6}/", $this->container['color'])) { - $invalidProperties[] = "invalid value for 'color', must be conform to the pattern /#([A-Za-z0-9]){6}/."; + if (!is_null($this->container['color']) && !preg_match("/^#[A-Fa-f0-9]{6}$/", $this->container['color'])) { + $invalidProperties[] = "invalid value for 'color', must be conform to the pattern /^#[A-Fa-f0-9]{6}$/."; } - if (!is_null($this->container['text_color']) && !preg_match("/#([A-Za-z0-9]){6}/", $this->container['text_color'])) { - $invalidProperties[] = "invalid value for 'text_color', must be conform to the pattern /#([A-Za-z0-9]){6}/."; + if (!is_null($this->container['text_color']) && !preg_match("/^#[A-Fa-f0-9]{6}$/", $this->container['text_color'])) { + $invalidProperties[] = "invalid value for 'text_color', must be conform to the pattern /^#[A-Fa-f0-9]{6}$/."; } - if (!is_null($this->container['border_color']) && !preg_match("/#([A-Za-z0-9]){6}/", $this->container['border_color'])) { - $invalidProperties[] = "invalid value for 'border_color', must be conform to the pattern /#([A-Za-z0-9]){6}/."; + if (!is_null($this->container['border_color']) && !preg_match("/^#[A-Fa-f0-9]{6}$/", $this->container['border_color'])) { + $invalidProperties[] = "invalid value for 'border_color', must be conform to the pattern /^#[A-Fa-f0-9]{6}$/."; } return $invalidProperties; @@ -405,7 +405,7 @@ public function getColor() /** * Sets color * - * @param string|null $color select your code-code for the background. + * @param string|null $color select your color-code for the background. * * @return self */ @@ -415,8 +415,8 @@ public function setColor($color) throw new \InvalidArgumentException('non-nullable color cannot be null'); } - if ((!preg_match("/#([A-Za-z0-9]){6}/", ObjectSerializer::toString($color)))) { - throw new \InvalidArgumentException("invalid value for \$color when calling SelectColumnFormatOptionsInner., must conform to the pattern /#([A-Za-z0-9]){6}/."); + if ((!preg_match("/^#[A-Fa-f0-9]{6}$/", ObjectSerializer::toString($color)))) { + throw new \InvalidArgumentException("invalid value for \$color when calling SelectColumnFormatOptionsInner., must conform to the pattern /^#[A-Fa-f0-9]{6}$/."); } $this->container['color'] = $color; @@ -447,8 +447,8 @@ public function setTextColor($text_color) throw new \InvalidArgumentException('non-nullable text_color cannot be null'); } - if ((!preg_match("/#([A-Za-z0-9]){6}/", ObjectSerializer::toString($text_color)))) { - throw new \InvalidArgumentException("invalid value for \$text_color when calling SelectColumnFormatOptionsInner., must conform to the pattern /#([A-Za-z0-9]){6}/."); + if ((!preg_match("/^#[A-Fa-f0-9]{6}$/", ObjectSerializer::toString($text_color)))) { + throw new \InvalidArgumentException("invalid value for \$text_color when calling SelectColumnFormatOptionsInner., must conform to the pattern /^#[A-Fa-f0-9]{6}$/."); } $this->container['text_color'] = $text_color; @@ -479,8 +479,8 @@ public function setBorderColor($border_color) throw new \InvalidArgumentException('non-nullable border_color cannot be null'); } - if ((!preg_match("/#([A-Za-z0-9]){6}/", ObjectSerializer::toString($border_color)))) { - throw new \InvalidArgumentException("invalid value for \$border_color when calling SelectColumnFormatOptionsInner., must conform to the pattern /#([A-Za-z0-9]){6}/."); + if ((!preg_match("/^#[A-Fa-f0-9]{6}$/", ObjectSerializer::toString($border_color)))) { + throw new \InvalidArgumentException("invalid value for \$border_color when calling SelectColumnFormatOptionsInner., must conform to the pattern /^#[A-Fa-f0-9]{6}$/."); } $this->container['border_color'] = $border_color; @@ -490,11 +490,11 @@ public function setBorderColor($border_color) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -502,12 +502,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -532,11 +532,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/SendToastNotificationRequest.php b/lib/Base/SendToastNotificationRequest.php index 58be68d6..eaae981f 100644 --- a/lib/Base/SendToastNotificationRequest.php +++ b/lib/Base/SendToastNotificationRequest.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -48,7 +48,7 @@ class SendToastNotificationRequest implements ModelInterface, ArrayAccess, \Json * * @var string */ - protected static $openAPIModelName = 'SendToastNotification_request'; + protected static $openAPIModelName = 'sendToastNotification_request'; /** * Array of property to type mappings. Used for (de)serialization @@ -421,11 +421,11 @@ public function setDetail($detail) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -433,12 +433,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -463,11 +463,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/SendToastNotificationRequestDetail.php b/lib/Base/SendToastNotificationRequestDetail.php index b712d13b..030f891d 100644 --- a/lib/Base/SendToastNotificationRequestDetail.php +++ b/lib/Base/SendToastNotificationRequestDetail.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -48,7 +48,7 @@ class SendToastNotificationRequestDetail implements ModelInterface, ArrayAccess, * * @var string */ - protected static $openAPIModelName = 'SendToastNotification_request_detail'; + protected static $openAPIModelName = 'sendToastNotification_request_detail'; /** * Array of property to type mappings. Used for (de)serialization @@ -317,11 +317,11 @@ public function setMsg($msg) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -329,12 +329,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -359,11 +359,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/SingleSelectColumn.php b/lib/Base/SingleSelectColumn.php index d5ec3370..281f27e2 100644 --- a/lib/Base/SingleSelectColumn.php +++ b/lib/Base/SingleSelectColumn.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -467,11 +467,11 @@ public function setColumnData($column_data) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -479,12 +479,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -509,11 +509,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/SingleSelectColumnWithTableName.php b/lib/Base/SingleSelectColumnWithTableName.php index 1327aaf8..bf5df9dc 100644 --- a/lib/Base/SingleSelectColumnWithTableName.php +++ b/lib/Base/SingleSelectColumnWithTableName.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -503,11 +503,11 @@ public function setColumnData($column_data) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -515,12 +515,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -545,11 +545,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/SingleSelectFilterPredicate.php b/lib/Base/SingleSelectFilterPredicate.php index c2aba748..9ab00eab 100644 --- a/lib/Base/SingleSelectFilterPredicate.php +++ b/lib/Base/SingleSelectFilterPredicate.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ diff --git a/lib/Base/SnapshotsApi.php b/lib/Base/SnapshotsApi.php index a0643c75..1b3a71f4 100644 --- a/lib/Base/SnapshotsApi.php +++ b/lib/Base/SnapshotsApi.php @@ -14,7 +14,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -428,6 +428,14 @@ protected function createHttpClientOption() } } + if ($this->config->getCertFile()) { + $options[RequestOptions::CERT] = $this->config->getCertFile(); + } + + if ($this->config->getKeyFile()) { + $options[RequestOptions::SSL_KEY] = $this->config->getKeyFile(); + } + return $options; } diff --git a/lib/Base/SortType.php b/lib/Base/SortType.php index 264bb46a..93dbe262 100644 --- a/lib/Base/SortType.php +++ b/lib/Base/SortType.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ diff --git a/lib/Base/SortsInner.php b/lib/Base/SortsInner.php index 51080eaf..d8a7b1e8 100644 --- a/lib/Base/SortsInner.php +++ b/lib/Base/SortsInner.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -351,11 +351,11 @@ public function setSortType($sort_type) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -363,12 +363,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -393,11 +393,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/SqlQuery.php b/lib/Base/SqlQuery.php index 31cf931f..a3fc0d0d 100644 --- a/lib/Base/SqlQuery.php +++ b/lib/Base/SqlQuery.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -422,11 +422,11 @@ public function setServerOnly($server_only) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -434,12 +434,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -464,11 +464,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/SqlQueryParametersInner.php b/lib/Base/SqlQueryParametersInner.php index c3bb0684..38c1e6bb 100644 --- a/lib/Base/SqlQueryParametersInner.php +++ b/lib/Base/SqlQueryParametersInner.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -289,11 +289,11 @@ public function valid() /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -301,12 +301,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -331,11 +331,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/SqlQueryResponse.php b/lib/Base/SqlQueryResponse.php index de3540e2..9ca39ab5 100644 --- a/lib/Base/SqlQueryResponse.php +++ b/lib/Base/SqlQueryResponse.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -385,11 +385,11 @@ public function setSuccess($success) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -397,12 +397,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -427,11 +427,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/StringFilterPredicate.php b/lib/Base/StringFilterPredicate.php index 3bb57a60..b00a40bd 100644 --- a/lib/Base/StringFilterPredicate.php +++ b/lib/Base/StringFilterPredicate.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ diff --git a/lib/Base/TableNameObject.php b/lib/Base/TableNameObject.php index cfda1dca..6576d96a 100644 --- a/lib/Base/TableNameObject.php +++ b/lib/Base/TableNameObject.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -320,11 +320,11 @@ public function setTableName($table_name) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -332,12 +332,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -362,11 +362,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/TableWithRowIds.php b/lib/Base/TableWithRowIds.php index 5b7d2492..a1a336d5 100644 --- a/lib/Base/TableWithRowIds.php +++ b/lib/Base/TableWithRowIds.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -357,11 +357,11 @@ public function setRowIds($row_ids) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -369,12 +369,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -399,11 +399,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/TablesApi.php b/lib/Base/TablesApi.php index 0ece66c8..175fad33 100644 --- a/lib/Base/TablesApi.php +++ b/lib/Base/TablesApi.php @@ -14,7 +14,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -720,7 +720,7 @@ public function deleteTableRequest($base_uuid, $delete_table = null, string $con * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return object + * @return \SeaTable\Client\Base\DuplicateTable200Response */ public function duplicateTable($base_uuid, $duplicate_table = null, string $contentType = self::contentTypes['duplicateTable'][0]) { @@ -739,7 +739,7 @@ public function duplicateTable($base_uuid, $duplicate_table = null, string $cont * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) + * @return array of \SeaTable\Client\Base\DuplicateTable200Response, HTTP status code, HTTP response headers (array of strings) */ public function duplicateTableWithHttpInfo($base_uuid, $duplicate_table = null, string $contentType = self::contentTypes['duplicateTable'][0]) { @@ -771,7 +771,7 @@ public function duplicateTableWithHttpInfo($base_uuid, $duplicate_table = null, switch($statusCode) { case 200: return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\Base\DuplicateTable200Response', $request, $response, ); @@ -793,7 +793,7 @@ public function duplicateTableWithHttpInfo($base_uuid, $duplicate_table = null, } return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\Base\DuplicateTable200Response', $request, $response, ); @@ -802,7 +802,7 @@ public function duplicateTableWithHttpInfo($base_uuid, $duplicate_table = null, case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - 'object', + '\SeaTable\Client\Base\DuplicateTable200Response', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -850,7 +850,7 @@ function ($response) { */ public function duplicateTableAsyncWithHttpInfo($base_uuid, $duplicate_table = null, string $contentType = self::contentTypes['duplicateTable'][0]) { - $returnType = 'object'; + $returnType = '\SeaTable\Client\Base\DuplicateTable200Response'; $request = $this->duplicateTableRequest($base_uuid, $duplicate_table, $contentType); return $this->client @@ -1301,6 +1301,14 @@ protected function createHttpClientOption() } } + if ($this->config->getCertFile()) { + $options[RequestOptions::CERT] = $this->config->getCertFile(); + } + + if ($this->config->getKeyFile()) { + $options[RequestOptions::SSL_KEY] = $this->config->getKeyFile(); + } + return $options; } diff --git a/lib/Base/TextColumn.php b/lib/Base/TextColumn.php index 838bd417..317f4e50 100644 --- a/lib/Base/TextColumn.php +++ b/lib/Base/TextColumn.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -433,11 +433,11 @@ public function setAnchorColumn($anchor_column) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -445,12 +445,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -475,11 +475,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/TextColumnWithTableName.php b/lib/Base/TextColumnWithTableName.php index 1e016855..1b21e8ee 100644 --- a/lib/Base/TextColumnWithTableName.php +++ b/lib/Base/TextColumnWithTableName.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -469,11 +469,11 @@ public function setAnchorColumn($anchor_column) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -481,12 +481,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -511,11 +511,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/UpdateColumn.php b/lib/Base/UpdateColumn.php index 8d01814b..5bfa23ac 100644 --- a/lib/Base/UpdateColumn.php +++ b/lib/Base/UpdateColumn.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -654,11 +654,11 @@ public function setFrozen($frozen) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -666,12 +666,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -696,11 +696,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/UpdateColumn200Response.php b/lib/Base/UpdateColumn200Response.php new file mode 100644 index 00000000..1d5e59ed --- /dev/null +++ b/lib/Base/UpdateColumn200Response.php @@ -0,0 +1,721 @@ + + */ +class UpdateColumn200Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'updateColumn_200_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'key' => 'string', + 'type' => 'string', + 'name' => 'string', + 'editable' => 'bool', + 'width' => 'int', + 'resizable' => 'bool', + 'draggable' => 'bool', + 'data' => 'object', + 'permission_type' => 'string', + 'permitted_users' => 'string[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'key' => null, + 'type' => null, + 'name' => null, + 'editable' => null, + 'width' => null, + 'resizable' => null, + 'draggable' => null, + 'data' => null, + 'permission_type' => null, + 'permitted_users' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'key' => false, + 'type' => false, + 'name' => false, + 'editable' => false, + 'width' => false, + 'resizable' => false, + 'draggable' => false, + 'data' => true, + 'permission_type' => false, + 'permitted_users' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'key' => 'key', + 'type' => 'type', + 'name' => 'name', + 'editable' => 'editable', + 'width' => 'width', + 'resizable' => 'resizable', + 'draggable' => 'draggable', + 'data' => 'data', + 'permission_type' => 'permission_type', + 'permitted_users' => 'permitted_users' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'key' => 'setKey', + 'type' => 'setType', + 'name' => 'setName', + 'editable' => 'setEditable', + 'width' => 'setWidth', + 'resizable' => 'setResizable', + 'draggable' => 'setDraggable', + 'data' => 'setData', + 'permission_type' => 'setPermissionType', + 'permitted_users' => 'setPermittedUsers' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'key' => 'getKey', + 'type' => 'getType', + 'name' => 'getName', + 'editable' => 'getEditable', + 'width' => 'getWidth', + 'resizable' => 'getResizable', + 'draggable' => 'getDraggable', + 'data' => 'getData', + 'permission_type' => 'getPermissionType', + 'permitted_users' => 'getPermittedUsers' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('key', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('editable', $data ?? [], null); + $this->setIfExists('width', $data ?? [], null); + $this->setIfExists('resizable', $data ?? [], null); + $this->setIfExists('draggable', $data ?? [], null); + $this->setIfExists('data', $data ?? [], null); + $this->setIfExists('permission_type', $data ?? [], null); + $this->setIfExists('permitted_users', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets key + * + * @return string|null + */ + public function getKey() + { + return $this->container['key']; + } + + /** + * Sets key + * + * @param string|null $key key + * + * @return self + */ + public function setKey($key) + { + if (is_null($key)) { + throw new \InvalidArgumentException('non-nullable key cannot be null'); + } + $this->container['key'] = $key; + + return $this; + } + + /** + * Gets type + * + * @return string|null + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type type + * + * @return self + */ + public function setType($type) + { + if (is_null($type)) { + throw new \InvalidArgumentException('non-nullable type cannot be null'); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name name + * + * @return self + */ + public function setName($name) + { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets editable + * + * @return bool|null + */ + public function getEditable() + { + return $this->container['editable']; + } + + /** + * Sets editable + * + * @param bool|null $editable editable + * + * @return self + */ + public function setEditable($editable) + { + if (is_null($editable)) { + throw new \InvalidArgumentException('non-nullable editable cannot be null'); + } + $this->container['editable'] = $editable; + + return $this; + } + + /** + * Gets width + * + * @return int|null + */ + public function getWidth() + { + return $this->container['width']; + } + + /** + * Sets width + * + * @param int|null $width width + * + * @return self + */ + public function setWidth($width) + { + if (is_null($width)) { + throw new \InvalidArgumentException('non-nullable width cannot be null'); + } + $this->container['width'] = $width; + + return $this; + } + + /** + * Gets resizable + * + * @return bool|null + */ + public function getResizable() + { + return $this->container['resizable']; + } + + /** + * Sets resizable + * + * @param bool|null $resizable resizable + * + * @return self + */ + public function setResizable($resizable) + { + if (is_null($resizable)) { + throw new \InvalidArgumentException('non-nullable resizable cannot be null'); + } + $this->container['resizable'] = $resizable; + + return $this; + } + + /** + * Gets draggable + * + * @return bool|null + */ + public function getDraggable() + { + return $this->container['draggable']; + } + + /** + * Sets draggable + * + * @param bool|null $draggable draggable + * + * @return self + */ + public function setDraggable($draggable) + { + if (is_null($draggable)) { + throw new \InvalidArgumentException('non-nullable draggable cannot be null'); + } + $this->container['draggable'] = $draggable; + + return $this; + } + + /** + * Gets data + * + * @return object|null + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param object|null $data data + * + * @return self + */ + public function setData($data) + { + if (is_null($data)) { + array_push($this->openAPINullablesSetToNull, 'data'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('data', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['data'] = $data; + + return $this; + } + + /** + * Gets permission_type + * + * @return string|null + */ + public function getPermissionType() + { + return $this->container['permission_type']; + } + + /** + * Sets permission_type + * + * @param string|null $permission_type permission_type + * + * @return self + */ + public function setPermissionType($permission_type) + { + if (is_null($permission_type)) { + throw new \InvalidArgumentException('non-nullable permission_type cannot be null'); + } + $this->container['permission_type'] = $permission_type; + + return $this; + } + + /** + * Gets permitted_users + * + * @return string[]|null + */ + public function getPermittedUsers() + { + return $this->container['permitted_users']; + } + + /** + * Sets permitted_users + * + * @param string[]|null $permitted_users permitted_users + * + * @return self + */ + public function setPermittedUsers($permitted_users) + { + if (is_null($permitted_users)) { + throw new \InvalidArgumentException('non-nullable permitted_users cannot be null'); + } + $this->container['permitted_users'] = $permitted_users; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Base/UpdateColumnType.php b/lib/Base/UpdateColumnType.php index 114b100f..ec365364 100644 --- a/lib/Base/UpdateColumnType.php +++ b/lib/Base/UpdateColumnType.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -506,11 +506,11 @@ public function setColumnData($column_data) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -518,12 +518,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -548,11 +548,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/UpdateComment.php b/lib/Base/UpdateComment.php index ef473ccd..69b9c02b 100644 --- a/lib/Base/UpdateComment.php +++ b/lib/Base/UpdateComment.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -320,11 +320,11 @@ public function setOptions($options) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -332,12 +332,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -362,11 +362,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/UpdateCommentOptions.php b/lib/Base/UpdateCommentOptions.php index 3efc7606..c6cd7e43 100644 --- a/lib/Base/UpdateCommentOptions.php +++ b/lib/Base/UpdateCommentOptions.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -385,11 +385,11 @@ public function setResolved($resolved) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -397,12 +397,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -427,11 +427,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/UpdateRow.php b/lib/Base/UpdateRow.php index 3edaf8ad..ef84d136 100644 --- a/lib/Base/UpdateRow.php +++ b/lib/Base/UpdateRow.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -294,8 +294,8 @@ public function listInvalidProperties() if ($this->container['row_id'] === null) { $invalidProperties[] = "'row_id' can't be null"; } - if (!preg_match("/^[a-zA-Z0-9\\-\\_]{22}$/", $this->container['row_id'])) { - $invalidProperties[] = "invalid value for 'row_id', must be conform to the pattern /^[a-zA-Z0-9\\-\\_]{22}$/."; + if (!preg_match("/^[A-Za-z0-9\\-\\_]{22}$/", $this->container['row_id'])) { + $invalidProperties[] = "invalid value for 'row_id', must be conform to the pattern /^[A-Za-z0-9\\-\\_]{22}$/."; } if ($this->container['row'] === null) { @@ -366,8 +366,8 @@ public function setRowId($row_id) throw new \InvalidArgumentException('non-nullable row_id cannot be null'); } - if ((!preg_match("/^[a-zA-Z0-9\\-\\_]{22}$/", ObjectSerializer::toString($row_id)))) { - throw new \InvalidArgumentException("invalid value for \$row_id when calling UpdateRow., must conform to the pattern /^[a-zA-Z0-9\\-\\_]{22}$/."); + if ((!preg_match("/^[A-Za-z0-9\\-\\_]{22}$/", ObjectSerializer::toString($row_id)))) { + throw new \InvalidArgumentException("invalid value for \$row_id when calling UpdateRow., must conform to the pattern /^[A-Za-z0-9\\-\\_]{22}$/."); } $this->container['row_id'] = $row_id; @@ -404,11 +404,11 @@ public function setRow($row) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -416,12 +416,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -446,11 +446,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/UpdateRows.php b/lib/Base/UpdateRows.php index 9bc871aa..c4a19082 100644 --- a/lib/Base/UpdateRows.php +++ b/lib/Base/UpdateRows.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -358,11 +358,11 @@ public function setUpdates($updates) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -370,12 +370,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -400,11 +400,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/UpdateRowsUpdatesInner.php b/lib/Base/UpdateRowsUpdatesInner.php index 489fc166..f6a3e293 100644 --- a/lib/Base/UpdateRowsUpdatesInner.php +++ b/lib/Base/UpdateRowsUpdatesInner.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -280,8 +280,8 @@ public function listInvalidProperties() { $invalidProperties = []; - if (!is_null($this->container['row_id']) && !preg_match("/^[a-zA-Z0-9\\-\\_]{22}$/", $this->container['row_id'])) { - $invalidProperties[] = "invalid value for 'row_id', must be conform to the pattern /^[a-zA-Z0-9\\-\\_]{22}$/."; + if (!is_null($this->container['row_id']) && !preg_match("/^[A-Za-z0-9\\-\\_]{22}$/", $this->container['row_id'])) { + $invalidProperties[] = "invalid value for 'row_id', must be conform to the pattern /^[A-Za-z0-9\\-\\_]{22}$/."; } return $invalidProperties; @@ -322,8 +322,8 @@ public function setRowId($row_id) throw new \InvalidArgumentException('non-nullable row_id cannot be null'); } - if ((!preg_match("/^[a-zA-Z0-9\\-\\_]{22}$/", ObjectSerializer::toString($row_id)))) { - throw new \InvalidArgumentException("invalid value for \$row_id when calling UpdateRowsUpdatesInner., must conform to the pattern /^[a-zA-Z0-9\\-\\_]{22}$/."); + if ((!preg_match("/^[A-Za-z0-9\\-\\_]{22}$/", ObjectSerializer::toString($row_id)))) { + throw new \InvalidArgumentException("invalid value for \$row_id when calling UpdateRowsUpdatesInner., must conform to the pattern /^[A-Za-z0-9\\-\\_]{22}$/."); } $this->container['row_id'] = $row_id; @@ -360,11 +360,11 @@ public function setRow($row) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -372,12 +372,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -402,11 +402,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/UpdateSingleMultipleSelectOptions.php b/lib/Base/UpdateSingleMultipleSelectOptions.php index 95a91b67..542bbda2 100644 --- a/lib/Base/UpdateSingleMultipleSelectOptions.php +++ b/lib/Base/UpdateSingleMultipleSelectOptions.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -428,11 +428,11 @@ public function setReturnOptions($return_options) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -440,12 +440,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -470,11 +470,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/UpdateSingleMultipleSelectOptionsOptionsInner.php b/lib/Base/UpdateSingleMultipleSelectOptionsOptionsInner.php index e6dca112..f0cda21b 100644 --- a/lib/Base/UpdateSingleMultipleSelectOptionsOptionsInner.php +++ b/lib/Base/UpdateSingleMultipleSelectOptionsOptionsInner.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -422,11 +422,11 @@ public function setName($name) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -434,12 +434,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -464,11 +464,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/UpdateView.php b/lib/Base/UpdateView.php index 2d915a2d..de759a80 100644 --- a/lib/Base/UpdateView.php +++ b/lib/Base/UpdateView.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -343,7 +343,7 @@ public function getName() /** * Sets name * - * @param string|null $name The name of the view to perform the operation on. Alternatively, you can use the `view_id` instead of `view_name`. If using `view_id`, ensure that the key in the request body is replaced accordingly. **Example:** Instead of `view_name: Default View` you an use `view_id: 0000`. + * @param string|null $name The name of the view to perform the operation on. Alternatively, you can use the `view_id` instead of `view_name`. If using `view_id`, ensure that the key in the request body is replaced accordingly. **Example:** Instead of `view_name: Default View` you can use `view_id: 0000`. * * @return self */ @@ -505,7 +505,7 @@ public function getHiddenColumns() /** * Sets hidden_columns * - * @param string[]|null $hidden_columns IDs of the rows that should be hidden + * @param string[]|null $hidden_columns IDs of the columns that should be hidden * * @return self */ @@ -521,11 +521,11 @@ public function setHiddenColumns($hidden_columns) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -533,12 +533,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -563,11 +563,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/UpdateViewFiltersInner.php b/lib/Base/UpdateViewFiltersInner.php index 89f6c0b2..c550caa7 100644 --- a/lib/Base/UpdateViewFiltersInner.php +++ b/lib/Base/UpdateViewFiltersInner.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -59,8 +59,7 @@ class UpdateViewFiltersInner implements ModelInterface, ArrayAccess, \JsonSerial 'column_key' => 'string', 'filter_predicate' => '\SeaTable\Client\Base\EmailFilterPredicate', 'filter_term' => 'string', - 'filter_term_modifier' => '\SeaTable\Client\Base\DateFilterTermModifier', - 'email_filter_predicate' => '\SeaTable\Client\Base\EmailFilterPredicate' + 'filter_term_modifier' => '\SeaTable\Client\Base\DateFilterTermModifier' ]; /** @@ -74,8 +73,7 @@ class UpdateViewFiltersInner implements ModelInterface, ArrayAccess, \JsonSerial 'column_key' => null, 'filter_predicate' => null, 'filter_term' => null, - 'filter_term_modifier' => null, - 'email_filter_predicate' => null + 'filter_term_modifier' => null ]; /** @@ -87,8 +85,7 @@ class UpdateViewFiltersInner implements ModelInterface, ArrayAccess, \JsonSerial 'column_key' => false, 'filter_predicate' => false, 'filter_term' => false, - 'filter_term_modifier' => false, - 'email_filter_predicate' => false + 'filter_term_modifier' => false ]; /** @@ -180,8 +177,7 @@ public function isNullableSetToNull(string $property): bool 'column_key' => 'column_key', 'filter_predicate' => 'filter_predicate', 'filter_term' => 'filter_term', - 'filter_term_modifier' => 'filter_term_modifier', - 'email_filter_predicate' => 'email_filter_predicate' + 'filter_term_modifier' => 'filter_term_modifier' ]; /** @@ -193,8 +189,7 @@ public function isNullableSetToNull(string $property): bool 'column_key' => 'setColumnKey', 'filter_predicate' => 'setFilterPredicate', 'filter_term' => 'setFilterTerm', - 'filter_term_modifier' => 'setFilterTermModifier', - 'email_filter_predicate' => 'setEmailFilterPredicate' + 'filter_term_modifier' => 'setFilterTermModifier' ]; /** @@ -206,8 +201,7 @@ public function isNullableSetToNull(string $property): bool 'column_key' => 'getColumnKey', 'filter_predicate' => 'getFilterPredicate', 'filter_term' => 'getFilterTerm', - 'filter_term_modifier' => 'getFilterTermModifier', - 'email_filter_predicate' => 'getEmailFilterPredicate' + 'filter_term_modifier' => 'getFilterTermModifier' ]; /** @@ -271,7 +265,6 @@ public function __construct(?array $data = null) $this->setIfExists('filter_predicate', $data ?? [], null); $this->setIfExists('filter_term', $data ?? [], null); $this->setIfExists('filter_term_modifier', $data ?? [], null); - $this->setIfExists('email_filter_predicate', $data ?? [], null); } /** @@ -423,41 +416,14 @@ public function setFilterTermModifier($filter_term_modifier) return $this; } - - /** - * Gets email_filter_predicate - * - * @return \SeaTable\Client\Base\EmailFilterPredicate|null - */ - public function getEmailFilterPredicate() - { - return $this->container['email_filter_predicate']; - } - - /** - * Sets email_filter_predicate - * - * @param \SeaTable\Client\Base\EmailFilterPredicate|null $email_filter_predicate email_filter_predicate - * - * @return self - */ - public function setEmailFilterPredicate($email_filter_predicate) - { - if (is_null($email_filter_predicate)) { - throw new \InvalidArgumentException('non-nullable email_filter_predicate cannot be null'); - } - $this->container['email_filter_predicate'] = $email_filter_predicate; - - return $this; - } /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -465,12 +431,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -495,11 +461,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/UrlColumn.php b/lib/Base/UrlColumn.php index 89c50a1e..05d93a6b 100644 --- a/lib/Base/UrlColumn.php +++ b/lib/Base/UrlColumn.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -433,11 +433,11 @@ public function setAnchorColumn($anchor_column) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -445,12 +445,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -475,11 +475,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/UrlColumnWithTableName.php b/lib/Base/UrlColumnWithTableName.php index 3fbcfa98..5c8ee6e5 100644 --- a/lib/Base/UrlColumnWithTableName.php +++ b/lib/Base/UrlColumnWithTableName.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -469,11 +469,11 @@ public function setAnchorColumn($anchor_column) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -481,12 +481,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -511,11 +511,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Base/ViewsApi.php b/lib/Base/ViewsApi.php index fdfd944b..3b2175b8 100644 --- a/lib/Base/ViewsApi.php +++ b/lib/Base/ViewsApi.php @@ -14,7 +14,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -148,7 +148,7 @@ public function getConfig() * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return object + * @return \SeaTable\Client\Base\CreateView200Response */ public function createView($base_uuid, $table_name, $new_view = null, string $contentType = self::contentTypes['createView'][0]) { @@ -168,7 +168,7 @@ public function createView($base_uuid, $table_name, $new_view = null, string $co * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) + * @return array of \SeaTable\Client\Base\CreateView200Response, HTTP status code, HTTP response headers (array of strings) */ public function createViewWithHttpInfo($base_uuid, $table_name, $new_view = null, string $contentType = self::contentTypes['createView'][0]) { @@ -200,7 +200,7 @@ public function createViewWithHttpInfo($base_uuid, $table_name, $new_view = null switch($statusCode) { case 200: return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\Base\CreateView200Response', $request, $response, ); @@ -222,7 +222,7 @@ public function createViewWithHttpInfo($base_uuid, $table_name, $new_view = null } return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\Base\CreateView200Response', $request, $response, ); @@ -231,7 +231,7 @@ public function createViewWithHttpInfo($base_uuid, $table_name, $new_view = null case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - 'object', + '\SeaTable\Client\Base\CreateView200Response', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -281,7 +281,7 @@ function ($response) { */ public function createViewAsyncWithHttpInfo($base_uuid, $table_name, $new_view = null, string $contentType = self::contentTypes['createView'][0]) { - $returnType = 'object'; + $returnType = '\SeaTable\Client\Base\CreateView200Response'; $request = $this->createViewRequest($base_uuid, $table_name, $new_view, $contentType); return $this->client @@ -773,7 +773,7 @@ public function deleteViewRequest($base_uuid, $view_name, $table_name, string $c * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return object + * @return \SeaTable\Client\Base\CreateView200Response */ public function getView($base_uuid, $view_name, $table_name, string $contentType = self::contentTypes['getView'][0]) { @@ -793,7 +793,7 @@ public function getView($base_uuid, $view_name, $table_name, string $contentType * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) + * @return array of \SeaTable\Client\Base\CreateView200Response, HTTP status code, HTTP response headers (array of strings) */ public function getViewWithHttpInfo($base_uuid, $view_name, $table_name, string $contentType = self::contentTypes['getView'][0]) { @@ -825,7 +825,7 @@ public function getViewWithHttpInfo($base_uuid, $view_name, $table_name, string switch($statusCode) { case 200: return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\Base\CreateView200Response', $request, $response, ); @@ -847,7 +847,7 @@ public function getViewWithHttpInfo($base_uuid, $view_name, $table_name, string } return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\Base\CreateView200Response', $request, $response, ); @@ -856,7 +856,7 @@ public function getViewWithHttpInfo($base_uuid, $view_name, $table_name, string case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - 'object', + '\SeaTable\Client\Base\CreateView200Response', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -906,7 +906,7 @@ function ($response) { */ public function getViewAsyncWithHttpInfo($base_uuid, $view_name, $table_name, string $contentType = self::contentTypes['getView'][0]) { - $returnType = 'object'; + $returnType = '\SeaTable\Client\Base\CreateView200Response'; $request = $this->getViewRequest($base_uuid, $view_name, $table_name, $contentType); return $this->client @@ -1386,7 +1386,7 @@ public function listViewsRequest($base_uuid, $table_name, string $contentType = * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return object + * @return \SeaTable\Client\Base\CreateView200Response */ public function updateView($base_uuid, $view_name, $table_name, $update_view = null, string $contentType = self::contentTypes['updateView'][0]) { @@ -1407,7 +1407,7 @@ public function updateView($base_uuid, $view_name, $table_name, $update_view = n * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) + * @return array of \SeaTable\Client\Base\CreateView200Response, HTTP status code, HTTP response headers (array of strings) */ public function updateViewWithHttpInfo($base_uuid, $view_name, $table_name, $update_view = null, string $contentType = self::contentTypes['updateView'][0]) { @@ -1439,7 +1439,7 @@ public function updateViewWithHttpInfo($base_uuid, $view_name, $table_name, $upd switch($statusCode) { case 200: return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\Base\CreateView200Response', $request, $response, ); @@ -1461,7 +1461,7 @@ public function updateViewWithHttpInfo($base_uuid, $view_name, $table_name, $upd } return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\Base\CreateView200Response', $request, $response, ); @@ -1470,7 +1470,7 @@ public function updateViewWithHttpInfo($base_uuid, $view_name, $table_name, $upd case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - 'object', + '\SeaTable\Client\Base\CreateView200Response', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1522,7 +1522,7 @@ function ($response) { */ public function updateViewAsyncWithHttpInfo($base_uuid, $view_name, $table_name, $update_view = null, string $contentType = self::contentTypes['updateView'][0]) { - $returnType = 'object'; + $returnType = '\SeaTable\Client\Base\CreateView200Response'; $request = $this->updateViewRequest($base_uuid, $view_name, $table_name, $update_view, $contentType); return $this->client @@ -1718,6 +1718,14 @@ protected function createHttpClientOption() } } + if ($this->config->getCertFile()) { + $options[RequestOptions::CERT] = $this->config->getCertFile(); + } + + if ($this->config->getKeyFile()) { + $options[RequestOptions::SSL_KEY] = $this->config->getKeyFile(); + } + return $options; } diff --git a/lib/Configuration.php b/lib/Configuration.php index 521f4ec8..c8bf1ff1 100644 --- a/lib/Configuration.php +++ b/lib/Configuration.php @@ -14,7 +14,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -122,6 +122,20 @@ class Configuration */ protected $tempFolderPath; + /** + * Path to a certificate file, for mTLS + * + * @var string + */ + protected $certFile; + + /** + * Path to a key file, for mTLS + * + * @var string + */ + protected $keyFile; + /** * Constructor */ @@ -395,6 +409,49 @@ public function getTempFolderPath() return $this->tempFolderPath; } + /** + * Sets the certificate file path, for mTLS + * + * @return $this + */ + public function setCertFile($certFile) + { + $this->certFile = $certFile; + return $this; + } + + /** + * Gets the certificate file path, for mTLS + * + * @return string Certificate file path + */ + public function getCertFile() + { + return $this->certFile; + } + + /** + * Sets the certificate key path, for mTLS + * + * @return $this + */ + public function setKeyFile($keyFile) + { + $this->keyFile = $keyFile; + return $this; + } + + /** + * Gets the certificate key path, for mTLS + * + * @return string Certificate key path + */ + public function getKeyFile() + { + return $this->keyFile; + } + + /** * Gets the default configuration instance * @@ -431,7 +488,7 @@ public static function toDebugReport() $report = 'PHP SDK (SeaTable\Client) Debug Report:' . PHP_EOL; $report .= ' OS: ' . php_uname() . PHP_EOL; $report .= ' PHP Version: ' . PHP_VERSION . PHP_EOL; - $report .= ' The version of the OpenAPI document: 6.0' . PHP_EOL; + $report .= ' The version of the OpenAPI document: 6.1' . PHP_EOL; $report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL; return $report; diff --git a/lib/File/DeleteBaseAsset404Response.php b/lib/File/DeleteBaseAsset404Response.php new file mode 100644 index 00000000..c8ba238a --- /dev/null +++ b/lib/File/DeleteBaseAsset404Response.php @@ -0,0 +1,408 @@ + + */ +class DeleteBaseAsset404Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'deleteBaseAsset_404_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'error_msg' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'error_msg' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'error_msg' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'error_msg' => 'error_msg' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'error_msg' => 'setErrorMsg' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'error_msg' => 'getErrorMsg' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('error_msg', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets error_msg + * + * @return string|null + */ + public function getErrorMsg() + { + return $this->container['error_msg']; + } + + /** + * Sets error_msg + * + * @param string|null $error_msg error_msg + * + * @return self + */ + public function setErrorMsg($error_msg) + { + if (is_null($error_msg)) { + throw new \InvalidArgumentException('non-nullable error_msg cannot be null'); + } + $this->container['error_msg'] = $error_msg; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/File/FilesImagesApi.php b/lib/File/FilesImagesApi.php index adf40ac2..8c189504 100644 --- a/lib/File/FilesImagesApi.php +++ b/lib/File/FilesImagesApi.php @@ -14,7 +14,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -143,7 +143,7 @@ public function getConfig() * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return object + * @return object|\SeaTable\Client\File\DeleteBaseAsset404Response */ public function deleteBaseAsset($path, string $contentType = self::contentTypes['deleteBaseAsset'][0]) { @@ -161,7 +161,7 @@ public function deleteBaseAsset($path, string $contentType = self::contentTypes[ * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) + * @return array of object|\SeaTable\Client\File\DeleteBaseAsset404Response, HTTP status code, HTTP response headers (array of strings) */ public function deleteBaseAssetWithHttpInfo($path, string $contentType = self::contentTypes['deleteBaseAsset'][0]) { @@ -197,6 +197,12 @@ public function deleteBaseAssetWithHttpInfo($path, string $contentType = self::c $request, $response, ); + case 404: + return $this->handleResponseWithDataType( + '\SeaTable\Client\File\DeleteBaseAsset404Response', + $request, + $response, + ); } @@ -229,6 +235,14 @@ public function deleteBaseAssetWithHttpInfo($path, string $contentType = self::c ); $e->setResponseObject($data); throw $e; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\SeaTable\Client\File\DeleteBaseAsset404Response', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; } @@ -419,7 +433,7 @@ public function deleteBaseAssetRequest($path, string $contentType = self::conten * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return object + * @return object|\SeaTable\Client\File\GetFileDownloadLink400Response */ public function getFileDownloadLink($path, string $contentType = self::contentTypes['getFileDownloadLink'][0]) { @@ -437,7 +451,7 @@ public function getFileDownloadLink($path, string $contentType = self::contentTy * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) + * @return array of object|\SeaTable\Client\File\GetFileDownloadLink400Response, HTTP status code, HTTP response headers (array of strings) */ public function getFileDownloadLinkWithHttpInfo($path, string $contentType = self::contentTypes['getFileDownloadLink'][0]) { @@ -473,6 +487,12 @@ public function getFileDownloadLinkWithHttpInfo($path, string $contentType = sel $request, $response, ); + case 400: + return $this->handleResponseWithDataType( + '\SeaTable\Client\File\GetFileDownloadLink400Response', + $request, + $response, + ); } @@ -505,6 +525,14 @@ public function getFileDownloadLinkWithHttpInfo($path, string $contentType = sel ); $e->setResponseObject($data); throw $e; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\SeaTable\Client\File\GetFileDownloadLink400Response', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; } @@ -694,7 +722,7 @@ public function getFileDownloadLinkRequest($path, string $contentType = self::co * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return object + * @return \SeaTable\Client\File\GetUploadLink200Response */ public function getUploadLink(string $contentType = self::contentTypes['getUploadLink'][0]) { @@ -711,7 +739,7 @@ public function getUploadLink(string $contentType = self::contentTypes['getUploa * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) + * @return array of \SeaTable\Client\File\GetUploadLink200Response, HTTP status code, HTTP response headers (array of strings) */ public function getUploadLinkWithHttpInfo(string $contentType = self::contentTypes['getUploadLink'][0]) { @@ -743,7 +771,7 @@ public function getUploadLinkWithHttpInfo(string $contentType = self::contentTyp switch($statusCode) { case 200: return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\File\GetUploadLink200Response', $request, $response, ); @@ -765,7 +793,7 @@ public function getUploadLinkWithHttpInfo(string $contentType = self::contentTyp } return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\File\GetUploadLink200Response', $request, $response, ); @@ -774,7 +802,7 @@ public function getUploadLinkWithHttpInfo(string $contentType = self::contentTyp case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - 'object', + '\SeaTable\Client\File\GetUploadLink200Response', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -818,7 +846,7 @@ function ($response) { */ public function getUploadLinkAsyncWithHttpInfo(string $contentType = self::contentTypes['getUploadLink'][0]) { - $returnType = 'object'; + $returnType = '\SeaTable\Client\File\GetUploadLink200Response'; $request = $this->getUploadLinkRequest($contentType); return $this->client @@ -1286,6 +1314,14 @@ protected function createHttpClientOption() } } + if ($this->config->getCertFile()) { + $options[RequestOptions::CERT] = $this->config->getCertFile(); + } + + if ($this->config->getKeyFile()) { + $options[RequestOptions::SSL_KEY] = $this->config->getKeyFile(); + } + return $options; } diff --git a/lib/File/FilesImagesCustomFolderApi.php b/lib/File/FilesImagesCustomFolderApi.php index db1491be..315084a0 100644 --- a/lib/File/FilesImagesCustomFolderApi.php +++ b/lib/File/FilesImagesCustomFolderApi.php @@ -14,7 +14,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -1538,6 +1538,14 @@ protected function createHttpClientOption() } } + if ($this->config->getCertFile()) { + $options[RequestOptions::CERT] = $this->config->getCertFile(); + } + + if ($this->config->getKeyFile()) { + $options[RequestOptions::SSL_KEY] = $this->config->getKeyFile(); + } + return $options; } diff --git a/lib/File/GetFileDownloadLink400Response.php b/lib/File/GetFileDownloadLink400Response.php new file mode 100644 index 00000000..3affb51f --- /dev/null +++ b/lib/File/GetFileDownloadLink400Response.php @@ -0,0 +1,408 @@ + + */ +class GetFileDownloadLink400Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'getFileDownloadLink_400_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'error_msg' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'error_msg' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'error_msg' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'error_msg' => 'error_msg' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'error_msg' => 'setErrorMsg' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'error_msg' => 'getErrorMsg' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('error_msg', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets error_msg + * + * @return string|null + */ + public function getErrorMsg() + { + return $this->container['error_msg']; + } + + /** + * Sets error_msg + * + * @param string|null $error_msg error_msg + * + * @return self + */ + public function setErrorMsg($error_msg) + { + if (is_null($error_msg)) { + throw new \InvalidArgumentException('non-nullable error_msg cannot be null'); + } + $this->container['error_msg'] = $error_msg; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/File/GetUploadLink200Response.php b/lib/File/GetUploadLink200Response.php new file mode 100644 index 00000000..fc8bc2c5 --- /dev/null +++ b/lib/File/GetUploadLink200Response.php @@ -0,0 +1,544 @@ + + */ +class GetUploadLink200Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'getUploadLink_200_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'upload_link' => 'string', + 'workspace_id' => 'int', + 'parent_path' => 'string', + 'img_relative_path' => 'string', + 'file_relative_path' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'upload_link' => null, + 'workspace_id' => null, + 'parent_path' => null, + 'img_relative_path' => null, + 'file_relative_path' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'upload_link' => false, + 'workspace_id' => false, + 'parent_path' => false, + 'img_relative_path' => false, + 'file_relative_path' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'upload_link' => 'upload_link', + 'workspace_id' => 'workspace_id', + 'parent_path' => 'parent_path', + 'img_relative_path' => 'img_relative_path', + 'file_relative_path' => 'file_relative_path' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'upload_link' => 'setUploadLink', + 'workspace_id' => 'setWorkspaceId', + 'parent_path' => 'setParentPath', + 'img_relative_path' => 'setImgRelativePath', + 'file_relative_path' => 'setFileRelativePath' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'upload_link' => 'getUploadLink', + 'workspace_id' => 'getWorkspaceId', + 'parent_path' => 'getParentPath', + 'img_relative_path' => 'getImgRelativePath', + 'file_relative_path' => 'getFileRelativePath' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('upload_link', $data ?? [], null); + $this->setIfExists('workspace_id', $data ?? [], null); + $this->setIfExists('parent_path', $data ?? [], null); + $this->setIfExists('img_relative_path', $data ?? [], null); + $this->setIfExists('file_relative_path', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets upload_link + * + * @return string|null + */ + public function getUploadLink() + { + return $this->container['upload_link']; + } + + /** + * Sets upload_link + * + * @param string|null $upload_link upload_link + * + * @return self + */ + public function setUploadLink($upload_link) + { + if (is_null($upload_link)) { + throw new \InvalidArgumentException('non-nullable upload_link cannot be null'); + } + $this->container['upload_link'] = $upload_link; + + return $this; + } + + /** + * Gets workspace_id + * + * @return int|null + */ + public function getWorkspaceId() + { + return $this->container['workspace_id']; + } + + /** + * Sets workspace_id + * + * @param int|null $workspace_id workspace_id + * + * @return self + */ + public function setWorkspaceId($workspace_id) + { + if (is_null($workspace_id)) { + throw new \InvalidArgumentException('non-nullable workspace_id cannot be null'); + } + $this->container['workspace_id'] = $workspace_id; + + return $this; + } + + /** + * Gets parent_path + * + * @return string|null + */ + public function getParentPath() + { + return $this->container['parent_path']; + } + + /** + * Sets parent_path + * + * @param string|null $parent_path parent_path + * + * @return self + */ + public function setParentPath($parent_path) + { + if (is_null($parent_path)) { + throw new \InvalidArgumentException('non-nullable parent_path cannot be null'); + } + $this->container['parent_path'] = $parent_path; + + return $this; + } + + /** + * Gets img_relative_path + * + * @return string|null + */ + public function getImgRelativePath() + { + return $this->container['img_relative_path']; + } + + /** + * Sets img_relative_path + * + * @param string|null $img_relative_path img_relative_path + * + * @return self + */ + public function setImgRelativePath($img_relative_path) + { + if (is_null($img_relative_path)) { + throw new \InvalidArgumentException('non-nullable img_relative_path cannot be null'); + } + $this->container['img_relative_path'] = $img_relative_path; + + return $this; + } + + /** + * Gets file_relative_path + * + * @return string|null + */ + public function getFileRelativePath() + { + return $this->container['file_relative_path']; + } + + /** + * Sets file_relative_path + * + * @param string|null $file_relative_path file_relative_path + * + * @return self + */ + public function setFileRelativePath($file_relative_path) + { + if (is_null($file_relative_path)) { + throw new \InvalidArgumentException('non-nullable file_relative_path cannot be null'); + } + $this->container['file_relative_path'] = $file_relative_path; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/File/ModelInterface.php b/lib/File/ModelInterface.php index afa82435..15639264 100644 --- a/lib/File/ModelInterface.php +++ b/lib/File/ModelInterface.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ diff --git a/lib/FormDataProcessor.php b/lib/FormDataProcessor.php index 5384a28e..83c6f9b7 100644 --- a/lib/FormDataProcessor.php +++ b/lib/FormDataProcessor.php @@ -14,7 +14,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ diff --git a/lib/HeaderSelector.php b/lib/HeaderSelector.php index 42c0d749..e5097fec 100644 --- a/lib/HeaderSelector.php +++ b/lib/HeaderSelector.php @@ -14,7 +14,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ diff --git a/lib/ObjectSerializer.php b/lib/ObjectSerializer.php index d2155676..8e8792ae 100644 --- a/lib/ObjectSerializer.php +++ b/lib/ObjectSerializer.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ /** diff --git a/lib/PythonScheduler/ModelInterface.php b/lib/PythonScheduler/ModelInterface.php index cc48dbfd..b63f4a2e 100644 --- a/lib/PythonScheduler/ModelInterface.php +++ b/lib/PythonScheduler/ModelInterface.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ diff --git a/lib/PythonScheduler/RunsApi.php b/lib/PythonScheduler/RunsApi.php index 75d8748f..840b9d50 100644 --- a/lib/PythonScheduler/RunsApi.php +++ b/lib/PythonScheduler/RunsApi.php @@ -14,7 +14,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -494,6 +494,14 @@ protected function createHttpClientOption() } } + if ($this->config->getCertFile()) { + $options[RequestOptions::CERT] = $this->config->getCertFile(); + } + + if ($this->config->getKeyFile()) { + $options[RequestOptions::SSL_KEY] = $this->config->getKeyFile(); + } + return $options; } diff --git a/lib/PythonScheduler/ScriptRunsPerUser200Response.php b/lib/PythonScheduler/ScriptRunsPerUser200Response.php new file mode 100644 index 00000000..390895c6 --- /dev/null +++ b/lib/PythonScheduler/ScriptRunsPerUser200Response.php @@ -0,0 +1,476 @@ + + */ +class ScriptRunsPerUser200Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'scriptRunsPerUser_200_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'month' => 'string', + 'results' => 'object[]', + 'total_count' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'month' => null, + 'results' => null, + 'total_count' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'month' => false, + 'results' => false, + 'total_count' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'month' => 'month', + 'results' => 'results', + 'total_count' => 'total_count' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'month' => 'setMonth', + 'results' => 'setResults', + 'total_count' => 'setTotalCount' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'month' => 'getMonth', + 'results' => 'getResults', + 'total_count' => 'getTotalCount' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('month', $data ?? [], null); + $this->setIfExists('results', $data ?? [], null); + $this->setIfExists('total_count', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets month + * + * @return string|null + */ + public function getMonth() + { + return $this->container['month']; + } + + /** + * Sets month + * + * @param string|null $month month + * + * @return self + */ + public function setMonth($month) + { + if (is_null($month)) { + throw new \InvalidArgumentException('non-nullable month cannot be null'); + } + $this->container['month'] = $month; + + return $this; + } + + /** + * Gets results + * + * @return object[]|null + */ + public function getResults() + { + return $this->container['results']; + } + + /** + * Sets results + * + * @param object[]|null $results results + * + * @return self + */ + public function setResults($results) + { + if (is_null($results)) { + throw new \InvalidArgumentException('non-nullable results cannot be null'); + } + $this->container['results'] = $results; + + return $this; + } + + /** + * Gets total_count + * + * @return int|null + */ + public function getTotalCount() + { + return $this->container['total_count']; + } + + /** + * Sets total_count + * + * @param int|null $total_count total_count + * + * @return self + */ + public function setTotalCount($total_count) + { + if (is_null($total_count)) { + throw new \InvalidArgumentException('non-nullable total_count cannot be null'); + } + $this->container['total_count'] = $total_count; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/PythonScheduler/StatisticsApi.php b/lib/PythonScheduler/StatisticsApi.php index bf11a6b0..e6e09a22 100644 --- a/lib/PythonScheduler/StatisticsApi.php +++ b/lib/PythonScheduler/StatisticsApi.php @@ -14,7 +14,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -829,9 +829,9 @@ public function getStatisticsGroupedByDayRequest($org_id = null, $base_uuid = nu /** * Operation scriptRunsPerBase * - * Script runs per base + * Script Runs per Base * - * @param string|null $month For which month you'd like to list the statistics in the format of YYYY-MM. If you leave this value empty, (optional) + * @param string|null $month For which month you'd like to list the statistics in the format of YYYYMM. If you leave this value empty, the current month is used. (optional) * @param string|null $order_by Select the parameter to order the results. (optional, default to '') * @param string|null $direction The direction of the sort, ascending `asc` or descending `desc`. asc by default. Direction requires that `order_by` is set. (optional, default to '') * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) @@ -840,7 +840,7 @@ public function getStatisticsGroupedByDayRequest($org_id = null, $base_uuid = nu * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return object + * @return \SeaTable\Client\PythonScheduler\ScriptRunsPerUser200Response */ public function scriptRunsPerBase($month = null, $order_by = '', $direction = '', $page = null, $per_page = null, string $contentType = self::contentTypes['scriptRunsPerBase'][0]) { @@ -851,9 +851,9 @@ public function scriptRunsPerBase($month = null, $order_by = '', $direction = '' /** * Operation scriptRunsPerBaseWithHttpInfo * - * Script runs per base + * Script Runs per Base * - * @param string|null $month For which month you'd like to list the statistics in the format of YYYY-MM. If you leave this value empty, (optional) + * @param string|null $month For which month you'd like to list the statistics in the format of YYYYMM. If you leave this value empty, the current month is used. (optional) * @param string|null $order_by Select the parameter to order the results. (optional, default to '') * @param string|null $direction The direction of the sort, ascending `asc` or descending `desc`. asc by default. Direction requires that `order_by` is set. (optional, default to '') * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) @@ -862,7 +862,7 @@ public function scriptRunsPerBase($month = null, $order_by = '', $direction = '' * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) + * @return array of \SeaTable\Client\PythonScheduler\ScriptRunsPerUser200Response, HTTP status code, HTTP response headers (array of strings) */ public function scriptRunsPerBaseWithHttpInfo($month = null, $order_by = '', $direction = '', $page = null, $per_page = null, string $contentType = self::contentTypes['scriptRunsPerBase'][0]) { @@ -894,7 +894,7 @@ public function scriptRunsPerBaseWithHttpInfo($month = null, $order_by = '', $di switch($statusCode) { case 200: return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\PythonScheduler\ScriptRunsPerUser200Response', $request, $response, ); @@ -916,7 +916,7 @@ public function scriptRunsPerBaseWithHttpInfo($month = null, $order_by = '', $di } return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\PythonScheduler\ScriptRunsPerUser200Response', $request, $response, ); @@ -925,7 +925,7 @@ public function scriptRunsPerBaseWithHttpInfo($month = null, $order_by = '', $di case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - 'object', + '\SeaTable\Client\PythonScheduler\ScriptRunsPerUser200Response', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -940,9 +940,9 @@ public function scriptRunsPerBaseWithHttpInfo($month = null, $order_by = '', $di /** * Operation scriptRunsPerBaseAsync * - * Script runs per base + * Script Runs per Base * - * @param string|null $month For which month you'd like to list the statistics in the format of YYYY-MM. If you leave this value empty, (optional) + * @param string|null $month For which month you'd like to list the statistics in the format of YYYYMM. If you leave this value empty, the current month is used. (optional) * @param string|null $order_by Select the parameter to order the results. (optional, default to '') * @param string|null $direction The direction of the sort, ascending `asc` or descending `desc`. asc by default. Direction requires that `order_by` is set. (optional, default to '') * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) @@ -965,9 +965,9 @@ function ($response) { /** * Operation scriptRunsPerBaseAsyncWithHttpInfo * - * Script runs per base + * Script Runs per Base * - * @param string|null $month For which month you'd like to list the statistics in the format of YYYY-MM. If you leave this value empty, (optional) + * @param string|null $month For which month you'd like to list the statistics in the format of YYYYMM. If you leave this value empty, the current month is used. (optional) * @param string|null $order_by Select the parameter to order the results. (optional, default to '') * @param string|null $direction The direction of the sort, ascending `asc` or descending `desc`. asc by default. Direction requires that `order_by` is set. (optional, default to '') * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) @@ -979,7 +979,7 @@ function ($response) { */ public function scriptRunsPerBaseAsyncWithHttpInfo($month = null, $order_by = '', $direction = '', $page = null, $per_page = null, string $contentType = self::contentTypes['scriptRunsPerBase'][0]) { - $returnType = 'object'; + $returnType = '\SeaTable\Client\PythonScheduler\ScriptRunsPerUser200Response'; $request = $this->scriptRunsPerBaseRequest($month, $order_by, $direction, $page, $per_page, $contentType); return $this->client @@ -1021,7 +1021,7 @@ function ($exception) { /** * Create request for operation 'scriptRunsPerBase' * - * @param string|null $month For which month you'd like to list the statistics in the format of YYYY-MM. If you leave this value empty, (optional) + * @param string|null $month For which month you'd like to list the statistics in the format of YYYYMM. If you leave this value empty, the current month is used. (optional) * @param string|null $order_by Select the parameter to order the results. (optional, default to '') * @param string|null $direction The direction of the sort, ascending `asc` or descending `desc`. asc by default. Direction requires that `order_by` is set. (optional, default to '') * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) @@ -1034,8 +1034,8 @@ function ($exception) { public function scriptRunsPerBaseRequest($month = null, $order_by = '', $direction = '', $page = null, $per_page = null, string $contentType = self::contentTypes['scriptRunsPerBase'][0]) { - if ($month !== null && !preg_match("/^[0-9]{4}-(0[1-9]|1[0-2])/", $month)) { - throw new \InvalidArgumentException("invalid value for \"month\" when calling StatisticsApi.scriptRunsPerBase, must conform to the pattern /^[0-9]{4}-(0[1-9]|1[0-2])/."); + if ($month !== null && !preg_match("/^[0-9]{4}(0[1-9]|1[0-2])$/", $month)) { + throw new \InvalidArgumentException("invalid value for \"month\" when calling StatisticsApi.scriptRunsPerBase, must conform to the pattern /^[0-9]{4}(0[1-9]|1[0-2])$/."); } @@ -1165,9 +1165,9 @@ public function scriptRunsPerBaseRequest($month = null, $order_by = '', $directi /** * Operation scriptRunsPerTeam * - * Script runs per team + * Script Runs per Team * - * @param string|null $month For which month you'd like to list the statistics in the format of YYYY-MM. If you leave this value empty, (optional) + * @param string|null $month For which month you'd like to list the statistics in the format of YYYYMM. If you leave this value empty, the current month is used. (optional) * @param string|null $order_by Select the parameter to order the results. (optional, default to '') * @param string|null $direction The direction of the sort, ascending `asc` or descending `desc`. asc by default. Direction requires that `order_by` is set. (optional, default to '') * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) @@ -1176,7 +1176,7 @@ public function scriptRunsPerBaseRequest($month = null, $order_by = '', $directi * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return object + * @return \SeaTable\Client\PythonScheduler\ScriptRunsPerUser200Response */ public function scriptRunsPerTeam($month = null, $order_by = '', $direction = '', $page = null, $per_page = null, string $contentType = self::contentTypes['scriptRunsPerTeam'][0]) { @@ -1187,9 +1187,9 @@ public function scriptRunsPerTeam($month = null, $order_by = '', $direction = '' /** * Operation scriptRunsPerTeamWithHttpInfo * - * Script runs per team + * Script Runs per Team * - * @param string|null $month For which month you'd like to list the statistics in the format of YYYY-MM. If you leave this value empty, (optional) + * @param string|null $month For which month you'd like to list the statistics in the format of YYYYMM. If you leave this value empty, the current month is used. (optional) * @param string|null $order_by Select the parameter to order the results. (optional, default to '') * @param string|null $direction The direction of the sort, ascending `asc` or descending `desc`. asc by default. Direction requires that `order_by` is set. (optional, default to '') * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) @@ -1198,7 +1198,7 @@ public function scriptRunsPerTeam($month = null, $order_by = '', $direction = '' * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) + * @return array of \SeaTable\Client\PythonScheduler\ScriptRunsPerUser200Response, HTTP status code, HTTP response headers (array of strings) */ public function scriptRunsPerTeamWithHttpInfo($month = null, $order_by = '', $direction = '', $page = null, $per_page = null, string $contentType = self::contentTypes['scriptRunsPerTeam'][0]) { @@ -1230,7 +1230,7 @@ public function scriptRunsPerTeamWithHttpInfo($month = null, $order_by = '', $di switch($statusCode) { case 200: return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\PythonScheduler\ScriptRunsPerUser200Response', $request, $response, ); @@ -1252,7 +1252,7 @@ public function scriptRunsPerTeamWithHttpInfo($month = null, $order_by = '', $di } return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\PythonScheduler\ScriptRunsPerUser200Response', $request, $response, ); @@ -1261,7 +1261,7 @@ public function scriptRunsPerTeamWithHttpInfo($month = null, $order_by = '', $di case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - 'object', + '\SeaTable\Client\PythonScheduler\ScriptRunsPerUser200Response', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1276,9 +1276,9 @@ public function scriptRunsPerTeamWithHttpInfo($month = null, $order_by = '', $di /** * Operation scriptRunsPerTeamAsync * - * Script runs per team + * Script Runs per Team * - * @param string|null $month For which month you'd like to list the statistics in the format of YYYY-MM. If you leave this value empty, (optional) + * @param string|null $month For which month you'd like to list the statistics in the format of YYYYMM. If you leave this value empty, the current month is used. (optional) * @param string|null $order_by Select the parameter to order the results. (optional, default to '') * @param string|null $direction The direction of the sort, ascending `asc` or descending `desc`. asc by default. Direction requires that `order_by` is set. (optional, default to '') * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) @@ -1301,9 +1301,9 @@ function ($response) { /** * Operation scriptRunsPerTeamAsyncWithHttpInfo * - * Script runs per team + * Script Runs per Team * - * @param string|null $month For which month you'd like to list the statistics in the format of YYYY-MM. If you leave this value empty, (optional) + * @param string|null $month For which month you'd like to list the statistics in the format of YYYYMM. If you leave this value empty, the current month is used. (optional) * @param string|null $order_by Select the parameter to order the results. (optional, default to '') * @param string|null $direction The direction of the sort, ascending `asc` or descending `desc`. asc by default. Direction requires that `order_by` is set. (optional, default to '') * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) @@ -1315,7 +1315,7 @@ function ($response) { */ public function scriptRunsPerTeamAsyncWithHttpInfo($month = null, $order_by = '', $direction = '', $page = null, $per_page = null, string $contentType = self::contentTypes['scriptRunsPerTeam'][0]) { - $returnType = 'object'; + $returnType = '\SeaTable\Client\PythonScheduler\ScriptRunsPerUser200Response'; $request = $this->scriptRunsPerTeamRequest($month, $order_by, $direction, $page, $per_page, $contentType); return $this->client @@ -1357,7 +1357,7 @@ function ($exception) { /** * Create request for operation 'scriptRunsPerTeam' * - * @param string|null $month For which month you'd like to list the statistics in the format of YYYY-MM. If you leave this value empty, (optional) + * @param string|null $month For which month you'd like to list the statistics in the format of YYYYMM. If you leave this value empty, the current month is used. (optional) * @param string|null $order_by Select the parameter to order the results. (optional, default to '') * @param string|null $direction The direction of the sort, ascending `asc` or descending `desc`. asc by default. Direction requires that `order_by` is set. (optional, default to '') * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) @@ -1370,8 +1370,8 @@ function ($exception) { public function scriptRunsPerTeamRequest($month = null, $order_by = '', $direction = '', $page = null, $per_page = null, string $contentType = self::contentTypes['scriptRunsPerTeam'][0]) { - if ($month !== null && !preg_match("/^[0-9]{4}-(0[1-9]|1[0-2])/", $month)) { - throw new \InvalidArgumentException("invalid value for \"month\" when calling StatisticsApi.scriptRunsPerTeam, must conform to the pattern /^[0-9]{4}-(0[1-9]|1[0-2])/."); + if ($month !== null && !preg_match("/^[0-9]{4}(0[1-9]|1[0-2])$/", $month)) { + throw new \InvalidArgumentException("invalid value for \"month\" when calling StatisticsApi.scriptRunsPerTeam, must conform to the pattern /^[0-9]{4}(0[1-9]|1[0-2])$/."); } @@ -1501,9 +1501,9 @@ public function scriptRunsPerTeamRequest($month = null, $order_by = '', $directi /** * Operation scriptRunsPerUser * - * Script runs per user + * Script Runs per User * - * @param string|null $month For which month you'd like to list the statistics in the format of YYYY-MM. If you leave this value empty, (optional) + * @param string|null $month For which month you'd like to list the statistics in the format of YYYYMM. If you leave this value empty, the current month is used. (optional) * @param string|null $order_by Select the parameter to order the results. (optional, default to '') * @param string|null $direction The direction of the sort, ascending `asc` or descending `desc`. asc by default. Direction requires that `order_by` is set. (optional, default to '') * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) @@ -1512,7 +1512,7 @@ public function scriptRunsPerTeamRequest($month = null, $order_by = '', $directi * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return object + * @return \SeaTable\Client\PythonScheduler\ScriptRunsPerUser200Response */ public function scriptRunsPerUser($month = null, $order_by = '', $direction = '', $page = null, $per_page = null, string $contentType = self::contentTypes['scriptRunsPerUser'][0]) { @@ -1523,9 +1523,9 @@ public function scriptRunsPerUser($month = null, $order_by = '', $direction = '' /** * Operation scriptRunsPerUserWithHttpInfo * - * Script runs per user + * Script Runs per User * - * @param string|null $month For which month you'd like to list the statistics in the format of YYYY-MM. If you leave this value empty, (optional) + * @param string|null $month For which month you'd like to list the statistics in the format of YYYYMM. If you leave this value empty, the current month is used. (optional) * @param string|null $order_by Select the parameter to order the results. (optional, default to '') * @param string|null $direction The direction of the sort, ascending `asc` or descending `desc`. asc by default. Direction requires that `order_by` is set. (optional, default to '') * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) @@ -1534,7 +1534,7 @@ public function scriptRunsPerUser($month = null, $order_by = '', $direction = '' * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) + * @return array of \SeaTable\Client\PythonScheduler\ScriptRunsPerUser200Response, HTTP status code, HTTP response headers (array of strings) */ public function scriptRunsPerUserWithHttpInfo($month = null, $order_by = '', $direction = '', $page = null, $per_page = null, string $contentType = self::contentTypes['scriptRunsPerUser'][0]) { @@ -1566,7 +1566,7 @@ public function scriptRunsPerUserWithHttpInfo($month = null, $order_by = '', $di switch($statusCode) { case 200: return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\PythonScheduler\ScriptRunsPerUser200Response', $request, $response, ); @@ -1588,7 +1588,7 @@ public function scriptRunsPerUserWithHttpInfo($month = null, $order_by = '', $di } return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\PythonScheduler\ScriptRunsPerUser200Response', $request, $response, ); @@ -1597,7 +1597,7 @@ public function scriptRunsPerUserWithHttpInfo($month = null, $order_by = '', $di case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - 'object', + '\SeaTable\Client\PythonScheduler\ScriptRunsPerUser200Response', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1612,9 +1612,9 @@ public function scriptRunsPerUserWithHttpInfo($month = null, $order_by = '', $di /** * Operation scriptRunsPerUserAsync * - * Script runs per user + * Script Runs per User * - * @param string|null $month For which month you'd like to list the statistics in the format of YYYY-MM. If you leave this value empty, (optional) + * @param string|null $month For which month you'd like to list the statistics in the format of YYYYMM. If you leave this value empty, the current month is used. (optional) * @param string|null $order_by Select the parameter to order the results. (optional, default to '') * @param string|null $direction The direction of the sort, ascending `asc` or descending `desc`. asc by default. Direction requires that `order_by` is set. (optional, default to '') * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) @@ -1637,9 +1637,9 @@ function ($response) { /** * Operation scriptRunsPerUserAsyncWithHttpInfo * - * Script runs per user + * Script Runs per User * - * @param string|null $month For which month you'd like to list the statistics in the format of YYYY-MM. If you leave this value empty, (optional) + * @param string|null $month For which month you'd like to list the statistics in the format of YYYYMM. If you leave this value empty, the current month is used. (optional) * @param string|null $order_by Select the parameter to order the results. (optional, default to '') * @param string|null $direction The direction of the sort, ascending `asc` or descending `desc`. asc by default. Direction requires that `order_by` is set. (optional, default to '') * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) @@ -1651,7 +1651,7 @@ function ($response) { */ public function scriptRunsPerUserAsyncWithHttpInfo($month = null, $order_by = '', $direction = '', $page = null, $per_page = null, string $contentType = self::contentTypes['scriptRunsPerUser'][0]) { - $returnType = 'object'; + $returnType = '\SeaTable\Client\PythonScheduler\ScriptRunsPerUser200Response'; $request = $this->scriptRunsPerUserRequest($month, $order_by, $direction, $page, $per_page, $contentType); return $this->client @@ -1693,7 +1693,7 @@ function ($exception) { /** * Create request for operation 'scriptRunsPerUser' * - * @param string|null $month For which month you'd like to list the statistics in the format of YYYY-MM. If you leave this value empty, (optional) + * @param string|null $month For which month you'd like to list the statistics in the format of YYYYMM. If you leave this value empty, the current month is used. (optional) * @param string|null $order_by Select the parameter to order the results. (optional, default to '') * @param string|null $direction The direction of the sort, ascending `asc` or descending `desc`. asc by default. Direction requires that `order_by` is set. (optional, default to '') * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) @@ -1706,8 +1706,8 @@ function ($exception) { public function scriptRunsPerUserRequest($month = null, $order_by = '', $direction = '', $page = null, $per_page = null, string $contentType = self::contentTypes['scriptRunsPerUser'][0]) { - if ($month !== null && !preg_match("/^[0-9]{4}-(0[1-9]|1[0-2])/", $month)) { - throw new \InvalidArgumentException("invalid value for \"month\" when calling StatisticsApi.scriptRunsPerUser, must conform to the pattern /^[0-9]{4}-(0[1-9]|1[0-2])/."); + if ($month !== null && !preg_match("/^[0-9]{4}(0[1-9]|1[0-2])$/", $month)) { + throw new \InvalidArgumentException("invalid value for \"month\" when calling StatisticsApi.scriptRunsPerUser, must conform to the pattern /^[0-9]{4}(0[1-9]|1[0-2])$/."); } @@ -1850,6 +1850,14 @@ protected function createHttpClientOption() } } + if ($this->config->getCertFile()) { + $options[RequestOptions::CERT] = $this->config->getCertFile(); + } + + if ($this->config->getKeyFile()) { + $options[RequestOptions::SSL_KEY] = $this->config->getKeyFile(); + } + return $options; } diff --git a/lib/SysAdmin/AddDepartment200Response.php b/lib/SysAdmin/AddDepartment200Response.php new file mode 100644 index 00000000..0cebf113 --- /dev/null +++ b/lib/SysAdmin/AddDepartment200Response.php @@ -0,0 +1,578 @@ + + */ +class AddDepartment200Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'addDepartment_200_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'id' => 'int', + 'name' => 'string', + 'owner' => 'string', + 'created_at' => 'string', + 'parent_group_id' => 'int', + 'quota' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'id' => null, + 'name' => null, + 'owner' => null, + 'created_at' => null, + 'parent_group_id' => null, + 'quota' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'id' => false, + 'name' => false, + 'owner' => false, + 'created_at' => false, + 'parent_group_id' => false, + 'quota' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'name' => 'name', + 'owner' => 'owner', + 'created_at' => 'created_at', + 'parent_group_id' => 'parent_group_id', + 'quota' => 'quota' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'name' => 'setName', + 'owner' => 'setOwner', + 'created_at' => 'setCreatedAt', + 'parent_group_id' => 'setParentGroupId', + 'quota' => 'setQuota' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'name' => 'getName', + 'owner' => 'getOwner', + 'created_at' => 'getCreatedAt', + 'parent_group_id' => 'getParentGroupId', + 'quota' => 'getQuota' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('owner', $data ?? [], null); + $this->setIfExists('created_at', $data ?? [], null); + $this->setIfExists('parent_group_id', $data ?? [], null); + $this->setIfExists('quota', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return int|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int|null $id id + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name name + * + * @return self + */ + public function setName($name) + { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets owner + * + * @return string|null + */ + public function getOwner() + { + return $this->container['owner']; + } + + /** + * Sets owner + * + * @param string|null $owner owner + * + * @return self + */ + public function setOwner($owner) + { + if (is_null($owner)) { + throw new \InvalidArgumentException('non-nullable owner cannot be null'); + } + $this->container['owner'] = $owner; + + return $this; + } + + /** + * Gets created_at + * + * @return string|null + */ + public function getCreatedAt() + { + return $this->container['created_at']; + } + + /** + * Sets created_at + * + * @param string|null $created_at created_at + * + * @return self + */ + public function setCreatedAt($created_at) + { + if (is_null($created_at)) { + throw new \InvalidArgumentException('non-nullable created_at cannot be null'); + } + $this->container['created_at'] = $created_at; + + return $this; + } + + /** + * Gets parent_group_id + * + * @return int|null + */ + public function getParentGroupId() + { + return $this->container['parent_group_id']; + } + + /** + * Sets parent_group_id + * + * @param int|null $parent_group_id parent_group_id + * + * @return self + */ + public function setParentGroupId($parent_group_id) + { + if (is_null($parent_group_id)) { + throw new \InvalidArgumentException('non-nullable parent_group_id cannot be null'); + } + $this->container['parent_group_id'] = $parent_group_id; + + return $this; + } + + /** + * Gets quota + * + * @return int|null + */ + public function getQuota() + { + return $this->container['quota']; + } + + /** + * Sets quota + * + * @param int|null $quota quota + * + * @return self + */ + public function setQuota($quota) + { + if (is_null($quota)) { + throw new \InvalidArgumentException('non-nullable quota cannot be null'); + } + $this->container['quota'] = $quota; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/SysAdmin/AddDepartmentRequest.php b/lib/SysAdmin/AddDepartmentRequest.php index 40ddb7c4..5e020b39 100644 --- a/lib/SysAdmin/AddDepartmentRequest.php +++ b/lib/SysAdmin/AddDepartmentRequest.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -351,11 +351,11 @@ public function setParentGroup($parent_group) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -363,12 +363,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -393,11 +393,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/SysAdmin/AddNewUser200Response.php b/lib/SysAdmin/AddNewUser200Response.php new file mode 100644 index 00000000..5e3b7d34 --- /dev/null +++ b/lib/SysAdmin/AddNewUser200Response.php @@ -0,0 +1,714 @@ + + */ +class AddNewUser200Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'addNewUser_200_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'email' => 'string', + 'name' => 'string', + 'contact_email' => 'string', + 'login_id' => 'string', + 'id_in_org' => 'string', + 'is_staff' => 'bool', + 'is_active' => 'bool', + 'create_time' => 'string', + 'role' => 'string', + 'add_user_tip' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'email' => null, + 'name' => null, + 'contact_email' => null, + 'login_id' => null, + 'id_in_org' => null, + 'is_staff' => null, + 'is_active' => null, + 'create_time' => null, + 'role' => null, + 'add_user_tip' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'email' => false, + 'name' => false, + 'contact_email' => false, + 'login_id' => false, + 'id_in_org' => false, + 'is_staff' => false, + 'is_active' => false, + 'create_time' => false, + 'role' => false, + 'add_user_tip' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'email' => 'email', + 'name' => 'name', + 'contact_email' => 'contact_email', + 'login_id' => 'login_id', + 'id_in_org' => 'id_in_org', + 'is_staff' => 'is_staff', + 'is_active' => 'is_active', + 'create_time' => 'create_time', + 'role' => 'role', + 'add_user_tip' => 'add_user_tip' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'email' => 'setEmail', + 'name' => 'setName', + 'contact_email' => 'setContactEmail', + 'login_id' => 'setLoginId', + 'id_in_org' => 'setIdInOrg', + 'is_staff' => 'setIsStaff', + 'is_active' => 'setIsActive', + 'create_time' => 'setCreateTime', + 'role' => 'setRole', + 'add_user_tip' => 'setAddUserTip' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'email' => 'getEmail', + 'name' => 'getName', + 'contact_email' => 'getContactEmail', + 'login_id' => 'getLoginId', + 'id_in_org' => 'getIdInOrg', + 'is_staff' => 'getIsStaff', + 'is_active' => 'getIsActive', + 'create_time' => 'getCreateTime', + 'role' => 'getRole', + 'add_user_tip' => 'getAddUserTip' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('email', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('contact_email', $data ?? [], null); + $this->setIfExists('login_id', $data ?? [], null); + $this->setIfExists('id_in_org', $data ?? [], null); + $this->setIfExists('is_staff', $data ?? [], null); + $this->setIfExists('is_active', $data ?? [], null); + $this->setIfExists('create_time', $data ?? [], null); + $this->setIfExists('role', $data ?? [], null); + $this->setIfExists('add_user_tip', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets email + * + * @return string|null + */ + public function getEmail() + { + return $this->container['email']; + } + + /** + * Sets email + * + * @param string|null $email email + * + * @return self + */ + public function setEmail($email) + { + if (is_null($email)) { + throw new \InvalidArgumentException('non-nullable email cannot be null'); + } + $this->container['email'] = $email; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name name + * + * @return self + */ + public function setName($name) + { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets contact_email + * + * @return string|null + */ + public function getContactEmail() + { + return $this->container['contact_email']; + } + + /** + * Sets contact_email + * + * @param string|null $contact_email contact_email + * + * @return self + */ + public function setContactEmail($contact_email) + { + if (is_null($contact_email)) { + throw new \InvalidArgumentException('non-nullable contact_email cannot be null'); + } + $this->container['contact_email'] = $contact_email; + + return $this; + } + + /** + * Gets login_id + * + * @return string|null + */ + public function getLoginId() + { + return $this->container['login_id']; + } + + /** + * Sets login_id + * + * @param string|null $login_id login_id + * + * @return self + */ + public function setLoginId($login_id) + { + if (is_null($login_id)) { + throw new \InvalidArgumentException('non-nullable login_id cannot be null'); + } + $this->container['login_id'] = $login_id; + + return $this; + } + + /** + * Gets id_in_org + * + * @return string|null + */ + public function getIdInOrg() + { + return $this->container['id_in_org']; + } + + /** + * Sets id_in_org + * + * @param string|null $id_in_org id_in_org + * + * @return self + */ + public function setIdInOrg($id_in_org) + { + if (is_null($id_in_org)) { + throw new \InvalidArgumentException('non-nullable id_in_org cannot be null'); + } + $this->container['id_in_org'] = $id_in_org; + + return $this; + } + + /** + * Gets is_staff + * + * @return bool|null + */ + public function getIsStaff() + { + return $this->container['is_staff']; + } + + /** + * Sets is_staff + * + * @param bool|null $is_staff is_staff + * + * @return self + */ + public function setIsStaff($is_staff) + { + if (is_null($is_staff)) { + throw new \InvalidArgumentException('non-nullable is_staff cannot be null'); + } + $this->container['is_staff'] = $is_staff; + + return $this; + } + + /** + * Gets is_active + * + * @return bool|null + */ + public function getIsActive() + { + return $this->container['is_active']; + } + + /** + * Sets is_active + * + * @param bool|null $is_active is_active + * + * @return self + */ + public function setIsActive($is_active) + { + if (is_null($is_active)) { + throw new \InvalidArgumentException('non-nullable is_active cannot be null'); + } + $this->container['is_active'] = $is_active; + + return $this; + } + + /** + * Gets create_time + * + * @return string|null + */ + public function getCreateTime() + { + return $this->container['create_time']; + } + + /** + * Sets create_time + * + * @param string|null $create_time create_time + * + * @return self + */ + public function setCreateTime($create_time) + { + if (is_null($create_time)) { + throw new \InvalidArgumentException('non-nullable create_time cannot be null'); + } + $this->container['create_time'] = $create_time; + + return $this; + } + + /** + * Gets role + * + * @return string|null + */ + public function getRole() + { + return $this->container['role']; + } + + /** + * Sets role + * + * @param string|null $role role + * + * @return self + */ + public function setRole($role) + { + if (is_null($role)) { + throw new \InvalidArgumentException('non-nullable role cannot be null'); + } + $this->container['role'] = $role; + + return $this; + } + + /** + * Gets add_user_tip + * + * @return string|null + */ + public function getAddUserTip() + { + return $this->container['add_user_tip']; + } + + /** + * Sets add_user_tip + * + * @param string|null $add_user_tip add_user_tip + * + * @return self + */ + public function setAddUserTip($add_user_tip) + { + if (is_null($add_user_tip)) { + throw new \InvalidArgumentException('non-nullable add_user_tip cannot be null'); + } + $this->container['add_user_tip'] = $add_user_tip; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/SysAdmin/AddNewUserRequest.php b/lib/SysAdmin/AddNewUserRequest.php index 0d278b1b..684d4954 100644 --- a/lib/SysAdmin/AddNewUserRequest.php +++ b/lib/SysAdmin/AddNewUserRequest.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -301,6 +301,12 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['email'] === null) { + $invalidProperties[] = "'email' can't be null"; + } + if ($this->container['password'] === null) { + $invalidProperties[] = "'password' can't be null"; + } return $invalidProperties; } @@ -319,7 +325,7 @@ public function valid() /** * Gets email * - * @return string|null + * @return string */ public function getEmail() { @@ -329,7 +335,7 @@ public function getEmail() /** * Sets email * - * @param string|null $email Login email of the user. + * @param string $email Login email of the user. * * @return self */ @@ -346,7 +352,7 @@ public function setEmail($email) /** * Gets password * - * @return string|null + * @return string */ public function getPassword() { @@ -356,7 +362,7 @@ public function getPassword() /** * Sets password * - * @param string|null $password Login password of the user. + * @param string $password Login password of the user. * * @return self */ @@ -453,11 +459,11 @@ public function setIsActive($is_active) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -465,12 +471,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -495,11 +501,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/SysAdmin/AddNotificationToUserRequest.php b/lib/SysAdmin/AddNotificationToUserRequest.php index 507ea2de..dda3aede 100644 --- a/lib/SysAdmin/AddNotificationToUserRequest.php +++ b/lib/SysAdmin/AddNotificationToUserRequest.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -280,6 +280,12 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['msg'] === null) { + $invalidProperties[] = "'msg' can't be null"; + } + if ($this->container['username'] === null) { + $invalidProperties[] = "'username' can't be null"; + } return $invalidProperties; } @@ -298,7 +304,7 @@ public function valid() /** * Gets msg * - * @return string|null + * @return string */ public function getMsg() { @@ -308,7 +314,7 @@ public function getMsg() /** * Sets msg * - * @param string|null $msg msg + * @param string $msg msg * * @return self */ @@ -325,7 +331,7 @@ public function setMsg($msg) /** * Gets username * - * @return string|null + * @return string */ public function getUsername() { @@ -335,7 +341,7 @@ public function getUsername() /** * Sets username * - * @param string|null $username username + * @param string $username username * * @return self */ @@ -351,11 +357,11 @@ public function setUsername($username) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -363,12 +369,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -393,11 +399,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/SysAdmin/AddPlugin200Response.php b/lib/SysAdmin/AddPlugin200Response.php new file mode 100644 index 00000000..ef41eb0a --- /dev/null +++ b/lib/SysAdmin/AddPlugin200Response.php @@ -0,0 +1,544 @@ + + */ +class AddPlugin200Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'addPlugin_200_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'id' => 'int', + 'plugin_name' => 'string', + 'info' => 'object', + 'added_by' => 'string', + 'added_time' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'id' => null, + 'plugin_name' => null, + 'info' => null, + 'added_by' => null, + 'added_time' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'id' => false, + 'plugin_name' => false, + 'info' => false, + 'added_by' => false, + 'added_time' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'plugin_name' => 'plugin_name', + 'info' => 'info', + 'added_by' => 'added_by', + 'added_time' => 'added_time' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'plugin_name' => 'setPluginName', + 'info' => 'setInfo', + 'added_by' => 'setAddedBy', + 'added_time' => 'setAddedTime' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'plugin_name' => 'getPluginName', + 'info' => 'getInfo', + 'added_by' => 'getAddedBy', + 'added_time' => 'getAddedTime' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('plugin_name', $data ?? [], null); + $this->setIfExists('info', $data ?? [], null); + $this->setIfExists('added_by', $data ?? [], null); + $this->setIfExists('added_time', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return int|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int|null $id id + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets plugin_name + * + * @return string|null + */ + public function getPluginName() + { + return $this->container['plugin_name']; + } + + /** + * Sets plugin_name + * + * @param string|null $plugin_name plugin_name + * + * @return self + */ + public function setPluginName($plugin_name) + { + if (is_null($plugin_name)) { + throw new \InvalidArgumentException('non-nullable plugin_name cannot be null'); + } + $this->container['plugin_name'] = $plugin_name; + + return $this; + } + + /** + * Gets info + * + * @return object|null + */ + public function getInfo() + { + return $this->container['info']; + } + + /** + * Sets info + * + * @param object|null $info info + * + * @return self + */ + public function setInfo($info) + { + if (is_null($info)) { + throw new \InvalidArgumentException('non-nullable info cannot be null'); + } + $this->container['info'] = $info; + + return $this; + } + + /** + * Gets added_by + * + * @return string|null + */ + public function getAddedBy() + { + return $this->container['added_by']; + } + + /** + * Sets added_by + * + * @param string|null $added_by added_by + * + * @return self + */ + public function setAddedBy($added_by) + { + if (is_null($added_by)) { + throw new \InvalidArgumentException('non-nullable added_by cannot be null'); + } + $this->container['added_by'] = $added_by; + + return $this; + } + + /** + * Gets added_time + * + * @return string|null + */ + public function getAddedTime() + { + return $this->container['added_time']; + } + + /** + * Sets added_time + * + * @param string|null $added_time added_time + * + * @return self + */ + public function setAddedTime($added_time) + { + if (is_null($added_time)) { + throw new \InvalidArgumentException('non-nullable added_time cannot be null'); + } + $this->container['added_time'] = $added_time; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/SysAdmin/AddTeam200Response.php b/lib/SysAdmin/AddTeam200Response.php new file mode 100644 index 00000000..c6bec9a1 --- /dev/null +++ b/lib/SysAdmin/AddTeam200Response.php @@ -0,0 +1,850 @@ + + */ +class AddTeam200Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'addTeam_200_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'org_id' => 'int', + 'org_name' => 'string', + 'ctime' => 'string', + 'org_url_prefix' => 'string', + 'role' => 'string', + 'creator_email' => 'string', + 'creator_name' => 'string', + 'creator_contact_email' => 'string', + 'quota' => 'int', + 'storage_usage' => 'int', + 'storage_quota' => 'int', + 'max_user_number' => 'int', + 'rows_count' => 'int', + 'row_limit' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'org_id' => null, + 'org_name' => null, + 'ctime' => null, + 'org_url_prefix' => null, + 'role' => null, + 'creator_email' => null, + 'creator_name' => null, + 'creator_contact_email' => null, + 'quota' => null, + 'storage_usage' => null, + 'storage_quota' => null, + 'max_user_number' => null, + 'rows_count' => null, + 'row_limit' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'org_id' => false, + 'org_name' => false, + 'ctime' => false, + 'org_url_prefix' => false, + 'role' => false, + 'creator_email' => false, + 'creator_name' => false, + 'creator_contact_email' => false, + 'quota' => false, + 'storage_usage' => false, + 'storage_quota' => false, + 'max_user_number' => false, + 'rows_count' => false, + 'row_limit' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'org_id' => 'org_id', + 'org_name' => 'org_name', + 'ctime' => 'ctime', + 'org_url_prefix' => 'org_url_prefix', + 'role' => 'role', + 'creator_email' => 'creator_email', + 'creator_name' => 'creator_name', + 'creator_contact_email' => 'creator_contact_email', + 'quota' => 'quota', + 'storage_usage' => 'storage_usage', + 'storage_quota' => 'storage_quota', + 'max_user_number' => 'max_user_number', + 'rows_count' => 'rows_count', + 'row_limit' => 'row_limit' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'org_id' => 'setOrgId', + 'org_name' => 'setOrgName', + 'ctime' => 'setCtime', + 'org_url_prefix' => 'setOrgUrlPrefix', + 'role' => 'setRole', + 'creator_email' => 'setCreatorEmail', + 'creator_name' => 'setCreatorName', + 'creator_contact_email' => 'setCreatorContactEmail', + 'quota' => 'setQuota', + 'storage_usage' => 'setStorageUsage', + 'storage_quota' => 'setStorageQuota', + 'max_user_number' => 'setMaxUserNumber', + 'rows_count' => 'setRowsCount', + 'row_limit' => 'setRowLimit' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'org_id' => 'getOrgId', + 'org_name' => 'getOrgName', + 'ctime' => 'getCtime', + 'org_url_prefix' => 'getOrgUrlPrefix', + 'role' => 'getRole', + 'creator_email' => 'getCreatorEmail', + 'creator_name' => 'getCreatorName', + 'creator_contact_email' => 'getCreatorContactEmail', + 'quota' => 'getQuota', + 'storage_usage' => 'getStorageUsage', + 'storage_quota' => 'getStorageQuota', + 'max_user_number' => 'getMaxUserNumber', + 'rows_count' => 'getRowsCount', + 'row_limit' => 'getRowLimit' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('org_id', $data ?? [], null); + $this->setIfExists('org_name', $data ?? [], null); + $this->setIfExists('ctime', $data ?? [], null); + $this->setIfExists('org_url_prefix', $data ?? [], null); + $this->setIfExists('role', $data ?? [], null); + $this->setIfExists('creator_email', $data ?? [], null); + $this->setIfExists('creator_name', $data ?? [], null); + $this->setIfExists('creator_contact_email', $data ?? [], null); + $this->setIfExists('quota', $data ?? [], null); + $this->setIfExists('storage_usage', $data ?? [], null); + $this->setIfExists('storage_quota', $data ?? [], null); + $this->setIfExists('max_user_number', $data ?? [], null); + $this->setIfExists('rows_count', $data ?? [], null); + $this->setIfExists('row_limit', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets org_id + * + * @return int|null + */ + public function getOrgId() + { + return $this->container['org_id']; + } + + /** + * Sets org_id + * + * @param int|null $org_id org_id + * + * @return self + */ + public function setOrgId($org_id) + { + if (is_null($org_id)) { + throw new \InvalidArgumentException('non-nullable org_id cannot be null'); + } + $this->container['org_id'] = $org_id; + + return $this; + } + + /** + * Gets org_name + * + * @return string|null + */ + public function getOrgName() + { + return $this->container['org_name']; + } + + /** + * Sets org_name + * + * @param string|null $org_name org_name + * + * @return self + */ + public function setOrgName($org_name) + { + if (is_null($org_name)) { + throw new \InvalidArgumentException('non-nullable org_name cannot be null'); + } + $this->container['org_name'] = $org_name; + + return $this; + } + + /** + * Gets ctime + * + * @return string|null + */ + public function getCtime() + { + return $this->container['ctime']; + } + + /** + * Sets ctime + * + * @param string|null $ctime ctime + * + * @return self + */ + public function setCtime($ctime) + { + if (is_null($ctime)) { + throw new \InvalidArgumentException('non-nullable ctime cannot be null'); + } + $this->container['ctime'] = $ctime; + + return $this; + } + + /** + * Gets org_url_prefix + * + * @return string|null + */ + public function getOrgUrlPrefix() + { + return $this->container['org_url_prefix']; + } + + /** + * Sets org_url_prefix + * + * @param string|null $org_url_prefix org_url_prefix + * + * @return self + */ + public function setOrgUrlPrefix($org_url_prefix) + { + if (is_null($org_url_prefix)) { + throw new \InvalidArgumentException('non-nullable org_url_prefix cannot be null'); + } + $this->container['org_url_prefix'] = $org_url_prefix; + + return $this; + } + + /** + * Gets role + * + * @return string|null + */ + public function getRole() + { + return $this->container['role']; + } + + /** + * Sets role + * + * @param string|null $role role + * + * @return self + */ + public function setRole($role) + { + if (is_null($role)) { + throw new \InvalidArgumentException('non-nullable role cannot be null'); + } + $this->container['role'] = $role; + + return $this; + } + + /** + * Gets creator_email + * + * @return string|null + */ + public function getCreatorEmail() + { + return $this->container['creator_email']; + } + + /** + * Sets creator_email + * + * @param string|null $creator_email creator_email + * + * @return self + */ + public function setCreatorEmail($creator_email) + { + if (is_null($creator_email)) { + throw new \InvalidArgumentException('non-nullable creator_email cannot be null'); + } + $this->container['creator_email'] = $creator_email; + + return $this; + } + + /** + * Gets creator_name + * + * @return string|null + */ + public function getCreatorName() + { + return $this->container['creator_name']; + } + + /** + * Sets creator_name + * + * @param string|null $creator_name creator_name + * + * @return self + */ + public function setCreatorName($creator_name) + { + if (is_null($creator_name)) { + throw new \InvalidArgumentException('non-nullable creator_name cannot be null'); + } + $this->container['creator_name'] = $creator_name; + + return $this; + } + + /** + * Gets creator_contact_email + * + * @return string|null + */ + public function getCreatorContactEmail() + { + return $this->container['creator_contact_email']; + } + + /** + * Sets creator_contact_email + * + * @param string|null $creator_contact_email creator_contact_email + * + * @return self + */ + public function setCreatorContactEmail($creator_contact_email) + { + if (is_null($creator_contact_email)) { + throw new \InvalidArgumentException('non-nullable creator_contact_email cannot be null'); + } + $this->container['creator_contact_email'] = $creator_contact_email; + + return $this; + } + + /** + * Gets quota + * + * @return int|null + */ + public function getQuota() + { + return $this->container['quota']; + } + + /** + * Sets quota + * + * @param int|null $quota quota + * + * @return self + */ + public function setQuota($quota) + { + if (is_null($quota)) { + throw new \InvalidArgumentException('non-nullable quota cannot be null'); + } + $this->container['quota'] = $quota; + + return $this; + } + + /** + * Gets storage_usage + * + * @return int|null + */ + public function getStorageUsage() + { + return $this->container['storage_usage']; + } + + /** + * Sets storage_usage + * + * @param int|null $storage_usage storage_usage + * + * @return self + */ + public function setStorageUsage($storage_usage) + { + if (is_null($storage_usage)) { + throw new \InvalidArgumentException('non-nullable storage_usage cannot be null'); + } + $this->container['storage_usage'] = $storage_usage; + + return $this; + } + + /** + * Gets storage_quota + * + * @return int|null + */ + public function getStorageQuota() + { + return $this->container['storage_quota']; + } + + /** + * Sets storage_quota + * + * @param int|null $storage_quota storage_quota + * + * @return self + */ + public function setStorageQuota($storage_quota) + { + if (is_null($storage_quota)) { + throw new \InvalidArgumentException('non-nullable storage_quota cannot be null'); + } + $this->container['storage_quota'] = $storage_quota; + + return $this; + } + + /** + * Gets max_user_number + * + * @return int|null + */ + public function getMaxUserNumber() + { + return $this->container['max_user_number']; + } + + /** + * Sets max_user_number + * + * @param int|null $max_user_number max_user_number + * + * @return self + */ + public function setMaxUserNumber($max_user_number) + { + if (is_null($max_user_number)) { + throw new \InvalidArgumentException('non-nullable max_user_number cannot be null'); + } + $this->container['max_user_number'] = $max_user_number; + + return $this; + } + + /** + * Gets rows_count + * + * @return int|null + */ + public function getRowsCount() + { + return $this->container['rows_count']; + } + + /** + * Sets rows_count + * + * @param int|null $rows_count rows_count + * + * @return self + */ + public function setRowsCount($rows_count) + { + if (is_null($rows_count)) { + throw new \InvalidArgumentException('non-nullable rows_count cannot be null'); + } + $this->container['rows_count'] = $rows_count; + + return $this; + } + + /** + * Gets row_limit + * + * @return int|null + */ + public function getRowLimit() + { + return $this->container['row_limit']; + } + + /** + * Sets row_limit + * + * @param int|null $row_limit row_limit + * + * @return self + */ + public function setRowLimit($row_limit) + { + if (is_null($row_limit)) { + throw new \InvalidArgumentException('non-nullable row_limit cannot be null'); + } + $this->container['row_limit'] = $row_limit; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/SysAdmin/AddTeamRequest.php b/lib/SysAdmin/AddTeamRequest.php index ef10282b..5e37fa4e 100644 --- a/lib/SysAdmin/AddTeamRequest.php +++ b/lib/SysAdmin/AddTeamRequest.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -462,11 +462,11 @@ public function setWithWorkspace($with_workspace) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -474,12 +474,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -504,11 +504,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/SysAdmin/AddTeamUser200Response.php b/lib/SysAdmin/AddTeamUser200Response.php new file mode 100644 index 00000000..afe52ccd --- /dev/null +++ b/lib/SysAdmin/AddTeamUser200Response.php @@ -0,0 +1,748 @@ + + */ +class AddTeamUser200Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'addTeamUser_200_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'org_id' => 'int', + 'workspace_id' => 'int', + 'email' => 'string', + 'name' => 'string', + 'contact_email' => 'string', + 'is_org_admin' => 'bool', + 'quota_total' => 'int', + 'quota_usage' => 'int', + 'create_time' => 'string', + 'last_login' => 'string', + 'active' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'org_id' => null, + 'workspace_id' => null, + 'email' => null, + 'name' => null, + 'contact_email' => null, + 'is_org_admin' => null, + 'quota_total' => null, + 'quota_usage' => null, + 'create_time' => null, + 'last_login' => null, + 'active' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'org_id' => false, + 'workspace_id' => false, + 'email' => false, + 'name' => false, + 'contact_email' => false, + 'is_org_admin' => false, + 'quota_total' => false, + 'quota_usage' => false, + 'create_time' => false, + 'last_login' => false, + 'active' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'org_id' => 'org_id', + 'workspace_id' => 'workspace_id', + 'email' => 'email', + 'name' => 'name', + 'contact_email' => 'contact_email', + 'is_org_admin' => 'is_org_admin', + 'quota_total' => 'quota_total', + 'quota_usage' => 'quota_usage', + 'create_time' => 'create_time', + 'last_login' => 'last_login', + 'active' => 'active' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'org_id' => 'setOrgId', + 'workspace_id' => 'setWorkspaceId', + 'email' => 'setEmail', + 'name' => 'setName', + 'contact_email' => 'setContactEmail', + 'is_org_admin' => 'setIsOrgAdmin', + 'quota_total' => 'setQuotaTotal', + 'quota_usage' => 'setQuotaUsage', + 'create_time' => 'setCreateTime', + 'last_login' => 'setLastLogin', + 'active' => 'setActive' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'org_id' => 'getOrgId', + 'workspace_id' => 'getWorkspaceId', + 'email' => 'getEmail', + 'name' => 'getName', + 'contact_email' => 'getContactEmail', + 'is_org_admin' => 'getIsOrgAdmin', + 'quota_total' => 'getQuotaTotal', + 'quota_usage' => 'getQuotaUsage', + 'create_time' => 'getCreateTime', + 'last_login' => 'getLastLogin', + 'active' => 'getActive' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('org_id', $data ?? [], null); + $this->setIfExists('workspace_id', $data ?? [], null); + $this->setIfExists('email', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('contact_email', $data ?? [], null); + $this->setIfExists('is_org_admin', $data ?? [], null); + $this->setIfExists('quota_total', $data ?? [], null); + $this->setIfExists('quota_usage', $data ?? [], null); + $this->setIfExists('create_time', $data ?? [], null); + $this->setIfExists('last_login', $data ?? [], null); + $this->setIfExists('active', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets org_id + * + * @return int|null + */ + public function getOrgId() + { + return $this->container['org_id']; + } + + /** + * Sets org_id + * + * @param int|null $org_id org_id + * + * @return self + */ + public function setOrgId($org_id) + { + if (is_null($org_id)) { + throw new \InvalidArgumentException('non-nullable org_id cannot be null'); + } + $this->container['org_id'] = $org_id; + + return $this; + } + + /** + * Gets workspace_id + * + * @return int|null + */ + public function getWorkspaceId() + { + return $this->container['workspace_id']; + } + + /** + * Sets workspace_id + * + * @param int|null $workspace_id workspace_id + * + * @return self + */ + public function setWorkspaceId($workspace_id) + { + if (is_null($workspace_id)) { + throw new \InvalidArgumentException('non-nullable workspace_id cannot be null'); + } + $this->container['workspace_id'] = $workspace_id; + + return $this; + } + + /** + * Gets email + * + * @return string|null + */ + public function getEmail() + { + return $this->container['email']; + } + + /** + * Sets email + * + * @param string|null $email email + * + * @return self + */ + public function setEmail($email) + { + if (is_null($email)) { + throw new \InvalidArgumentException('non-nullable email cannot be null'); + } + $this->container['email'] = $email; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name name + * + * @return self + */ + public function setName($name) + { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets contact_email + * + * @return string|null + */ + public function getContactEmail() + { + return $this->container['contact_email']; + } + + /** + * Sets contact_email + * + * @param string|null $contact_email contact_email + * + * @return self + */ + public function setContactEmail($contact_email) + { + if (is_null($contact_email)) { + throw new \InvalidArgumentException('non-nullable contact_email cannot be null'); + } + $this->container['contact_email'] = $contact_email; + + return $this; + } + + /** + * Gets is_org_admin + * + * @return bool|null + */ + public function getIsOrgAdmin() + { + return $this->container['is_org_admin']; + } + + /** + * Sets is_org_admin + * + * @param bool|null $is_org_admin is_org_admin + * + * @return self + */ + public function setIsOrgAdmin($is_org_admin) + { + if (is_null($is_org_admin)) { + throw new \InvalidArgumentException('non-nullable is_org_admin cannot be null'); + } + $this->container['is_org_admin'] = $is_org_admin; + + return $this; + } + + /** + * Gets quota_total + * + * @return int|null + */ + public function getQuotaTotal() + { + return $this->container['quota_total']; + } + + /** + * Sets quota_total + * + * @param int|null $quota_total quota_total + * + * @return self + */ + public function setQuotaTotal($quota_total) + { + if (is_null($quota_total)) { + throw new \InvalidArgumentException('non-nullable quota_total cannot be null'); + } + $this->container['quota_total'] = $quota_total; + + return $this; + } + + /** + * Gets quota_usage + * + * @return int|null + */ + public function getQuotaUsage() + { + return $this->container['quota_usage']; + } + + /** + * Sets quota_usage + * + * @param int|null $quota_usage quota_usage + * + * @return self + */ + public function setQuotaUsage($quota_usage) + { + if (is_null($quota_usage)) { + throw new \InvalidArgumentException('non-nullable quota_usage cannot be null'); + } + $this->container['quota_usage'] = $quota_usage; + + return $this; + } + + /** + * Gets create_time + * + * @return string|null + */ + public function getCreateTime() + { + return $this->container['create_time']; + } + + /** + * Sets create_time + * + * @param string|null $create_time create_time + * + * @return self + */ + public function setCreateTime($create_time) + { + if (is_null($create_time)) { + throw new \InvalidArgumentException('non-nullable create_time cannot be null'); + } + $this->container['create_time'] = $create_time; + + return $this; + } + + /** + * Gets last_login + * + * @return string|null + */ + public function getLastLogin() + { + return $this->container['last_login']; + } + + /** + * Sets last_login + * + * @param string|null $last_login last_login + * + * @return self + */ + public function setLastLogin($last_login) + { + if (is_null($last_login)) { + throw new \InvalidArgumentException('non-nullable last_login cannot be null'); + } + $this->container['last_login'] = $last_login; + + return $this; + } + + /** + * Gets active + * + * @return bool|null + */ + public function getActive() + { + return $this->container['active']; + } + + /** + * Sets active + * + * @param bool|null $active active + * + * @return self + */ + public function setActive($active) + { + if (is_null($active)) { + throw new \InvalidArgumentException('non-nullable active cannot be null'); + } + $this->container['active'] = $active; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/SysAdmin/AutomationsApi.php b/lib/SysAdmin/AutomationsApi.php index 71ffeca3..5d2fad7d 100644 --- a/lib/SysAdmin/AutomationsApi.php +++ b/lib/SysAdmin/AutomationsApi.php @@ -14,7 +14,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -138,7 +138,7 @@ public function getConfig() * * Delete Automation * - * @param int $automation_rule_id automation_rule_id (required) + * @param int $automation_rule_id The ID of the automation rule. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteAutomation'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -156,7 +156,7 @@ public function deleteAutomation($automation_rule_id, string $contentType = self * * Delete Automation * - * @param int $automation_rule_id (required) + * @param int $automation_rule_id The ID of the automation rule. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteAutomation'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -241,7 +241,7 @@ public function deleteAutomationWithHttpInfo($automation_rule_id, string $conten * * Delete Automation * - * @param int $automation_rule_id (required) + * @param int $automation_rule_id The ID of the automation rule. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteAutomation'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -262,7 +262,7 @@ function ($response) { * * Delete Automation * - * @param int $automation_rule_id (required) + * @param int $automation_rule_id The ID of the automation rule. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteAutomation'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -312,7 +312,7 @@ function ($exception) { /** * Create request for operation 'deleteAutomation' * - * @param int $automation_rule_id (required) + * @param int $automation_rule_id The ID of the automation rule. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteAutomation'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1252,6 +1252,14 @@ protected function createHttpClientOption() } } + if ($this->config->getCertFile()) { + $options[RequestOptions::CERT] = $this->config->getCertFile(); + } + + if ($this->config->getKeyFile()) { + $options[RequestOptions::SSL_KEY] = $this->config->getKeyFile(); + } + return $options; } diff --git a/lib/SysAdmin/BasesApi.php b/lib/SysAdmin/BasesApi.php index 10d5ff07..be356e98 100644 --- a/lib/SysAdmin/BasesApi.php +++ b/lib/SysAdmin/BasesApi.php @@ -14,7 +14,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -2227,6 +2227,14 @@ protected function createHttpClientOption() } } + if ($this->config->getCertFile()) { + $options[RequestOptions::CERT] = $this->config->getCertFile(); + } + + if ($this->config->getKeyFile()) { + $options[RequestOptions::SSL_KEY] = $this->config->getKeyFile(); + } + return $options; } diff --git a/lib/SysAdmin/CommonDatasetApi.php b/lib/SysAdmin/CommonDatasetApi.php index f78d0cf9..305e307b 100644 --- a/lib/SysAdmin/CommonDatasetApi.php +++ b/lib/SysAdmin/CommonDatasetApi.php @@ -14,7 +14,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -1242,7 +1242,7 @@ public function listCommonDatasetSyncsRequest($page = null, $per_page = null, st /** * Operation listInvalidSyncs * - * List invalid Syncs + * List Invalid Syncs * * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) @@ -1261,7 +1261,7 @@ public function listInvalidSyncs($page = null, $per_page = null, string $content /** * Operation listInvalidSyncsWithHttpInfo * - * List invalid Syncs + * List Invalid Syncs * * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) @@ -1347,7 +1347,7 @@ public function listInvalidSyncsWithHttpInfo($page = null, $per_page = null, str /** * Operation listInvalidSyncsAsync * - * List invalid Syncs + * List Invalid Syncs * * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) @@ -1369,7 +1369,7 @@ function ($response) { /** * Operation listInvalidSyncsAsyncWithHttpInfo * - * List invalid Syncs + * List Invalid Syncs * * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) @@ -1543,6 +1543,14 @@ protected function createHttpClientOption() } } + if ($this->config->getCertFile()) { + $options[RequestOptions::CERT] = $this->config->getCertFile(); + } + + if ($this->config->getKeyFile()) { + $options[RequestOptions::SSL_KEY] = $this->config->getKeyFile(); + } + return $options; } diff --git a/lib/SysAdmin/CreateGroupRequest.php b/lib/SysAdmin/CreateGroupRequest.php index d2ccb2dc..ac31968c 100644 --- a/lib/SysAdmin/CreateGroupRequest.php +++ b/lib/SysAdmin/CreateGroupRequest.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -280,6 +280,12 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['group_name'] === null) { + $invalidProperties[] = "'group_name' can't be null"; + } + if ($this->container['group_owner'] === null) { + $invalidProperties[] = "'group_owner' can't be null"; + } return $invalidProperties; } @@ -298,7 +304,7 @@ public function valid() /** * Gets group_name * - * @return string|null + * @return string */ public function getGroupName() { @@ -308,7 +314,7 @@ public function getGroupName() /** * Sets group_name * - * @param string|null $group_name The name of the new department. + * @param string $group_name The name of the new department. * * @return self */ @@ -325,7 +331,7 @@ public function setGroupName($group_name) /** * Gets group_owner * - * @return string|null + * @return string */ public function getGroupOwner() { @@ -335,7 +341,7 @@ public function getGroupOwner() /** * Sets group_owner * - * @param string|null $group_owner group_owner + * @param string $group_owner group_owner * * @return self */ @@ -351,11 +357,11 @@ public function setGroupOwner($group_owner) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -363,12 +369,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -393,11 +399,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/SysAdmin/DepartmentsApi.php b/lib/SysAdmin/DepartmentsApi.php index 0081a601..e30b3ba8 100644 --- a/lib/SysAdmin/DepartmentsApi.php +++ b/lib/SysAdmin/DepartmentsApi.php @@ -14,7 +14,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -143,7 +143,7 @@ public function getConfig() * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return object + * @return \SeaTable\Client\SysAdmin\AddDepartment200Response */ public function addDepartment($add_department_request = null, string $contentType = self::contentTypes['addDepartment'][0]) { @@ -161,7 +161,7 @@ public function addDepartment($add_department_request = null, string $contentTyp * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) + * @return array of \SeaTable\Client\SysAdmin\AddDepartment200Response, HTTP status code, HTTP response headers (array of strings) */ public function addDepartmentWithHttpInfo($add_department_request = null, string $contentType = self::contentTypes['addDepartment'][0]) { @@ -193,7 +193,7 @@ public function addDepartmentWithHttpInfo($add_department_request = null, string switch($statusCode) { case 200: return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\SysAdmin\AddDepartment200Response', $request, $response, ); @@ -215,7 +215,7 @@ public function addDepartmentWithHttpInfo($add_department_request = null, string } return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\SysAdmin\AddDepartment200Response', $request, $response, ); @@ -224,7 +224,7 @@ public function addDepartmentWithHttpInfo($add_department_request = null, string case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - 'object', + '\SeaTable\Client\SysAdmin\AddDepartment200Response', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -270,7 +270,7 @@ function ($response) { */ public function addDepartmentAsyncWithHttpInfo($add_department_request = null, string $contentType = self::contentTypes['addDepartment'][0]) { - $returnType = 'object'; + $returnType = '\SeaTable\Client\SysAdmin\AddDepartment200Response'; $request = $this->addDepartmentRequest($add_department_request, $contentType); return $this->client @@ -403,7 +403,7 @@ public function addDepartmentRequest($add_department_request = null, string $con * * Delete Department * - * @param int $department_id department_id (required) + * @param int $department_id The ID of the department. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteDepartment'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -421,7 +421,7 @@ public function deleteDepartment($department_id, string $contentType = self::con * * Delete Department * - * @param int $department_id (required) + * @param int $department_id The ID of the department. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteDepartment'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -506,7 +506,7 @@ public function deleteDepartmentWithHttpInfo($department_id, string $contentType * * Delete Department * - * @param int $department_id (required) + * @param int $department_id The ID of the department. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteDepartment'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -527,7 +527,7 @@ function ($response) { * * Delete Department * - * @param int $department_id (required) + * @param int $department_id The ID of the department. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteDepartment'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -577,7 +577,7 @@ function ($exception) { /** * Create request for operation 'deleteDepartment' * - * @param int $department_id (required) + * @param int $department_id The ID of the department. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteDepartment'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -678,13 +678,13 @@ public function deleteDepartmentRequest($department_id, string $contentType = se * * Get Department * - * @param int $department_id department_id (required) - * @param bool|null $return_ancestors return_ancestors (optional) + * @param int $department_id The ID of the department. (required) + * @param bool|null $return_ancestors Whether to include ancestor groups in the response. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getDepartments'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return object + * @return \SeaTable\Client\SysAdmin\ListDepartments200Response */ public function getDepartments($department_id, $return_ancestors = null, string $contentType = self::contentTypes['getDepartments'][0]) { @@ -697,13 +697,13 @@ public function getDepartments($department_id, $return_ancestors = null, string * * Get Department * - * @param int $department_id (required) - * @param bool|null $return_ancestors (optional) + * @param int $department_id The ID of the department. (required) + * @param bool|null $return_ancestors Whether to include ancestor groups in the response. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getDepartments'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) + * @return array of \SeaTable\Client\SysAdmin\ListDepartments200Response, HTTP status code, HTTP response headers (array of strings) */ public function getDepartmentsWithHttpInfo($department_id, $return_ancestors = null, string $contentType = self::contentTypes['getDepartments'][0]) { @@ -735,7 +735,7 @@ public function getDepartmentsWithHttpInfo($department_id, $return_ancestors = n switch($statusCode) { case 200: return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\SysAdmin\ListDepartments200Response', $request, $response, ); @@ -757,7 +757,7 @@ public function getDepartmentsWithHttpInfo($department_id, $return_ancestors = n } return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\SysAdmin\ListDepartments200Response', $request, $response, ); @@ -766,7 +766,7 @@ public function getDepartmentsWithHttpInfo($department_id, $return_ancestors = n case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - 'object', + '\SeaTable\Client\SysAdmin\ListDepartments200Response', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -783,8 +783,8 @@ public function getDepartmentsWithHttpInfo($department_id, $return_ancestors = n * * Get Department * - * @param int $department_id (required) - * @param bool|null $return_ancestors (optional) + * @param int $department_id The ID of the department. (required) + * @param bool|null $return_ancestors Whether to include ancestor groups in the response. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getDepartments'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -805,8 +805,8 @@ function ($response) { * * Get Department * - * @param int $department_id (required) - * @param bool|null $return_ancestors (optional) + * @param int $department_id The ID of the department. (required) + * @param bool|null $return_ancestors Whether to include ancestor groups in the response. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getDepartments'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -814,7 +814,7 @@ function ($response) { */ public function getDepartmentsAsyncWithHttpInfo($department_id, $return_ancestors = null, string $contentType = self::contentTypes['getDepartments'][0]) { - $returnType = 'object'; + $returnType = '\SeaTable\Client\SysAdmin\ListDepartments200Response'; $request = $this->getDepartmentsRequest($department_id, $return_ancestors, $contentType); return $this->client @@ -856,8 +856,8 @@ function ($exception) { /** * Create request for operation 'getDepartments' * - * @param int $department_id (required) - * @param bool|null $return_ancestors (optional) + * @param int $department_id The ID of the department. (required) + * @param bool|null $return_ancestors Whether to include ancestor groups in the response. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getDepartments'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -973,7 +973,7 @@ public function getDepartmentsRequest($department_id, $return_ancestors = null, * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return object + * @return \SeaTable\Client\SysAdmin\ListDepartments200Response */ public function listDepartments($parent_department_id, string $contentType = self::contentTypes['listDepartments'][0]) { @@ -991,7 +991,7 @@ public function listDepartments($parent_department_id, string $contentType = sel * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) + * @return array of \SeaTable\Client\SysAdmin\ListDepartments200Response, HTTP status code, HTTP response headers (array of strings) */ public function listDepartmentsWithHttpInfo($parent_department_id, string $contentType = self::contentTypes['listDepartments'][0]) { @@ -1023,7 +1023,7 @@ public function listDepartmentsWithHttpInfo($parent_department_id, string $conte switch($statusCode) { case 200: return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\SysAdmin\ListDepartments200Response', $request, $response, ); @@ -1045,7 +1045,7 @@ public function listDepartmentsWithHttpInfo($parent_department_id, string $conte } return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\SysAdmin\ListDepartments200Response', $request, $response, ); @@ -1054,7 +1054,7 @@ public function listDepartmentsWithHttpInfo($parent_department_id, string $conte case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - 'object', + '\SeaTable\Client\SysAdmin\ListDepartments200Response', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1100,7 +1100,7 @@ function ($response) { */ public function listDepartmentsAsyncWithHttpInfo($parent_department_id, string $contentType = self::contentTypes['listDepartments'][0]) { - $returnType = 'object'; + $returnType = '\SeaTable\Client\SysAdmin\ListDepartments200Response'; $request = $this->listDepartmentsRequest($parent_department_id, $contentType); return $this->client @@ -1251,6 +1251,14 @@ protected function createHttpClientOption() } } + if ($this->config->getCertFile()) { + $options[RequestOptions::CERT] = $this->config->getCertFile(); + } + + if ($this->config->getKeyFile()) { + $options[RequestOptions::SSL_KEY] = $this->config->getKeyFile(); + } + return $options; } diff --git a/lib/SysAdmin/EnforceTwoFactorRequest.php b/lib/SysAdmin/EnforceTwoFactorRequest.php index f3215646..2b1beecb 100644 --- a/lib/SysAdmin/EnforceTwoFactorRequest.php +++ b/lib/SysAdmin/EnforceTwoFactorRequest.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -273,6 +273,9 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['force_2fa'] === null) { + $invalidProperties[] = "'force_2fa' can't be null"; + } return $invalidProperties; } @@ -291,7 +294,7 @@ public function valid() /** * Gets force_2fa * - * @return bool|null + * @return bool */ public function getForce2fa() { @@ -301,7 +304,7 @@ public function getForce2fa() /** * Sets force_2fa * - * @param bool|null $force_2fa Enforce Two Factor for all accounts + * @param bool $force_2fa Enforce Two Factor for all accounts * * @return self */ @@ -317,11 +320,11 @@ public function setForce2fa($force_2fa) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -329,12 +332,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -359,11 +362,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/SysAdmin/ExportApi.php b/lib/SysAdmin/ExportApi.php index 53a6d690..74fdfe73 100644 --- a/lib/SysAdmin/ExportApi.php +++ b/lib/SysAdmin/ExportApi.php @@ -14,7 +14,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -127,7 +127,7 @@ public function getConfig() /** * Operation exportBase * - * Export base + * Export Base * * @param string $base_uuid The unique identifier of a base. Sometimes also called dtable_uuid. (required) * @param bool|null $ignore_asset Set this to `true` to export the base without assets. Default is `false`. (optional) @@ -145,7 +145,7 @@ public function exportBase($base_uuid, $ignore_asset = null, string $contentType /** * Operation exportBaseWithHttpInfo * - * Export base + * Export Base * * @param string $base_uuid The unique identifier of a base. Sometimes also called dtable_uuid. (required) * @param bool|null $ignore_asset Set this to `true` to export the base without assets. Default is `false`. (optional) @@ -195,7 +195,7 @@ public function exportBaseWithHttpInfo($base_uuid, $ignore_asset = null, string /** * Operation exportBaseAsync * - * Export base + * Export Base * * @param string $base_uuid The unique identifier of a base. Sometimes also called dtable_uuid. (required) * @param bool|null $ignore_asset Set this to `true` to export the base without assets. Default is `false`. (optional) @@ -217,7 +217,7 @@ function ($response) { /** * Operation exportBaseAsyncWithHttpInfo * - * Export base + * Export Base * * @param string $base_uuid The unique identifier of a base. Sometimes also called dtable_uuid. (required) * @param bool|null $ignore_asset Set this to `true` to export the base without assets. Default is `false`. (optional) @@ -308,7 +308,7 @@ public function exportBaseRequest($base_uuid, $ignore_asset = null, string $cont $headers = $this->headerSelector->selectHeaders( - [], + ['application/json', ], $contentType, $multipart ); @@ -380,6 +380,14 @@ protected function createHttpClientOption() } } + if ($this->config->getCertFile()) { + $options[RequestOptions::CERT] = $this->config->getCertFile(); + } + + if ($this->config->getKeyFile()) { + $options[RequestOptions::SSL_KEY] = $this->config->getKeyFile(); + } + return $options; } diff --git a/lib/SysAdmin/FormsApi.php b/lib/SysAdmin/FormsApi.php index 4b58a6e7..a5612ddc 100644 --- a/lib/SysAdmin/FormsApi.php +++ b/lib/SysAdmin/FormsApi.php @@ -14,7 +14,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -138,7 +138,7 @@ public function getConfig() * * Delete Data Collection Forms * - * @param string $collection_table_token collection_table_token (required) + * @param string $collection_table_token The token of the collection table. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteDataCollectionForms'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -156,7 +156,7 @@ public function deleteDataCollectionForms($collection_table_token, string $conte * * Delete Data Collection Forms * - * @param string $collection_table_token (required) + * @param string $collection_table_token The token of the collection table. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteDataCollectionForms'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -241,7 +241,7 @@ public function deleteDataCollectionFormsWithHttpInfo($collection_table_token, s * * Delete Data Collection Forms * - * @param string $collection_table_token (required) + * @param string $collection_table_token The token of the collection table. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteDataCollectionForms'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -262,7 +262,7 @@ function ($response) { * * Delete Data Collection Forms * - * @param string $collection_table_token (required) + * @param string $collection_table_token The token of the collection table. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteDataCollectionForms'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -312,7 +312,7 @@ function ($exception) { /** * Create request for operation 'deleteDataCollectionForms' * - * @param string $collection_table_token (required) + * @param string $collection_table_token The token of the collection table. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteDataCollectionForms'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -413,7 +413,7 @@ public function deleteDataCollectionFormsRequest($collection_table_token, string * * Delete Form * - * @param string $form_token form_token (required) + * @param string $form_token The token of the form. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteForm'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -431,7 +431,7 @@ public function deleteForm($form_token, string $contentType = self::contentTypes * * Delete Form * - * @param string $form_token (required) + * @param string $form_token The token of the form. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteForm'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -516,7 +516,7 @@ public function deleteFormWithHttpInfo($form_token, string $contentType = self:: * * Delete Form * - * @param string $form_token (required) + * @param string $form_token The token of the form. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteForm'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -537,7 +537,7 @@ function ($response) { * * Delete Form * - * @param string $form_token (required) + * @param string $form_token The token of the form. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteForm'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -587,7 +587,7 @@ function ($exception) { /** * Create request for operation 'deleteForm' * - * @param string $form_token (required) + * @param string $form_token The token of the form. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteForm'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1203,6 +1203,14 @@ protected function createHttpClientOption() } } + if ($this->config->getCertFile()) { + $options[RequestOptions::CERT] = $this->config->getCertFile(); + } + + if ($this->config->getKeyFile()) { + $options[RequestOptions::SSL_KEY] = $this->config->getKeyFile(); + } + return $options; } diff --git a/lib/SysAdmin/GetSystemInformation200Response.php b/lib/SysAdmin/GetSystemInformation200Response.php new file mode 100644 index 00000000..06323622 --- /dev/null +++ b/lib/SysAdmin/GetSystemInformation200Response.php @@ -0,0 +1,986 @@ + + */ +class GetSystemInformation200Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'getSystemInformation_200_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'version' => 'string', + 'users_count' => 'int', + 'active_users_count' => 'int', + 'groups_count' => 'int', + 'org_count' => 'int', + 'dtables_count' => 'int', + 'multi_tenancy_enabled' => 'bool', + 'is_pro' => 'bool', + 'with_license' => 'bool', + 'license_expiration' => 'string', + 'license_mode' => 'string', + 'license_maxusers' => 'int', + 'license_to' => 'string', + 'dtable_server_info' => 'object[]', + 'dtable_server_info_in_etcd' => 'object[]', + 'archived_base_count' => 'int', + 'archived_row_count' => 'int', + 'archived_base_storage' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'version' => null, + 'users_count' => null, + 'active_users_count' => null, + 'groups_count' => null, + 'org_count' => null, + 'dtables_count' => null, + 'multi_tenancy_enabled' => null, + 'is_pro' => null, + 'with_license' => null, + 'license_expiration' => null, + 'license_mode' => null, + 'license_maxusers' => null, + 'license_to' => null, + 'dtable_server_info' => null, + 'dtable_server_info_in_etcd' => null, + 'archived_base_count' => null, + 'archived_row_count' => null, + 'archived_base_storage' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'version' => false, + 'users_count' => false, + 'active_users_count' => false, + 'groups_count' => false, + 'org_count' => false, + 'dtables_count' => false, + 'multi_tenancy_enabled' => false, + 'is_pro' => false, + 'with_license' => false, + 'license_expiration' => false, + 'license_mode' => false, + 'license_maxusers' => false, + 'license_to' => false, + 'dtable_server_info' => false, + 'dtable_server_info_in_etcd' => false, + 'archived_base_count' => false, + 'archived_row_count' => false, + 'archived_base_storage' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'version' => 'version', + 'users_count' => 'users_count', + 'active_users_count' => 'active_users_count', + 'groups_count' => 'groups_count', + 'org_count' => 'org_count', + 'dtables_count' => 'dtables_count', + 'multi_tenancy_enabled' => 'multi_tenancy_enabled', + 'is_pro' => 'is_pro', + 'with_license' => 'with_license', + 'license_expiration' => 'license_expiration', + 'license_mode' => 'license_mode', + 'license_maxusers' => 'license_maxusers', + 'license_to' => 'license_to', + 'dtable_server_info' => 'dtable_server_info', + 'dtable_server_info_in_etcd' => 'dtable_server_info_in_etcd', + 'archived_base_count' => 'archived_base_count', + 'archived_row_count' => 'archived_row_count', + 'archived_base_storage' => 'archived_base_storage' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'version' => 'setVersion', + 'users_count' => 'setUsersCount', + 'active_users_count' => 'setActiveUsersCount', + 'groups_count' => 'setGroupsCount', + 'org_count' => 'setOrgCount', + 'dtables_count' => 'setDtablesCount', + 'multi_tenancy_enabled' => 'setMultiTenancyEnabled', + 'is_pro' => 'setIsPro', + 'with_license' => 'setWithLicense', + 'license_expiration' => 'setLicenseExpiration', + 'license_mode' => 'setLicenseMode', + 'license_maxusers' => 'setLicenseMaxusers', + 'license_to' => 'setLicenseTo', + 'dtable_server_info' => 'setDtableServerInfo', + 'dtable_server_info_in_etcd' => 'setDtableServerInfoInEtcd', + 'archived_base_count' => 'setArchivedBaseCount', + 'archived_row_count' => 'setArchivedRowCount', + 'archived_base_storage' => 'setArchivedBaseStorage' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'version' => 'getVersion', + 'users_count' => 'getUsersCount', + 'active_users_count' => 'getActiveUsersCount', + 'groups_count' => 'getGroupsCount', + 'org_count' => 'getOrgCount', + 'dtables_count' => 'getDtablesCount', + 'multi_tenancy_enabled' => 'getMultiTenancyEnabled', + 'is_pro' => 'getIsPro', + 'with_license' => 'getWithLicense', + 'license_expiration' => 'getLicenseExpiration', + 'license_mode' => 'getLicenseMode', + 'license_maxusers' => 'getLicenseMaxusers', + 'license_to' => 'getLicenseTo', + 'dtable_server_info' => 'getDtableServerInfo', + 'dtable_server_info_in_etcd' => 'getDtableServerInfoInEtcd', + 'archived_base_count' => 'getArchivedBaseCount', + 'archived_row_count' => 'getArchivedRowCount', + 'archived_base_storage' => 'getArchivedBaseStorage' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('version', $data ?? [], null); + $this->setIfExists('users_count', $data ?? [], null); + $this->setIfExists('active_users_count', $data ?? [], null); + $this->setIfExists('groups_count', $data ?? [], null); + $this->setIfExists('org_count', $data ?? [], null); + $this->setIfExists('dtables_count', $data ?? [], null); + $this->setIfExists('multi_tenancy_enabled', $data ?? [], null); + $this->setIfExists('is_pro', $data ?? [], null); + $this->setIfExists('with_license', $data ?? [], null); + $this->setIfExists('license_expiration', $data ?? [], null); + $this->setIfExists('license_mode', $data ?? [], null); + $this->setIfExists('license_maxusers', $data ?? [], null); + $this->setIfExists('license_to', $data ?? [], null); + $this->setIfExists('dtable_server_info', $data ?? [], null); + $this->setIfExists('dtable_server_info_in_etcd', $data ?? [], null); + $this->setIfExists('archived_base_count', $data ?? [], null); + $this->setIfExists('archived_row_count', $data ?? [], null); + $this->setIfExists('archived_base_storage', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets version + * + * @return string|null + */ + public function getVersion() + { + return $this->container['version']; + } + + /** + * Sets version + * + * @param string|null $version version + * + * @return self + */ + public function setVersion($version) + { + if (is_null($version)) { + throw new \InvalidArgumentException('non-nullable version cannot be null'); + } + $this->container['version'] = $version; + + return $this; + } + + /** + * Gets users_count + * + * @return int|null + */ + public function getUsersCount() + { + return $this->container['users_count']; + } + + /** + * Sets users_count + * + * @param int|null $users_count users_count + * + * @return self + */ + public function setUsersCount($users_count) + { + if (is_null($users_count)) { + throw new \InvalidArgumentException('non-nullable users_count cannot be null'); + } + $this->container['users_count'] = $users_count; + + return $this; + } + + /** + * Gets active_users_count + * + * @return int|null + */ + public function getActiveUsersCount() + { + return $this->container['active_users_count']; + } + + /** + * Sets active_users_count + * + * @param int|null $active_users_count active_users_count + * + * @return self + */ + public function setActiveUsersCount($active_users_count) + { + if (is_null($active_users_count)) { + throw new \InvalidArgumentException('non-nullable active_users_count cannot be null'); + } + $this->container['active_users_count'] = $active_users_count; + + return $this; + } + + /** + * Gets groups_count + * + * @return int|null + */ + public function getGroupsCount() + { + return $this->container['groups_count']; + } + + /** + * Sets groups_count + * + * @param int|null $groups_count groups_count + * + * @return self + */ + public function setGroupsCount($groups_count) + { + if (is_null($groups_count)) { + throw new \InvalidArgumentException('non-nullable groups_count cannot be null'); + } + $this->container['groups_count'] = $groups_count; + + return $this; + } + + /** + * Gets org_count + * + * @return int|null + */ + public function getOrgCount() + { + return $this->container['org_count']; + } + + /** + * Sets org_count + * + * @param int|null $org_count org_count + * + * @return self + */ + public function setOrgCount($org_count) + { + if (is_null($org_count)) { + throw new \InvalidArgumentException('non-nullable org_count cannot be null'); + } + $this->container['org_count'] = $org_count; + + return $this; + } + + /** + * Gets dtables_count + * + * @return int|null + */ + public function getDtablesCount() + { + return $this->container['dtables_count']; + } + + /** + * Sets dtables_count + * + * @param int|null $dtables_count dtables_count + * + * @return self + */ + public function setDtablesCount($dtables_count) + { + if (is_null($dtables_count)) { + throw new \InvalidArgumentException('non-nullable dtables_count cannot be null'); + } + $this->container['dtables_count'] = $dtables_count; + + return $this; + } + + /** + * Gets multi_tenancy_enabled + * + * @return bool|null + */ + public function getMultiTenancyEnabled() + { + return $this->container['multi_tenancy_enabled']; + } + + /** + * Sets multi_tenancy_enabled + * + * @param bool|null $multi_tenancy_enabled multi_tenancy_enabled + * + * @return self + */ + public function setMultiTenancyEnabled($multi_tenancy_enabled) + { + if (is_null($multi_tenancy_enabled)) { + throw new \InvalidArgumentException('non-nullable multi_tenancy_enabled cannot be null'); + } + $this->container['multi_tenancy_enabled'] = $multi_tenancy_enabled; + + return $this; + } + + /** + * Gets is_pro + * + * @return bool|null + */ + public function getIsPro() + { + return $this->container['is_pro']; + } + + /** + * Sets is_pro + * + * @param bool|null $is_pro is_pro + * + * @return self + */ + public function setIsPro($is_pro) + { + if (is_null($is_pro)) { + throw new \InvalidArgumentException('non-nullable is_pro cannot be null'); + } + $this->container['is_pro'] = $is_pro; + + return $this; + } + + /** + * Gets with_license + * + * @return bool|null + */ + public function getWithLicense() + { + return $this->container['with_license']; + } + + /** + * Sets with_license + * + * @param bool|null $with_license with_license + * + * @return self + */ + public function setWithLicense($with_license) + { + if (is_null($with_license)) { + throw new \InvalidArgumentException('non-nullable with_license cannot be null'); + } + $this->container['with_license'] = $with_license; + + return $this; + } + + /** + * Gets license_expiration + * + * @return string|null + */ + public function getLicenseExpiration() + { + return $this->container['license_expiration']; + } + + /** + * Sets license_expiration + * + * @param string|null $license_expiration license_expiration + * + * @return self + */ + public function setLicenseExpiration($license_expiration) + { + if (is_null($license_expiration)) { + throw new \InvalidArgumentException('non-nullable license_expiration cannot be null'); + } + $this->container['license_expiration'] = $license_expiration; + + return $this; + } + + /** + * Gets license_mode + * + * @return string|null + */ + public function getLicenseMode() + { + return $this->container['license_mode']; + } + + /** + * Sets license_mode + * + * @param string|null $license_mode license_mode + * + * @return self + */ + public function setLicenseMode($license_mode) + { + if (is_null($license_mode)) { + throw new \InvalidArgumentException('non-nullable license_mode cannot be null'); + } + $this->container['license_mode'] = $license_mode; + + return $this; + } + + /** + * Gets license_maxusers + * + * @return int|null + */ + public function getLicenseMaxusers() + { + return $this->container['license_maxusers']; + } + + /** + * Sets license_maxusers + * + * @param int|null $license_maxusers license_maxusers + * + * @return self + */ + public function setLicenseMaxusers($license_maxusers) + { + if (is_null($license_maxusers)) { + throw new \InvalidArgumentException('non-nullable license_maxusers cannot be null'); + } + $this->container['license_maxusers'] = $license_maxusers; + + return $this; + } + + /** + * Gets license_to + * + * @return string|null + */ + public function getLicenseTo() + { + return $this->container['license_to']; + } + + /** + * Sets license_to + * + * @param string|null $license_to license_to + * + * @return self + */ + public function setLicenseTo($license_to) + { + if (is_null($license_to)) { + throw new \InvalidArgumentException('non-nullable license_to cannot be null'); + } + $this->container['license_to'] = $license_to; + + return $this; + } + + /** + * Gets dtable_server_info + * + * @return object[]|null + */ + public function getDtableServerInfo() + { + return $this->container['dtable_server_info']; + } + + /** + * Sets dtable_server_info + * + * @param object[]|null $dtable_server_info dtable_server_info + * + * @return self + */ + public function setDtableServerInfo($dtable_server_info) + { + if (is_null($dtable_server_info)) { + throw new \InvalidArgumentException('non-nullable dtable_server_info cannot be null'); + } + $this->container['dtable_server_info'] = $dtable_server_info; + + return $this; + } + + /** + * Gets dtable_server_info_in_etcd + * + * @return object[]|null + */ + public function getDtableServerInfoInEtcd() + { + return $this->container['dtable_server_info_in_etcd']; + } + + /** + * Sets dtable_server_info_in_etcd + * + * @param object[]|null $dtable_server_info_in_etcd dtable_server_info_in_etcd + * + * @return self + */ + public function setDtableServerInfoInEtcd($dtable_server_info_in_etcd) + { + if (is_null($dtable_server_info_in_etcd)) { + throw new \InvalidArgumentException('non-nullable dtable_server_info_in_etcd cannot be null'); + } + $this->container['dtable_server_info_in_etcd'] = $dtable_server_info_in_etcd; + + return $this; + } + + /** + * Gets archived_base_count + * + * @return int|null + */ + public function getArchivedBaseCount() + { + return $this->container['archived_base_count']; + } + + /** + * Sets archived_base_count + * + * @param int|null $archived_base_count archived_base_count + * + * @return self + */ + public function setArchivedBaseCount($archived_base_count) + { + if (is_null($archived_base_count)) { + throw new \InvalidArgumentException('non-nullable archived_base_count cannot be null'); + } + $this->container['archived_base_count'] = $archived_base_count; + + return $this; + } + + /** + * Gets archived_row_count + * + * @return int|null + */ + public function getArchivedRowCount() + { + return $this->container['archived_row_count']; + } + + /** + * Sets archived_row_count + * + * @param int|null $archived_row_count archived_row_count + * + * @return self + */ + public function setArchivedRowCount($archived_row_count) + { + if (is_null($archived_row_count)) { + throw new \InvalidArgumentException('non-nullable archived_row_count cannot be null'); + } + $this->container['archived_row_count'] = $archived_row_count; + + return $this; + } + + /** + * Gets archived_base_storage + * + * @return int|null + */ + public function getArchivedBaseStorage() + { + return $this->container['archived_base_storage']; + } + + /** + * Sets archived_base_storage + * + * @param int|null $archived_base_storage archived_base_storage + * + * @return self + */ + public function setArchivedBaseStorage($archived_base_storage) + { + if (is_null($archived_base_storage)) { + throw new \InvalidArgumentException('non-nullable archived_base_storage cannot be null'); + } + $this->container['archived_base_storage'] = $archived_base_storage; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/SysAdmin/GetUser200Response.php b/lib/SysAdmin/GetUser200Response.php new file mode 100644 index 00000000..4ec78240 --- /dev/null +++ b/lib/SysAdmin/GetUser200Response.php @@ -0,0 +1,918 @@ + + */ +class GetUser200Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'getUser_200_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'org_id' => 'int', + 'org_name' => 'string', + 'email' => 'string', + 'name' => 'string', + 'contact_email' => 'string', + 'unit' => 'string', + 'login_id' => 'string', + 'id_in_org' => 'string', + 'is_staff' => 'bool', + 'is_active' => 'bool', + 'phone' => 'string', + 'create_time' => 'string', + 'role' => 'string', + 'avatar_url' => 'string', + 'has_default_device' => 'bool', + 'is_force_2fa' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'org_id' => null, + 'org_name' => null, + 'email' => null, + 'name' => null, + 'contact_email' => null, + 'unit' => null, + 'login_id' => null, + 'id_in_org' => null, + 'is_staff' => null, + 'is_active' => null, + 'phone' => null, + 'create_time' => null, + 'role' => null, + 'avatar_url' => null, + 'has_default_device' => null, + 'is_force_2fa' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'org_id' => false, + 'org_name' => false, + 'email' => false, + 'name' => false, + 'contact_email' => false, + 'unit' => false, + 'login_id' => false, + 'id_in_org' => false, + 'is_staff' => false, + 'is_active' => false, + 'phone' => false, + 'create_time' => false, + 'role' => false, + 'avatar_url' => false, + 'has_default_device' => false, + 'is_force_2fa' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'org_id' => 'org_id', + 'org_name' => 'org_name', + 'email' => 'email', + 'name' => 'name', + 'contact_email' => 'contact_email', + 'unit' => 'unit', + 'login_id' => 'login_id', + 'id_in_org' => 'id_in_org', + 'is_staff' => 'is_staff', + 'is_active' => 'is_active', + 'phone' => 'phone', + 'create_time' => 'create_time', + 'role' => 'role', + 'avatar_url' => 'avatar_url', + 'has_default_device' => 'has_default_device', + 'is_force_2fa' => 'is_force_2fa' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'org_id' => 'setOrgId', + 'org_name' => 'setOrgName', + 'email' => 'setEmail', + 'name' => 'setName', + 'contact_email' => 'setContactEmail', + 'unit' => 'setUnit', + 'login_id' => 'setLoginId', + 'id_in_org' => 'setIdInOrg', + 'is_staff' => 'setIsStaff', + 'is_active' => 'setIsActive', + 'phone' => 'setPhone', + 'create_time' => 'setCreateTime', + 'role' => 'setRole', + 'avatar_url' => 'setAvatarUrl', + 'has_default_device' => 'setHasDefaultDevice', + 'is_force_2fa' => 'setIsForce2fa' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'org_id' => 'getOrgId', + 'org_name' => 'getOrgName', + 'email' => 'getEmail', + 'name' => 'getName', + 'contact_email' => 'getContactEmail', + 'unit' => 'getUnit', + 'login_id' => 'getLoginId', + 'id_in_org' => 'getIdInOrg', + 'is_staff' => 'getIsStaff', + 'is_active' => 'getIsActive', + 'phone' => 'getPhone', + 'create_time' => 'getCreateTime', + 'role' => 'getRole', + 'avatar_url' => 'getAvatarUrl', + 'has_default_device' => 'getHasDefaultDevice', + 'is_force_2fa' => 'getIsForce2fa' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('org_id', $data ?? [], null); + $this->setIfExists('org_name', $data ?? [], null); + $this->setIfExists('email', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('contact_email', $data ?? [], null); + $this->setIfExists('unit', $data ?? [], null); + $this->setIfExists('login_id', $data ?? [], null); + $this->setIfExists('id_in_org', $data ?? [], null); + $this->setIfExists('is_staff', $data ?? [], null); + $this->setIfExists('is_active', $data ?? [], null); + $this->setIfExists('phone', $data ?? [], null); + $this->setIfExists('create_time', $data ?? [], null); + $this->setIfExists('role', $data ?? [], null); + $this->setIfExists('avatar_url', $data ?? [], null); + $this->setIfExists('has_default_device', $data ?? [], null); + $this->setIfExists('is_force_2fa', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets org_id + * + * @return int|null + */ + public function getOrgId() + { + return $this->container['org_id']; + } + + /** + * Sets org_id + * + * @param int|null $org_id org_id + * + * @return self + */ + public function setOrgId($org_id) + { + if (is_null($org_id)) { + throw new \InvalidArgumentException('non-nullable org_id cannot be null'); + } + $this->container['org_id'] = $org_id; + + return $this; + } + + /** + * Gets org_name + * + * @return string|null + */ + public function getOrgName() + { + return $this->container['org_name']; + } + + /** + * Sets org_name + * + * @param string|null $org_name org_name + * + * @return self + */ + public function setOrgName($org_name) + { + if (is_null($org_name)) { + throw new \InvalidArgumentException('non-nullable org_name cannot be null'); + } + $this->container['org_name'] = $org_name; + + return $this; + } + + /** + * Gets email + * + * @return string|null + */ + public function getEmail() + { + return $this->container['email']; + } + + /** + * Sets email + * + * @param string|null $email email + * + * @return self + */ + public function setEmail($email) + { + if (is_null($email)) { + throw new \InvalidArgumentException('non-nullable email cannot be null'); + } + $this->container['email'] = $email; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name name + * + * @return self + */ + public function setName($name) + { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets contact_email + * + * @return string|null + */ + public function getContactEmail() + { + return $this->container['contact_email']; + } + + /** + * Sets contact_email + * + * @param string|null $contact_email contact_email + * + * @return self + */ + public function setContactEmail($contact_email) + { + if (is_null($contact_email)) { + throw new \InvalidArgumentException('non-nullable contact_email cannot be null'); + } + $this->container['contact_email'] = $contact_email; + + return $this; + } + + /** + * Gets unit + * + * @return string|null + */ + public function getUnit() + { + return $this->container['unit']; + } + + /** + * Sets unit + * + * @param string|null $unit unit + * + * @return self + */ + public function setUnit($unit) + { + if (is_null($unit)) { + throw new \InvalidArgumentException('non-nullable unit cannot be null'); + } + $this->container['unit'] = $unit; + + return $this; + } + + /** + * Gets login_id + * + * @return string|null + */ + public function getLoginId() + { + return $this->container['login_id']; + } + + /** + * Sets login_id + * + * @param string|null $login_id login_id + * + * @return self + */ + public function setLoginId($login_id) + { + if (is_null($login_id)) { + throw new \InvalidArgumentException('non-nullable login_id cannot be null'); + } + $this->container['login_id'] = $login_id; + + return $this; + } + + /** + * Gets id_in_org + * + * @return string|null + */ + public function getIdInOrg() + { + return $this->container['id_in_org']; + } + + /** + * Sets id_in_org + * + * @param string|null $id_in_org id_in_org + * + * @return self + */ + public function setIdInOrg($id_in_org) + { + if (is_null($id_in_org)) { + throw new \InvalidArgumentException('non-nullable id_in_org cannot be null'); + } + $this->container['id_in_org'] = $id_in_org; + + return $this; + } + + /** + * Gets is_staff + * + * @return bool|null + */ + public function getIsStaff() + { + return $this->container['is_staff']; + } + + /** + * Sets is_staff + * + * @param bool|null $is_staff is_staff + * + * @return self + */ + public function setIsStaff($is_staff) + { + if (is_null($is_staff)) { + throw new \InvalidArgumentException('non-nullable is_staff cannot be null'); + } + $this->container['is_staff'] = $is_staff; + + return $this; + } + + /** + * Gets is_active + * + * @return bool|null + */ + public function getIsActive() + { + return $this->container['is_active']; + } + + /** + * Sets is_active + * + * @param bool|null $is_active is_active + * + * @return self + */ + public function setIsActive($is_active) + { + if (is_null($is_active)) { + throw new \InvalidArgumentException('non-nullable is_active cannot be null'); + } + $this->container['is_active'] = $is_active; + + return $this; + } + + /** + * Gets phone + * + * @return string|null + */ + public function getPhone() + { + return $this->container['phone']; + } + + /** + * Sets phone + * + * @param string|null $phone phone + * + * @return self + */ + public function setPhone($phone) + { + if (is_null($phone)) { + throw new \InvalidArgumentException('non-nullable phone cannot be null'); + } + $this->container['phone'] = $phone; + + return $this; + } + + /** + * Gets create_time + * + * @return string|null + */ + public function getCreateTime() + { + return $this->container['create_time']; + } + + /** + * Sets create_time + * + * @param string|null $create_time create_time + * + * @return self + */ + public function setCreateTime($create_time) + { + if (is_null($create_time)) { + throw new \InvalidArgumentException('non-nullable create_time cannot be null'); + } + $this->container['create_time'] = $create_time; + + return $this; + } + + /** + * Gets role + * + * @return string|null + */ + public function getRole() + { + return $this->container['role']; + } + + /** + * Sets role + * + * @param string|null $role role + * + * @return self + */ + public function setRole($role) + { + if (is_null($role)) { + throw new \InvalidArgumentException('non-nullable role cannot be null'); + } + $this->container['role'] = $role; + + return $this; + } + + /** + * Gets avatar_url + * + * @return string|null + */ + public function getAvatarUrl() + { + return $this->container['avatar_url']; + } + + /** + * Sets avatar_url + * + * @param string|null $avatar_url avatar_url + * + * @return self + */ + public function setAvatarUrl($avatar_url) + { + if (is_null($avatar_url)) { + throw new \InvalidArgumentException('non-nullable avatar_url cannot be null'); + } + $this->container['avatar_url'] = $avatar_url; + + return $this; + } + + /** + * Gets has_default_device + * + * @return bool|null + */ + public function getHasDefaultDevice() + { + return $this->container['has_default_device']; + } + + /** + * Sets has_default_device + * + * @param bool|null $has_default_device has_default_device + * + * @return self + */ + public function setHasDefaultDevice($has_default_device) + { + if (is_null($has_default_device)) { + throw new \InvalidArgumentException('non-nullable has_default_device cannot be null'); + } + $this->container['has_default_device'] = $has_default_device; + + return $this; + } + + /** + * Gets is_force_2fa + * + * @return bool|null + */ + public function getIsForce2fa() + { + return $this->container['is_force_2fa']; + } + + /** + * Sets is_force_2fa + * + * @param bool|null $is_force_2fa is_force_2fa + * + * @return self + */ + public function setIsForce2fa($is_force_2fa) + { + if (is_null($is_force_2fa)) { + throw new \InvalidArgumentException('non-nullable is_force_2fa cannot be null'); + } + $this->container['is_force_2fa'] = $is_force_2fa; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/SysAdmin/GroupsApi.php b/lib/SysAdmin/GroupsApi.php index 0a2f0638..0c1053c4 100644 --- a/lib/SysAdmin/GroupsApi.php +++ b/lib/SysAdmin/GroupsApi.php @@ -14,7 +14,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -403,7 +403,7 @@ public function createGroupRequest($create_group_request = null, string $content * * Delete Group * - * @param int $group_id group_id (required) + * @param int $group_id The ID of the group. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteGroup'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -421,7 +421,7 @@ public function deleteGroup($group_id, string $contentType = self::contentTypes[ * * Delete Group * - * @param int $group_id (required) + * @param int $group_id The ID of the group. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteGroup'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -506,7 +506,7 @@ public function deleteGroupWithHttpInfo($group_id, string $contentType = self::c * * Delete Group * - * @param int $group_id (required) + * @param int $group_id The ID of the group. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteGroup'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -527,7 +527,7 @@ function ($response) { * * Delete Group * - * @param int $group_id (required) + * @param int $group_id The ID of the group. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteGroup'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -577,7 +577,7 @@ function ($exception) { /** * Create request for operation 'deleteGroup' * - * @param int $group_id (required) + * @param int $group_id The ID of the group. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteGroup'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -981,13 +981,13 @@ public function listGroupsRequest($page = null, $per_page = null, $name = null, * * Transfer Group * - * @param int $group_id group_id (required) + * @param int $group_id The ID of the group. (required) * @param \SeaTable\Client\SysAdmin\TransferGroupRequest|null $transfer_group_request transfer_group_request (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['transferGroup'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return object + * @return \SeaTable\Client\SysAdmin\TransferGroup200Response */ public function transferGroup($group_id, $transfer_group_request = null, string $contentType = self::contentTypes['transferGroup'][0]) { @@ -1000,13 +1000,13 @@ public function transferGroup($group_id, $transfer_group_request = null, string * * Transfer Group * - * @param int $group_id (required) + * @param int $group_id The ID of the group. (required) * @param \SeaTable\Client\SysAdmin\TransferGroupRequest|null $transfer_group_request (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['transferGroup'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) + * @return array of \SeaTable\Client\SysAdmin\TransferGroup200Response, HTTP status code, HTTP response headers (array of strings) */ public function transferGroupWithHttpInfo($group_id, $transfer_group_request = null, string $contentType = self::contentTypes['transferGroup'][0]) { @@ -1038,7 +1038,7 @@ public function transferGroupWithHttpInfo($group_id, $transfer_group_request = n switch($statusCode) { case 200: return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\SysAdmin\TransferGroup200Response', $request, $response, ); @@ -1060,7 +1060,7 @@ public function transferGroupWithHttpInfo($group_id, $transfer_group_request = n } return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\SysAdmin\TransferGroup200Response', $request, $response, ); @@ -1069,7 +1069,7 @@ public function transferGroupWithHttpInfo($group_id, $transfer_group_request = n case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - 'object', + '\SeaTable\Client\SysAdmin\TransferGroup200Response', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1086,7 +1086,7 @@ public function transferGroupWithHttpInfo($group_id, $transfer_group_request = n * * Transfer Group * - * @param int $group_id (required) + * @param int $group_id The ID of the group. (required) * @param \SeaTable\Client\SysAdmin\TransferGroupRequest|null $transfer_group_request (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['transferGroup'] to see the possible values for this operation * @@ -1108,7 +1108,7 @@ function ($response) { * * Transfer Group * - * @param int $group_id (required) + * @param int $group_id The ID of the group. (required) * @param \SeaTable\Client\SysAdmin\TransferGroupRequest|null $transfer_group_request (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['transferGroup'] to see the possible values for this operation * @@ -1117,7 +1117,7 @@ function ($response) { */ public function transferGroupAsyncWithHttpInfo($group_id, $transfer_group_request = null, string $contentType = self::contentTypes['transferGroup'][0]) { - $returnType = 'object'; + $returnType = '\SeaTable\Client\SysAdmin\TransferGroup200Response'; $request = $this->transferGroupRequest($group_id, $transfer_group_request, $contentType); return $this->client @@ -1159,7 +1159,7 @@ function ($exception) { /** * Create request for operation 'transferGroup' * - * @param int $group_id (required) + * @param int $group_id The ID of the group. (required) * @param \SeaTable\Client\SysAdmin\TransferGroupRequest|null $transfer_group_request (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['transferGroup'] to see the possible values for this operation * @@ -1280,6 +1280,14 @@ protected function createHttpClientOption() } } + if ($this->config->getCertFile()) { + $options[RequestOptions::CERT] = $this->config->getCertFile(); + } + + if ($this->config->getKeyFile()) { + $options[RequestOptions::SSL_KEY] = $this->config->getKeyFile(); + } + return $options; } diff --git a/lib/SysAdmin/ListActiveUsersByDay200Response.php b/lib/SysAdmin/ListActiveUsersByDay200Response.php new file mode 100644 index 00000000..f3e1e5e8 --- /dev/null +++ b/lib/SysAdmin/ListActiveUsersByDay200Response.php @@ -0,0 +1,476 @@ + + */ +class ListActiveUsersByDay200Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'listActiveUsersByDay_200_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'active_user_list' => 'object[]', + 'page' => 'int', + 'total_count' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'active_user_list' => null, + 'page' => null, + 'total_count' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'active_user_list' => false, + 'page' => false, + 'total_count' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'active_user_list' => 'active_user_list', + 'page' => 'page', + 'total_count' => 'total_count' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'active_user_list' => 'setActiveUserList', + 'page' => 'setPage', + 'total_count' => 'setTotalCount' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'active_user_list' => 'getActiveUserList', + 'page' => 'getPage', + 'total_count' => 'getTotalCount' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('active_user_list', $data ?? [], null); + $this->setIfExists('page', $data ?? [], null); + $this->setIfExists('total_count', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets active_user_list + * + * @return object[]|null + */ + public function getActiveUserList() + { + return $this->container['active_user_list']; + } + + /** + * Sets active_user_list + * + * @param object[]|null $active_user_list active_user_list + * + * @return self + */ + public function setActiveUserList($active_user_list) + { + if (is_null($active_user_list)) { + throw new \InvalidArgumentException('non-nullable active_user_list cannot be null'); + } + $this->container['active_user_list'] = $active_user_list; + + return $this; + } + + /** + * Gets page + * + * @return int|null + */ + public function getPage() + { + return $this->container['page']; + } + + /** + * Sets page + * + * @param int|null $page page + * + * @return self + */ + public function setPage($page) + { + if (is_null($page)) { + throw new \InvalidArgumentException('non-nullable page cannot be null'); + } + $this->container['page'] = $page; + + return $this; + } + + /** + * Gets total_count + * + * @return int|null + */ + public function getTotalCount() + { + return $this->container['total_count']; + } + + /** + * Sets total_count + * + * @param int|null $total_count total_count + * + * @return self + */ + public function setTotalCount($total_count) + { + if (is_null($total_count)) { + throw new \InvalidArgumentException('non-nullable total_count cannot be null'); + } + $this->container['total_count'] = $total_count; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/SysAdmin/ListAuditLogs200Response.php b/lib/SysAdmin/ListAuditLogs200Response.php index e5c943db..00686bf6 100644 --- a/lib/SysAdmin/ListAuditLogs200Response.php +++ b/lib/SysAdmin/ListAuditLogs200Response.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -351,11 +351,11 @@ public function setTotalCount($total_count) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -363,12 +363,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -393,11 +393,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/SysAdmin/ListAuditLogs200ResponseAuditLogListInner.php b/lib/SysAdmin/ListAuditLogs200ResponseAuditLogListInner.php index 1bc0f6fa..1c8e9de1 100644 --- a/lib/SysAdmin/ListAuditLogs200ResponseAuditLogListInner.php +++ b/lib/SysAdmin/ListAuditLogs200ResponseAuditLogListInner.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -521,11 +521,11 @@ public function setOrgName($org_name) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -533,12 +533,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -563,11 +563,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/SysAdmin/ListAuditLogs200ResponseAuditLogListInnerDetail.php b/lib/SysAdmin/ListAuditLogs200ResponseAuditLogListInnerDetail.php index 4d8a24c1..b2a6b2e8 100644 --- a/lib/SysAdmin/ListAuditLogs200ResponseAuditLogListInnerDetail.php +++ b/lib/SysAdmin/ListAuditLogs200ResponseAuditLogListInnerDetail.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -352,11 +352,11 @@ public function setName($name) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -364,12 +364,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -394,11 +394,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/SysAdmin/ListDepartments200Response.php b/lib/SysAdmin/ListDepartments200Response.php new file mode 100644 index 00000000..81f3058e --- /dev/null +++ b/lib/SysAdmin/ListDepartments200Response.php @@ -0,0 +1,680 @@ + + */ +class ListDepartments200Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'listDepartments_200_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'id' => 'int', + 'name' => 'string', + 'owner' => 'string', + 'created_at' => 'string', + 'parent_group_id' => 'int', + 'quota' => 'int', + 'groups' => 'object[]', + 'members' => 'object[]', + 'ancestor_groups' => 'object[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'id' => null, + 'name' => null, + 'owner' => null, + 'created_at' => null, + 'parent_group_id' => null, + 'quota' => null, + 'groups' => null, + 'members' => null, + 'ancestor_groups' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'id' => false, + 'name' => false, + 'owner' => false, + 'created_at' => false, + 'parent_group_id' => false, + 'quota' => false, + 'groups' => false, + 'members' => false, + 'ancestor_groups' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'name' => 'name', + 'owner' => 'owner', + 'created_at' => 'created_at', + 'parent_group_id' => 'parent_group_id', + 'quota' => 'quota', + 'groups' => 'groups', + 'members' => 'members', + 'ancestor_groups' => 'ancestor_groups' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'name' => 'setName', + 'owner' => 'setOwner', + 'created_at' => 'setCreatedAt', + 'parent_group_id' => 'setParentGroupId', + 'quota' => 'setQuota', + 'groups' => 'setGroups', + 'members' => 'setMembers', + 'ancestor_groups' => 'setAncestorGroups' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'name' => 'getName', + 'owner' => 'getOwner', + 'created_at' => 'getCreatedAt', + 'parent_group_id' => 'getParentGroupId', + 'quota' => 'getQuota', + 'groups' => 'getGroups', + 'members' => 'getMembers', + 'ancestor_groups' => 'getAncestorGroups' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('owner', $data ?? [], null); + $this->setIfExists('created_at', $data ?? [], null); + $this->setIfExists('parent_group_id', $data ?? [], null); + $this->setIfExists('quota', $data ?? [], null); + $this->setIfExists('groups', $data ?? [], null); + $this->setIfExists('members', $data ?? [], null); + $this->setIfExists('ancestor_groups', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return int|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int|null $id id + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name name + * + * @return self + */ + public function setName($name) + { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets owner + * + * @return string|null + */ + public function getOwner() + { + return $this->container['owner']; + } + + /** + * Sets owner + * + * @param string|null $owner owner + * + * @return self + */ + public function setOwner($owner) + { + if (is_null($owner)) { + throw new \InvalidArgumentException('non-nullable owner cannot be null'); + } + $this->container['owner'] = $owner; + + return $this; + } + + /** + * Gets created_at + * + * @return string|null + */ + public function getCreatedAt() + { + return $this->container['created_at']; + } + + /** + * Sets created_at + * + * @param string|null $created_at created_at + * + * @return self + */ + public function setCreatedAt($created_at) + { + if (is_null($created_at)) { + throw new \InvalidArgumentException('non-nullable created_at cannot be null'); + } + $this->container['created_at'] = $created_at; + + return $this; + } + + /** + * Gets parent_group_id + * + * @return int|null + */ + public function getParentGroupId() + { + return $this->container['parent_group_id']; + } + + /** + * Sets parent_group_id + * + * @param int|null $parent_group_id parent_group_id + * + * @return self + */ + public function setParentGroupId($parent_group_id) + { + if (is_null($parent_group_id)) { + throw new \InvalidArgumentException('non-nullable parent_group_id cannot be null'); + } + $this->container['parent_group_id'] = $parent_group_id; + + return $this; + } + + /** + * Gets quota + * + * @return int|null + */ + public function getQuota() + { + return $this->container['quota']; + } + + /** + * Sets quota + * + * @param int|null $quota quota + * + * @return self + */ + public function setQuota($quota) + { + if (is_null($quota)) { + throw new \InvalidArgumentException('non-nullable quota cannot be null'); + } + $this->container['quota'] = $quota; + + return $this; + } + + /** + * Gets groups + * + * @return object[]|null + */ + public function getGroups() + { + return $this->container['groups']; + } + + /** + * Sets groups + * + * @param object[]|null $groups groups + * + * @return self + */ + public function setGroups($groups) + { + if (is_null($groups)) { + throw new \InvalidArgumentException('non-nullable groups cannot be null'); + } + $this->container['groups'] = $groups; + + return $this; + } + + /** + * Gets members + * + * @return object[]|null + */ + public function getMembers() + { + return $this->container['members']; + } + + /** + * Sets members + * + * @param object[]|null $members members + * + * @return self + */ + public function setMembers($members) + { + if (is_null($members)) { + throw new \InvalidArgumentException('non-nullable members cannot be null'); + } + $this->container['members'] = $members; + + return $this; + } + + /** + * Gets ancestor_groups + * + * @return object[]|null + */ + public function getAncestorGroups() + { + return $this->container['ancestor_groups']; + } + + /** + * Sets ancestor_groups + * + * @param object[]|null $ancestor_groups ancestor_groups + * + * @return self + */ + public function setAncestorGroups($ancestor_groups) + { + if (is_null($ancestor_groups)) { + throw new \InvalidArgumentException('non-nullable ancestor_groups cannot be null'); + } + $this->container['ancestor_groups'] = $ancestor_groups; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/SysAdmin/LogsApi.php b/lib/SysAdmin/LogsApi.php index 63cd4b5c..ed30a0a4 100644 --- a/lib/SysAdmin/LogsApi.php +++ b/lib/SysAdmin/LogsApi.php @@ -14,7 +14,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -2327,7 +2327,7 @@ public function listRegistrationLogsRequest(string $contentType = self::contentT * * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) - * @param string|null $has_handled has_handled (optional) + * @param string|null $has_handled Filter by handling status. Use `true` for handled, `false` for unhandled, or `null` for all. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listVirusFiles'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -2346,7 +2346,7 @@ public function listVirusFiles($page = null, $per_page = null, $has_handled = nu * * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) - * @param string|null $has_handled (optional) + * @param string|null $has_handled Filter by handling status. Use `true` for handled, `false` for unhandled, or `null` for all. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listVirusFiles'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -2397,7 +2397,7 @@ public function listVirusFilesWithHttpInfo($page = null, $per_page = null, $has_ * * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) - * @param string|null $has_handled (optional) + * @param string|null $has_handled Filter by handling status. Use `true` for handled, `false` for unhandled, or `null` for all. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listVirusFiles'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -2420,7 +2420,7 @@ function ($response) { * * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) - * @param string|null $has_handled (optional) + * @param string|null $has_handled Filter by handling status. Use `true` for handled, `false` for unhandled, or `null` for all. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listVirusFiles'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -2459,7 +2459,7 @@ function ($exception) { * * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) - * @param string|null $has_handled (optional) + * @param string|null $has_handled Filter by handling status. Use `true` for handled, `false` for unhandled, or `null` for all. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listVirusFiles'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -2578,13 +2578,13 @@ public function listVirusFilesRequest($page = null, $per_page = null, $has_handl * * Update Abuse Report * - * @param int $abuse_report_id abuse_report_id (required) + * @param int $abuse_report_id The ID of the abuse report. (required) * @param \SeaTable\Client\SysAdmin\UpdateAbuseReportRequest|null $update_abuse_report_request update_abuse_report_request (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateAbuseReport'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return object + * @return \SeaTable\Client\SysAdmin\UpdateAbuseReport200Response */ public function updateAbuseReport($abuse_report_id, $update_abuse_report_request = null, string $contentType = self::contentTypes['updateAbuseReport'][0]) { @@ -2597,13 +2597,13 @@ public function updateAbuseReport($abuse_report_id, $update_abuse_report_request * * Update Abuse Report * - * @param int $abuse_report_id (required) + * @param int $abuse_report_id The ID of the abuse report. (required) * @param \SeaTable\Client\SysAdmin\UpdateAbuseReportRequest|null $update_abuse_report_request (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateAbuseReport'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) + * @return array of \SeaTable\Client\SysAdmin\UpdateAbuseReport200Response, HTTP status code, HTTP response headers (array of strings) */ public function updateAbuseReportWithHttpInfo($abuse_report_id, $update_abuse_report_request = null, string $contentType = self::contentTypes['updateAbuseReport'][0]) { @@ -2635,7 +2635,7 @@ public function updateAbuseReportWithHttpInfo($abuse_report_id, $update_abuse_re switch($statusCode) { case 200: return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\SysAdmin\UpdateAbuseReport200Response', $request, $response, ); @@ -2657,7 +2657,7 @@ public function updateAbuseReportWithHttpInfo($abuse_report_id, $update_abuse_re } return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\SysAdmin\UpdateAbuseReport200Response', $request, $response, ); @@ -2666,7 +2666,7 @@ public function updateAbuseReportWithHttpInfo($abuse_report_id, $update_abuse_re case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - 'object', + '\SeaTable\Client\SysAdmin\UpdateAbuseReport200Response', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2683,7 +2683,7 @@ public function updateAbuseReportWithHttpInfo($abuse_report_id, $update_abuse_re * * Update Abuse Report * - * @param int $abuse_report_id (required) + * @param int $abuse_report_id The ID of the abuse report. (required) * @param \SeaTable\Client\SysAdmin\UpdateAbuseReportRequest|null $update_abuse_report_request (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateAbuseReport'] to see the possible values for this operation * @@ -2705,7 +2705,7 @@ function ($response) { * * Update Abuse Report * - * @param int $abuse_report_id (required) + * @param int $abuse_report_id The ID of the abuse report. (required) * @param \SeaTable\Client\SysAdmin\UpdateAbuseReportRequest|null $update_abuse_report_request (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateAbuseReport'] to see the possible values for this operation * @@ -2714,7 +2714,7 @@ function ($response) { */ public function updateAbuseReportAsyncWithHttpInfo($abuse_report_id, $update_abuse_report_request = null, string $contentType = self::contentTypes['updateAbuseReport'][0]) { - $returnType = 'object'; + $returnType = '\SeaTable\Client\SysAdmin\UpdateAbuseReport200Response'; $request = $this->updateAbuseReportRequest($abuse_report_id, $update_abuse_report_request, $contentType); return $this->client @@ -2756,7 +2756,7 @@ function ($exception) { /** * Create request for operation 'updateAbuseReport' * - * @param int $abuse_report_id (required) + * @param int $abuse_report_id The ID of the abuse report. (required) * @param \SeaTable\Client\SysAdmin\UpdateAbuseReportRequest|null $update_abuse_report_request (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateAbuseReport'] to see the possible values for this operation * @@ -3120,6 +3120,14 @@ protected function createHttpClientOption() } } + if ($this->config->getCertFile()) { + $options[RequestOptions::CERT] = $this->config->getCertFile(); + } + + if ($this->config->getKeyFile()) { + $options[RequestOptions::SSL_KEY] = $this->config->getKeyFile(); + } + return $options; } diff --git a/lib/SysAdmin/MaintenanceApi.php b/lib/SysAdmin/MaintenanceApi.php index ad0bc6fe..435b300c 100644 --- a/lib/SysAdmin/MaintenanceApi.php +++ b/lib/SysAdmin/MaintenanceApi.php @@ -14,7 +14,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -415,6 +415,14 @@ protected function createHttpClientOption() } } + if ($this->config->getCertFile()) { + $options[RequestOptions::CERT] = $this->config->getCertFile(); + } + + if ($this->config->getKeyFile()) { + $options[RequestOptions::SSL_KEY] = $this->config->getKeyFile(); + } + return $options; } diff --git a/lib/SysAdmin/ModelInterface.php b/lib/SysAdmin/ModelInterface.php index ec489e4d..7696105d 100644 --- a/lib/SysAdmin/ModelInterface.php +++ b/lib/SysAdmin/ModelInterface.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ diff --git a/lib/SysAdmin/NotificationsApi.php b/lib/SysAdmin/NotificationsApi.php index 6ba09e75..6c826050 100644 --- a/lib/SysAdmin/NotificationsApi.php +++ b/lib/SysAdmin/NotificationsApi.php @@ -14,7 +14,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -390,7 +390,7 @@ public function deleteInvalidNotificationsRequest(string $contentType = self::co * * Delete Notification * - * @param int $notification_rule_id notification_rule_id (required) + * @param int $notification_rule_id The ID of the notification rule. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteNotificationRule'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -408,7 +408,7 @@ public function deleteNotificationRule($notification_rule_id, string $contentTyp * * Delete Notification * - * @param int $notification_rule_id (required) + * @param int $notification_rule_id The ID of the notification rule. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteNotificationRule'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -493,7 +493,7 @@ public function deleteNotificationRuleWithHttpInfo($notification_rule_id, string * * Delete Notification * - * @param int $notification_rule_id (required) + * @param int $notification_rule_id The ID of the notification rule. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteNotificationRule'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -514,7 +514,7 @@ function ($response) { * * Delete Notification * - * @param int $notification_rule_id (required) + * @param int $notification_rule_id The ID of the notification rule. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteNotificationRule'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -564,7 +564,7 @@ function ($exception) { /** * Create request for operation 'deleteNotificationRule' * - * @param int $notification_rule_id (required) + * @param int $notification_rule_id The ID of the notification rule. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteNotificationRule'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1252,6 +1252,14 @@ protected function createHttpClientOption() } } + if ($this->config->getCertFile()) { + $options[RequestOptions::CERT] = $this->config->getCertFile(); + } + + if ($this->config->getKeyFile()) { + $options[RequestOptions::SSL_KEY] = $this->config->getKeyFile(); + } + return $options; } diff --git a/lib/SysAdmin/PluginsApi.php b/lib/SysAdmin/PluginsApi.php index 94db9d95..6a563525 100644 --- a/lib/SysAdmin/PluginsApi.php +++ b/lib/SysAdmin/PluginsApi.php @@ -14,7 +14,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -141,14 +141,14 @@ public function getConfig() * * Add Plugin * - * @param \SplFileObject|null $plugin Path and file name to the plugin file. (optional) + * @param \SplFileObject $plugin Path and file name to the plugin file. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['addPlugin'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return object + * @return \SeaTable\Client\SysAdmin\AddPlugin200Response */ - public function addPlugin($plugin = null, string $contentType = self::contentTypes['addPlugin'][0]) + public function addPlugin($plugin, string $contentType = self::contentTypes['addPlugin'][0]) { list($response) = $this->addPluginWithHttpInfo($plugin, $contentType); return $response; @@ -159,14 +159,14 @@ public function addPlugin($plugin = null, string $contentType = self::contentTyp * * Add Plugin * - * @param \SplFileObject|null $plugin Path and file name to the plugin file. (optional) + * @param \SplFileObject $plugin Path and file name to the plugin file. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['addPlugin'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) + * @return array of \SeaTable\Client\SysAdmin\AddPlugin200Response, HTTP status code, HTTP response headers (array of strings) */ - public function addPluginWithHttpInfo($plugin = null, string $contentType = self::contentTypes['addPlugin'][0]) + public function addPluginWithHttpInfo($plugin, string $contentType = self::contentTypes['addPlugin'][0]) { $request = $this->addPluginRequest($plugin, $contentType); @@ -196,7 +196,7 @@ public function addPluginWithHttpInfo($plugin = null, string $contentType = self switch($statusCode) { case 200: return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\SysAdmin\AddPlugin200Response', $request, $response, ); @@ -218,7 +218,7 @@ public function addPluginWithHttpInfo($plugin = null, string $contentType = self } return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\SysAdmin\AddPlugin200Response', $request, $response, ); @@ -227,7 +227,7 @@ public function addPluginWithHttpInfo($plugin = null, string $contentType = self case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - 'object', + '\SeaTable\Client\SysAdmin\AddPlugin200Response', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -244,13 +244,13 @@ public function addPluginWithHttpInfo($plugin = null, string $contentType = self * * Add Plugin * - * @param \SplFileObject|null $plugin Path and file name to the plugin file. (optional) + * @param \SplFileObject $plugin Path and file name to the plugin file. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['addPlugin'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function addPluginAsync($plugin = null, string $contentType = self::contentTypes['addPlugin'][0]) + public function addPluginAsync($plugin, string $contentType = self::contentTypes['addPlugin'][0]) { return $this->addPluginAsyncWithHttpInfo($plugin, $contentType) ->then( @@ -265,15 +265,15 @@ function ($response) { * * Add Plugin * - * @param \SplFileObject|null $plugin Path and file name to the plugin file. (optional) + * @param \SplFileObject $plugin Path and file name to the plugin file. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['addPlugin'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function addPluginAsyncWithHttpInfo($plugin = null, string $contentType = self::contentTypes['addPlugin'][0]) + public function addPluginAsyncWithHttpInfo($plugin, string $contentType = self::contentTypes['addPlugin'][0]) { - $returnType = 'object'; + $returnType = '\SeaTable\Client\SysAdmin\AddPlugin200Response'; $request = $this->addPluginRequest($plugin, $contentType); return $this->client @@ -315,15 +315,21 @@ function ($exception) { /** * Create request for operation 'addPlugin' * - * @param \SplFileObject|null $plugin Path and file name to the plugin file. (optional) + * @param \SplFileObject $plugin Path and file name to the plugin file. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['addPlugin'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function addPluginRequest($plugin = null, string $contentType = self::contentTypes['addPlugin'][0]) + public function addPluginRequest($plugin, string $contentType = self::contentTypes['addPlugin'][0]) { + // verify the required parameter 'plugin' is set + if ($plugin === null || (is_array($plugin) && count($plugin) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $plugin when calling addPlugin' + ); + } $resourcePath = '/api/v2.1/admin/dtable-system-plugins/'; @@ -409,7 +415,7 @@ public function addPluginRequest($plugin = null, string $contentType = self::con * * Delete Plugin * - * @param int $plugin_id plugin_id (required) + * @param int $plugin_id The ID of the plugin. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deletePlugin'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -427,7 +433,7 @@ public function deletePlugin($plugin_id, string $contentType = self::contentType * * Delete Plugin * - * @param int $plugin_id (required) + * @param int $plugin_id The ID of the plugin. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deletePlugin'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -512,7 +518,7 @@ public function deletePluginWithHttpInfo($plugin_id, string $contentType = self: * * Delete Plugin * - * @param int $plugin_id (required) + * @param int $plugin_id The ID of the plugin. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deletePlugin'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -533,7 +539,7 @@ function ($response) { * * Delete Plugin * - * @param int $plugin_id (required) + * @param int $plugin_id The ID of the plugin. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deletePlugin'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -583,7 +589,7 @@ function ($exception) { /** * Create request for operation 'deletePlugin' * - * @param int $plugin_id (required) + * @param int $plugin_id The ID of the plugin. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deletePlugin'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1138,13 +1144,13 @@ public function listPluginsInstallCountRequest(string $contentType = self::conte * * Update Plugin * - * @param int $plugin_id plugin_id (required) + * @param int $plugin_id The ID of the plugin. (required) * @param \SplFileObject|null $plugin Path and file name to the plugin file. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updatePlugin'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return object + * @return \SeaTable\Client\SysAdmin\AddPlugin200Response */ public function updatePlugin($plugin_id, $plugin = null, string $contentType = self::contentTypes['updatePlugin'][0]) { @@ -1157,13 +1163,13 @@ public function updatePlugin($plugin_id, $plugin = null, string $contentType = s * * Update Plugin * - * @param int $plugin_id (required) + * @param int $plugin_id The ID of the plugin. (required) * @param \SplFileObject|null $plugin Path and file name to the plugin file. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updatePlugin'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) + * @return array of \SeaTable\Client\SysAdmin\AddPlugin200Response, HTTP status code, HTTP response headers (array of strings) */ public function updatePluginWithHttpInfo($plugin_id, $plugin = null, string $contentType = self::contentTypes['updatePlugin'][0]) { @@ -1195,7 +1201,7 @@ public function updatePluginWithHttpInfo($plugin_id, $plugin = null, string $con switch($statusCode) { case 200: return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\SysAdmin\AddPlugin200Response', $request, $response, ); @@ -1217,7 +1223,7 @@ public function updatePluginWithHttpInfo($plugin_id, $plugin = null, string $con } return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\SysAdmin\AddPlugin200Response', $request, $response, ); @@ -1226,7 +1232,7 @@ public function updatePluginWithHttpInfo($plugin_id, $plugin = null, string $con case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - 'object', + '\SeaTable\Client\SysAdmin\AddPlugin200Response', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1243,7 +1249,7 @@ public function updatePluginWithHttpInfo($plugin_id, $plugin = null, string $con * * Update Plugin * - * @param int $plugin_id (required) + * @param int $plugin_id The ID of the plugin. (required) * @param \SplFileObject|null $plugin Path and file name to the plugin file. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updatePlugin'] to see the possible values for this operation * @@ -1265,7 +1271,7 @@ function ($response) { * * Update Plugin * - * @param int $plugin_id (required) + * @param int $plugin_id The ID of the plugin. (required) * @param \SplFileObject|null $plugin Path and file name to the plugin file. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updatePlugin'] to see the possible values for this operation * @@ -1274,7 +1280,7 @@ function ($response) { */ public function updatePluginAsyncWithHttpInfo($plugin_id, $plugin = null, string $contentType = self::contentTypes['updatePlugin'][0]) { - $returnType = 'object'; + $returnType = '\SeaTable\Client\SysAdmin\AddPlugin200Response'; $request = $this->updatePluginRequest($plugin_id, $plugin, $contentType); return $this->client @@ -1316,7 +1322,7 @@ function ($exception) { /** * Create request for operation 'updatePlugin' * - * @param int $plugin_id (required) + * @param int $plugin_id The ID of the plugin. (required) * @param \SplFileObject|null $plugin Path and file name to the plugin file. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updatePlugin'] to see the possible values for this operation * @@ -1440,6 +1446,14 @@ protected function createHttpClientOption() } } + if ($this->config->getCertFile()) { + $options[RequestOptions::CERT] = $this->config->getCertFile(); + } + + if ($this->config->getKeyFile()) { + $options[RequestOptions::SSL_KEY] = $this->config->getKeyFile(); + } + return $options; } diff --git a/lib/SysAdmin/RepairBase200Response.php b/lib/SysAdmin/RepairBase200Response.php index 32002a3e..6f54bd9f 100644 --- a/lib/SysAdmin/RepairBase200Response.php +++ b/lib/SysAdmin/RepairBase200Response.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -317,11 +317,11 @@ public function setSuccess($success) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -329,12 +329,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -359,11 +359,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/SysAdmin/SearchTeam200Response.php b/lib/SysAdmin/SearchTeam200Response.php new file mode 100644 index 00000000..87859ead --- /dev/null +++ b/lib/SysAdmin/SearchTeam200Response.php @@ -0,0 +1,952 @@ + + */ +class SearchTeam200Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'searchTeam_200_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'org_id' => 'int', + 'org_name' => 'string', + 'ctime' => 'string', + 'org_url_prefix' => 'string', + 'role' => 'string', + 'creator_email' => 'string', + 'creator_name' => 'string', + 'creator_contact_email' => 'string', + 'quota' => 'int', + 'storage_usage' => 'int', + 'storage_quota' => 'int', + 'max_user_number' => 'int', + 'rows_count' => 'int', + 'row_limit' => 'int', + 'users_count' => 'int', + 'active_users_count' => 'int', + 'groups_count' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'org_id' => null, + 'org_name' => null, + 'ctime' => null, + 'org_url_prefix' => null, + 'role' => null, + 'creator_email' => null, + 'creator_name' => null, + 'creator_contact_email' => null, + 'quota' => null, + 'storage_usage' => null, + 'storage_quota' => null, + 'max_user_number' => null, + 'rows_count' => null, + 'row_limit' => null, + 'users_count' => null, + 'active_users_count' => null, + 'groups_count' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'org_id' => false, + 'org_name' => false, + 'ctime' => false, + 'org_url_prefix' => false, + 'role' => false, + 'creator_email' => false, + 'creator_name' => false, + 'creator_contact_email' => false, + 'quota' => false, + 'storage_usage' => false, + 'storage_quota' => false, + 'max_user_number' => false, + 'rows_count' => false, + 'row_limit' => false, + 'users_count' => false, + 'active_users_count' => false, + 'groups_count' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'org_id' => 'org_id', + 'org_name' => 'org_name', + 'ctime' => 'ctime', + 'org_url_prefix' => 'org_url_prefix', + 'role' => 'role', + 'creator_email' => 'creator_email', + 'creator_name' => 'creator_name', + 'creator_contact_email' => 'creator_contact_email', + 'quota' => 'quota', + 'storage_usage' => 'storage_usage', + 'storage_quota' => 'storage_quota', + 'max_user_number' => 'max_user_number', + 'rows_count' => 'rows_count', + 'row_limit' => 'row_limit', + 'users_count' => 'users_count', + 'active_users_count' => 'active_users_count', + 'groups_count' => 'groups_count' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'org_id' => 'setOrgId', + 'org_name' => 'setOrgName', + 'ctime' => 'setCtime', + 'org_url_prefix' => 'setOrgUrlPrefix', + 'role' => 'setRole', + 'creator_email' => 'setCreatorEmail', + 'creator_name' => 'setCreatorName', + 'creator_contact_email' => 'setCreatorContactEmail', + 'quota' => 'setQuota', + 'storage_usage' => 'setStorageUsage', + 'storage_quota' => 'setStorageQuota', + 'max_user_number' => 'setMaxUserNumber', + 'rows_count' => 'setRowsCount', + 'row_limit' => 'setRowLimit', + 'users_count' => 'setUsersCount', + 'active_users_count' => 'setActiveUsersCount', + 'groups_count' => 'setGroupsCount' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'org_id' => 'getOrgId', + 'org_name' => 'getOrgName', + 'ctime' => 'getCtime', + 'org_url_prefix' => 'getOrgUrlPrefix', + 'role' => 'getRole', + 'creator_email' => 'getCreatorEmail', + 'creator_name' => 'getCreatorName', + 'creator_contact_email' => 'getCreatorContactEmail', + 'quota' => 'getQuota', + 'storage_usage' => 'getStorageUsage', + 'storage_quota' => 'getStorageQuota', + 'max_user_number' => 'getMaxUserNumber', + 'rows_count' => 'getRowsCount', + 'row_limit' => 'getRowLimit', + 'users_count' => 'getUsersCount', + 'active_users_count' => 'getActiveUsersCount', + 'groups_count' => 'getGroupsCount' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('org_id', $data ?? [], null); + $this->setIfExists('org_name', $data ?? [], null); + $this->setIfExists('ctime', $data ?? [], null); + $this->setIfExists('org_url_prefix', $data ?? [], null); + $this->setIfExists('role', $data ?? [], null); + $this->setIfExists('creator_email', $data ?? [], null); + $this->setIfExists('creator_name', $data ?? [], null); + $this->setIfExists('creator_contact_email', $data ?? [], null); + $this->setIfExists('quota', $data ?? [], null); + $this->setIfExists('storage_usage', $data ?? [], null); + $this->setIfExists('storage_quota', $data ?? [], null); + $this->setIfExists('max_user_number', $data ?? [], null); + $this->setIfExists('rows_count', $data ?? [], null); + $this->setIfExists('row_limit', $data ?? [], null); + $this->setIfExists('users_count', $data ?? [], null); + $this->setIfExists('active_users_count', $data ?? [], null); + $this->setIfExists('groups_count', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets org_id + * + * @return int|null + */ + public function getOrgId() + { + return $this->container['org_id']; + } + + /** + * Sets org_id + * + * @param int|null $org_id org_id + * + * @return self + */ + public function setOrgId($org_id) + { + if (is_null($org_id)) { + throw new \InvalidArgumentException('non-nullable org_id cannot be null'); + } + $this->container['org_id'] = $org_id; + + return $this; + } + + /** + * Gets org_name + * + * @return string|null + */ + public function getOrgName() + { + return $this->container['org_name']; + } + + /** + * Sets org_name + * + * @param string|null $org_name org_name + * + * @return self + */ + public function setOrgName($org_name) + { + if (is_null($org_name)) { + throw new \InvalidArgumentException('non-nullable org_name cannot be null'); + } + $this->container['org_name'] = $org_name; + + return $this; + } + + /** + * Gets ctime + * + * @return string|null + */ + public function getCtime() + { + return $this->container['ctime']; + } + + /** + * Sets ctime + * + * @param string|null $ctime ctime + * + * @return self + */ + public function setCtime($ctime) + { + if (is_null($ctime)) { + throw new \InvalidArgumentException('non-nullable ctime cannot be null'); + } + $this->container['ctime'] = $ctime; + + return $this; + } + + /** + * Gets org_url_prefix + * + * @return string|null + */ + public function getOrgUrlPrefix() + { + return $this->container['org_url_prefix']; + } + + /** + * Sets org_url_prefix + * + * @param string|null $org_url_prefix org_url_prefix + * + * @return self + */ + public function setOrgUrlPrefix($org_url_prefix) + { + if (is_null($org_url_prefix)) { + throw new \InvalidArgumentException('non-nullable org_url_prefix cannot be null'); + } + $this->container['org_url_prefix'] = $org_url_prefix; + + return $this; + } + + /** + * Gets role + * + * @return string|null + */ + public function getRole() + { + return $this->container['role']; + } + + /** + * Sets role + * + * @param string|null $role role + * + * @return self + */ + public function setRole($role) + { + if (is_null($role)) { + throw new \InvalidArgumentException('non-nullable role cannot be null'); + } + $this->container['role'] = $role; + + return $this; + } + + /** + * Gets creator_email + * + * @return string|null + */ + public function getCreatorEmail() + { + return $this->container['creator_email']; + } + + /** + * Sets creator_email + * + * @param string|null $creator_email creator_email + * + * @return self + */ + public function setCreatorEmail($creator_email) + { + if (is_null($creator_email)) { + throw new \InvalidArgumentException('non-nullable creator_email cannot be null'); + } + $this->container['creator_email'] = $creator_email; + + return $this; + } + + /** + * Gets creator_name + * + * @return string|null + */ + public function getCreatorName() + { + return $this->container['creator_name']; + } + + /** + * Sets creator_name + * + * @param string|null $creator_name creator_name + * + * @return self + */ + public function setCreatorName($creator_name) + { + if (is_null($creator_name)) { + throw new \InvalidArgumentException('non-nullable creator_name cannot be null'); + } + $this->container['creator_name'] = $creator_name; + + return $this; + } + + /** + * Gets creator_contact_email + * + * @return string|null + */ + public function getCreatorContactEmail() + { + return $this->container['creator_contact_email']; + } + + /** + * Sets creator_contact_email + * + * @param string|null $creator_contact_email creator_contact_email + * + * @return self + */ + public function setCreatorContactEmail($creator_contact_email) + { + if (is_null($creator_contact_email)) { + throw new \InvalidArgumentException('non-nullable creator_contact_email cannot be null'); + } + $this->container['creator_contact_email'] = $creator_contact_email; + + return $this; + } + + /** + * Gets quota + * + * @return int|null + */ + public function getQuota() + { + return $this->container['quota']; + } + + /** + * Sets quota + * + * @param int|null $quota quota + * + * @return self + */ + public function setQuota($quota) + { + if (is_null($quota)) { + throw new \InvalidArgumentException('non-nullable quota cannot be null'); + } + $this->container['quota'] = $quota; + + return $this; + } + + /** + * Gets storage_usage + * + * @return int|null + */ + public function getStorageUsage() + { + return $this->container['storage_usage']; + } + + /** + * Sets storage_usage + * + * @param int|null $storage_usage storage_usage + * + * @return self + */ + public function setStorageUsage($storage_usage) + { + if (is_null($storage_usage)) { + throw new \InvalidArgumentException('non-nullable storage_usage cannot be null'); + } + $this->container['storage_usage'] = $storage_usage; + + return $this; + } + + /** + * Gets storage_quota + * + * @return int|null + */ + public function getStorageQuota() + { + return $this->container['storage_quota']; + } + + /** + * Sets storage_quota + * + * @param int|null $storage_quota storage_quota + * + * @return self + */ + public function setStorageQuota($storage_quota) + { + if (is_null($storage_quota)) { + throw new \InvalidArgumentException('non-nullable storage_quota cannot be null'); + } + $this->container['storage_quota'] = $storage_quota; + + return $this; + } + + /** + * Gets max_user_number + * + * @return int|null + */ + public function getMaxUserNumber() + { + return $this->container['max_user_number']; + } + + /** + * Sets max_user_number + * + * @param int|null $max_user_number max_user_number + * + * @return self + */ + public function setMaxUserNumber($max_user_number) + { + if (is_null($max_user_number)) { + throw new \InvalidArgumentException('non-nullable max_user_number cannot be null'); + } + $this->container['max_user_number'] = $max_user_number; + + return $this; + } + + /** + * Gets rows_count + * + * @return int|null + */ + public function getRowsCount() + { + return $this->container['rows_count']; + } + + /** + * Sets rows_count + * + * @param int|null $rows_count rows_count + * + * @return self + */ + public function setRowsCount($rows_count) + { + if (is_null($rows_count)) { + throw new \InvalidArgumentException('non-nullable rows_count cannot be null'); + } + $this->container['rows_count'] = $rows_count; + + return $this; + } + + /** + * Gets row_limit + * + * @return int|null + */ + public function getRowLimit() + { + return $this->container['row_limit']; + } + + /** + * Sets row_limit + * + * @param int|null $row_limit row_limit + * + * @return self + */ + public function setRowLimit($row_limit) + { + if (is_null($row_limit)) { + throw new \InvalidArgumentException('non-nullable row_limit cannot be null'); + } + $this->container['row_limit'] = $row_limit; + + return $this; + } + + /** + * Gets users_count + * + * @return int|null + */ + public function getUsersCount() + { + return $this->container['users_count']; + } + + /** + * Sets users_count + * + * @param int|null $users_count users_count + * + * @return self + */ + public function setUsersCount($users_count) + { + if (is_null($users_count)) { + throw new \InvalidArgumentException('non-nullable users_count cannot be null'); + } + $this->container['users_count'] = $users_count; + + return $this; + } + + /** + * Gets active_users_count + * + * @return int|null + */ + public function getActiveUsersCount() + { + return $this->container['active_users_count']; + } + + /** + * Sets active_users_count + * + * @param int|null $active_users_count active_users_count + * + * @return self + */ + public function setActiveUsersCount($active_users_count) + { + if (is_null($active_users_count)) { + throw new \InvalidArgumentException('non-nullable active_users_count cannot be null'); + } + $this->container['active_users_count'] = $active_users_count; + + return $this; + } + + /** + * Gets groups_count + * + * @return int|null + */ + public function getGroupsCount() + { + return $this->container['groups_count']; + } + + /** + * Sets groups_count + * + * @param int|null $groups_count groups_count + * + * @return self + */ + public function setGroupsCount($groups_count) + { + if (is_null($groups_count)) { + throw new \InvalidArgumentException('non-nullable groups_count cannot be null'); + } + $this->container['groups_count'] = $groups_count; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/SysAdmin/SharingLinksApi.php b/lib/SysAdmin/SharingLinksApi.php index 9cb4d687..98e3aafe 100644 --- a/lib/SysAdmin/SharingLinksApi.php +++ b/lib/SysAdmin/SharingLinksApi.php @@ -14,7 +14,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -141,7 +141,7 @@ public function getConfig() * * Delete Base External Link * - * @param string $external_link_token external_link_token (required) + * @param string $external_link_token The token of the external link. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteBaseExternalLink'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -159,7 +159,7 @@ public function deleteBaseExternalLink($external_link_token, string $contentType * * Delete Base External Link * - * @param string $external_link_token (required) + * @param string $external_link_token The token of the external link. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteBaseExternalLink'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -244,7 +244,7 @@ public function deleteBaseExternalLinkWithHttpInfo($external_link_token, string * * Delete Base External Link * - * @param string $external_link_token (required) + * @param string $external_link_token The token of the external link. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteBaseExternalLink'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -265,7 +265,7 @@ function ($response) { * * Delete Base External Link * - * @param string $external_link_token (required) + * @param string $external_link_token The token of the external link. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteBaseExternalLink'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -315,7 +315,7 @@ function ($exception) { /** * Create request for operation 'deleteBaseExternalLink' * - * @param string $external_link_token (required) + * @param string $external_link_token The token of the external link. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteBaseExternalLink'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -413,7 +413,7 @@ public function deleteBaseExternalLinkRequest($external_link_token, string $cont * * Delete View External Link * - * @param string $view_external_link_token view_external_link_token (required) + * @param string $view_external_link_token The token of the view external link. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteViewExternalLink'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -431,7 +431,7 @@ public function deleteViewExternalLink($view_external_link_token, string $conten * * Delete View External Link * - * @param string $view_external_link_token (required) + * @param string $view_external_link_token The token of the view external link. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteViewExternalLink'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -516,7 +516,7 @@ public function deleteViewExternalLinkWithHttpInfo($view_external_link_token, st * * Delete View External Link * - * @param string $view_external_link_token (required) + * @param string $view_external_link_token The token of the view external link. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteViewExternalLink'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -537,7 +537,7 @@ function ($response) { * * Delete View External Link * - * @param string $view_external_link_token (required) + * @param string $view_external_link_token The token of the view external link. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteViewExternalLink'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -587,7 +587,7 @@ function ($exception) { /** * Create request for operation 'deleteViewExternalLink' * - * @param string $view_external_link_token (required) + * @param string $view_external_link_token The token of the view external link. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteViewExternalLink'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -602,10 +602,7 @@ public function deleteViewExternalLinkRequest($view_external_link_token, string 'Missing the required parameter $view_external_link_token when calling deleteViewExternalLink' ); } - if (!preg_match("/^[a-f0-9]{20}$/", $view_external_link_token)) { - throw new \InvalidArgumentException("invalid value for \"view_external_link_token\" when calling SharingLinksApi.deleteViewExternalLink, must conform to the pattern /^[a-f0-9]{20}$/."); - } - + $resourcePath = '/api/v2.1/admin/view-external-links/{view_external_link_token}/'; $formParams = []; @@ -1511,6 +1508,14 @@ protected function createHttpClientOption() } } + if ($this->config->getCertFile()) { + $options[RequestOptions::CERT] = $this->config->getCertFile(); + } + + if ($this->config->getKeyFile()) { + $options[RequestOptions::SSL_KEY] = $this->config->getKeyFile(); + } + return $options; } diff --git a/lib/SysAdmin/StatisticsApi.php b/lib/SysAdmin/StatisticsApi.php index 8a2a500f..925db499 100644 --- a/lib/SysAdmin/StatisticsApi.php +++ b/lib/SysAdmin/StatisticsApi.php @@ -14,7 +14,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -82,6 +82,9 @@ class StatisticsApi 'getExternalApps' => [ 'application/json', ], + 'getOwnerOrTeamAIStatistics' => [ + 'application/json', + ], 'getScriptRunningCountByUser' => [ 'application/json', ], @@ -988,6 +991,336 @@ public function getExternalAppsRequest($is_user, $month = null, $page = null, $p + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getOwnerOrTeamAIStatistics + * + * Get AI Statistics by Owner/Team + * + * @param string $group_by Query by owner or organization (required) + * @param string $date A date string in YYYY-MM-DD format (required) + * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) + * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getOwnerOrTeamAIStatistics'] to see the possible values for this operation + * + * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return object + */ + public function getOwnerOrTeamAIStatistics($group_by, $date, $page = null, $per_page = null, string $contentType = self::contentTypes['getOwnerOrTeamAIStatistics'][0]) + { + list($response) = $this->getOwnerOrTeamAIStatisticsWithHttpInfo($group_by, $date, $page, $per_page, $contentType); + return $response; + } + + /** + * Operation getOwnerOrTeamAIStatisticsWithHttpInfo + * + * Get AI Statistics by Owner/Team + * + * @param string $group_by Query by owner or organization (required) + * @param string $date A date string in YYYY-MM-DD format (required) + * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) + * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getOwnerOrTeamAIStatistics'] to see the possible values for this operation + * + * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of object, HTTP status code, HTTP response headers (array of strings) + */ + public function getOwnerOrTeamAIStatisticsWithHttpInfo($group_by, $date, $page = null, $per_page = null, string $contentType = self::contentTypes['getOwnerOrTeamAIStatistics'][0]) + { + $request = $this->getOwnerOrTeamAIStatisticsRequest($group_by, $date, $page, $per_page, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + 'object', + $request, + $response, + ); + } + + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + 'object', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + 'object', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + + throw $e; + } + } + + /** + * Operation getOwnerOrTeamAIStatisticsAsync + * + * Get AI Statistics by Owner/Team + * + * @param string $group_by Query by owner or organization (required) + * @param string $date A date string in YYYY-MM-DD format (required) + * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) + * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getOwnerOrTeamAIStatistics'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getOwnerOrTeamAIStatisticsAsync($group_by, $date, $page = null, $per_page = null, string $contentType = self::contentTypes['getOwnerOrTeamAIStatistics'][0]) + { + return $this->getOwnerOrTeamAIStatisticsAsyncWithHttpInfo($group_by, $date, $page, $per_page, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getOwnerOrTeamAIStatisticsAsyncWithHttpInfo + * + * Get AI Statistics by Owner/Team + * + * @param string $group_by Query by owner or organization (required) + * @param string $date A date string in YYYY-MM-DD format (required) + * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) + * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getOwnerOrTeamAIStatistics'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getOwnerOrTeamAIStatisticsAsyncWithHttpInfo($group_by, $date, $page = null, $per_page = null, string $contentType = self::contentTypes['getOwnerOrTeamAIStatistics'][0]) + { + $returnType = 'object'; + $request = $this->getOwnerOrTeamAIStatisticsRequest($group_by, $date, $page, $per_page, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getOwnerOrTeamAIStatistics' + * + * @param string $group_by Query by owner or organization (required) + * @param string $date A date string in YYYY-MM-DD format (required) + * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) + * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getOwnerOrTeamAIStatistics'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getOwnerOrTeamAIStatisticsRequest($group_by, $date, $page = null, $per_page = null, string $contentType = self::contentTypes['getOwnerOrTeamAIStatistics'][0]) + { + + // verify the required parameter 'group_by' is set + if ($group_by === null || (is_array($group_by) && count($group_by) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $group_by when calling getOwnerOrTeamAIStatistics' + ); + } + + // verify the required parameter 'date' is set + if ($date === null || (is_array($date) && count($date) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $date when calling getOwnerOrTeamAIStatistics' + ); + } + + if ($page !== null && $page < 1) { + throw new \InvalidArgumentException('invalid value for "$page" when calling StatisticsApi.getOwnerOrTeamAIStatistics, must be bigger than or equal to 1.'); + } + + if ($per_page !== null && $per_page < 1) { + throw new \InvalidArgumentException('invalid value for "$per_page" when calling StatisticsApi.getOwnerOrTeamAIStatistics, must be bigger than or equal to 1.'); + } + + + $resourcePath = '/api/v2.1/admin/statistics/ai/'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $group_by, + 'group_by', // param base name + 'string', // openApiType + 'form', // style + true, // explode + true // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $date, + 'date', // param base name + 'string', // openApiType + 'form', // style + true, // explode + true // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $page, + 'page', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $per_page, + 'per_page', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + + + + $headers = $this->headerSelector->selectHeaders( ['application/json', ], $contentType, @@ -1366,7 +1699,7 @@ public function getScriptRunningCountByUserRequest($is_user, $owner = null, $mon * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return object + * @return \SeaTable\Client\SysAdmin\ListActiveUsersByDay200Response */ public function listActiveUsersByDay($date = null, $page = null, $per_page = null, string $contentType = self::contentTypes['listActiveUsersByDay'][0]) { @@ -1386,7 +1719,7 @@ public function listActiveUsersByDay($date = null, $page = null, $per_page = nul * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) + * @return array of \SeaTable\Client\SysAdmin\ListActiveUsersByDay200Response, HTTP status code, HTTP response headers (array of strings) */ public function listActiveUsersByDayWithHttpInfo($date = null, $page = null, $per_page = null, string $contentType = self::contentTypes['listActiveUsersByDay'][0]) { @@ -1418,7 +1751,7 @@ public function listActiveUsersByDayWithHttpInfo($date = null, $page = null, $pe switch($statusCode) { case 200: return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\SysAdmin\ListActiveUsersByDay200Response', $request, $response, ); @@ -1440,7 +1773,7 @@ public function listActiveUsersByDayWithHttpInfo($date = null, $page = null, $pe } return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\SysAdmin\ListActiveUsersByDay200Response', $request, $response, ); @@ -1449,7 +1782,7 @@ public function listActiveUsersByDayWithHttpInfo($date = null, $page = null, $pe case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - 'object', + '\SeaTable\Client\SysAdmin\ListActiveUsersByDay200Response', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1499,7 +1832,7 @@ function ($response) { */ public function listActiveUsersByDayAsyncWithHttpInfo($date = null, $page = null, $per_page = null, string $contentType = self::contentTypes['listActiveUsersByDay'][0]) { - $returnType = 'object'; + $returnType = '\SeaTable\Client\SysAdmin\ListActiveUsersByDay200Response'; $request = $this->listActiveUsersByDayRequest($date, $page, $per_page, $contentType); return $this->client @@ -1964,6 +2297,14 @@ protected function createHttpClientOption() } } + if ($this->config->getCertFile()) { + $options[RequestOptions::CERT] = $this->config->getCertFile(); + } + + if ($this->config->getKeyFile()) { + $options[RequestOptions::SSL_KEY] = $this->config->getKeyFile(); + } + return $options; } diff --git a/lib/SysAdmin/SystemInfoCustomizingApi.php b/lib/SysAdmin/SystemInfoCustomizingApi.php index c4277dc8..1bc2096b 100644 --- a/lib/SysAdmin/SystemInfoCustomizingApi.php +++ b/lib/SysAdmin/SystemInfoCustomizingApi.php @@ -14,7 +14,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -139,13 +139,13 @@ public function getConfig() /** * Operation getSystemInformation * - * Get system information + * Get System Information * * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getSystemInformation'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return object + * @return \SeaTable\Client\SysAdmin\GetSystemInformation200Response */ public function getSystemInformation(string $contentType = self::contentTypes['getSystemInformation'][0]) { @@ -156,13 +156,13 @@ public function getSystemInformation(string $contentType = self::contentTypes['g /** * Operation getSystemInformationWithHttpInfo * - * Get system information + * Get System Information * * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getSystemInformation'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) + * @return array of \SeaTable\Client\SysAdmin\GetSystemInformation200Response, HTTP status code, HTTP response headers (array of strings) */ public function getSystemInformationWithHttpInfo(string $contentType = self::contentTypes['getSystemInformation'][0]) { @@ -194,7 +194,7 @@ public function getSystemInformationWithHttpInfo(string $contentType = self::con switch($statusCode) { case 200: return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\SysAdmin\GetSystemInformation200Response', $request, $response, ); @@ -216,7 +216,7 @@ public function getSystemInformationWithHttpInfo(string $contentType = self::con } return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\SysAdmin\GetSystemInformation200Response', $request, $response, ); @@ -225,7 +225,7 @@ public function getSystemInformationWithHttpInfo(string $contentType = self::con case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - 'object', + '\SeaTable\Client\SysAdmin\GetSystemInformation200Response', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -240,7 +240,7 @@ public function getSystemInformationWithHttpInfo(string $contentType = self::con /** * Operation getSystemInformationAsync * - * Get system information + * Get System Information * * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getSystemInformation'] to see the possible values for this operation * @@ -260,7 +260,7 @@ function ($response) { /** * Operation getSystemInformationAsyncWithHttpInfo * - * Get system information + * Get System Information * * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getSystemInformation'] to see the possible values for this operation * @@ -269,7 +269,7 @@ function ($response) { */ public function getSystemInformationAsyncWithHttpInfo(string $contentType = self::contentTypes['getSystemInformation'][0]) { - $returnType = 'object'; + $returnType = '\SeaTable\Client\SysAdmin\GetSystemInformation200Response'; $request = $this->getSystemInformationRequest($contentType); return $this->client @@ -393,7 +393,7 @@ public function getSystemInformationRequest(string $contentType = self::contentT * * Update Favicon * - * @param \SplFileObject|null $favicon The path and filename of the image file of your favicon. (optional) + * @param \SplFileObject $favicon The path and filename of the image file of your favicon. (required) * @param bool|null $with_notify Leave this param as its default (`false`) to upload your favicon, and use this param as `true` to upload a favicon with a notification sign. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateFavicon'] to see the possible values for this operation * @@ -401,7 +401,7 @@ public function getSystemInformationRequest(string $contentType = self::contentT * @throws \InvalidArgumentException * @return object */ - public function updateFavicon($favicon = null, $with_notify = null, string $contentType = self::contentTypes['updateFavicon'][0]) + public function updateFavicon($favicon, $with_notify = null, string $contentType = self::contentTypes['updateFavicon'][0]) { list($response) = $this->updateFaviconWithHttpInfo($favicon, $with_notify, $contentType); return $response; @@ -412,7 +412,7 @@ public function updateFavicon($favicon = null, $with_notify = null, string $cont * * Update Favicon * - * @param \SplFileObject|null $favicon The path and filename of the image file of your favicon. (optional) + * @param \SplFileObject $favicon The path and filename of the image file of your favicon. (required) * @param bool|null $with_notify Leave this param as its default (`false`) to upload your favicon, and use this param as `true` to upload a favicon with a notification sign. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateFavicon'] to see the possible values for this operation * @@ -420,7 +420,7 @@ public function updateFavicon($favicon = null, $with_notify = null, string $cont * @throws \InvalidArgumentException * @return array of object, HTTP status code, HTTP response headers (array of strings) */ - public function updateFaviconWithHttpInfo($favicon = null, $with_notify = null, string $contentType = self::contentTypes['updateFavicon'][0]) + public function updateFaviconWithHttpInfo($favicon, $with_notify = null, string $contentType = self::contentTypes['updateFavicon'][0]) { $request = $this->updateFaviconRequest($favicon, $with_notify, $contentType); @@ -498,14 +498,14 @@ public function updateFaviconWithHttpInfo($favicon = null, $with_notify = null, * * Update Favicon * - * @param \SplFileObject|null $favicon The path and filename of the image file of your favicon. (optional) + * @param \SplFileObject $favicon The path and filename of the image file of your favicon. (required) * @param bool|null $with_notify Leave this param as its default (`false`) to upload your favicon, and use this param as `true` to upload a favicon with a notification sign. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateFavicon'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateFaviconAsync($favicon = null, $with_notify = null, string $contentType = self::contentTypes['updateFavicon'][0]) + public function updateFaviconAsync($favicon, $with_notify = null, string $contentType = self::contentTypes['updateFavicon'][0]) { return $this->updateFaviconAsyncWithHttpInfo($favicon, $with_notify, $contentType) ->then( @@ -520,14 +520,14 @@ function ($response) { * * Update Favicon * - * @param \SplFileObject|null $favicon The path and filename of the image file of your favicon. (optional) + * @param \SplFileObject $favicon The path and filename of the image file of your favicon. (required) * @param bool|null $with_notify Leave this param as its default (`false`) to upload your favicon, and use this param as `true` to upload a favicon with a notification sign. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateFavicon'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateFaviconAsyncWithHttpInfo($favicon = null, $with_notify = null, string $contentType = self::contentTypes['updateFavicon'][0]) + public function updateFaviconAsyncWithHttpInfo($favicon, $with_notify = null, string $contentType = self::contentTypes['updateFavicon'][0]) { $returnType = 'object'; $request = $this->updateFaviconRequest($favicon, $with_notify, $contentType); @@ -571,16 +571,22 @@ function ($exception) { /** * Create request for operation 'updateFavicon' * - * @param \SplFileObject|null $favicon The path and filename of the image file of your favicon. (optional) + * @param \SplFileObject $favicon The path and filename of the image file of your favicon. (required) * @param bool|null $with_notify Leave this param as its default (`false`) to upload your favicon, and use this param as `true` to upload a favicon with a notification sign. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateFavicon'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function updateFaviconRequest($favicon = null, $with_notify = null, string $contentType = self::contentTypes['updateFavicon'][0]) + public function updateFaviconRequest($favicon, $with_notify = null, string $contentType = self::contentTypes['updateFavicon'][0]) { + // verify the required parameter 'favicon' is set + if ($favicon === null || (is_array($favicon) && count($favicon) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $favicon when calling updateFavicon' + ); + } @@ -673,7 +679,7 @@ public function updateFaviconRequest($favicon = null, $with_notify = null, strin * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return object + * @return \SeaTable\Client\SysAdmin\UpdateGeneralSettings200Response */ public function updateGeneralSettings($update_general_settings_request = null, string $contentType = self::contentTypes['updateGeneralSettings'][0]) { @@ -691,7 +697,7 @@ public function updateGeneralSettings($update_general_settings_request = null, s * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) + * @return array of \SeaTable\Client\SysAdmin\UpdateGeneralSettings200Response, HTTP status code, HTTP response headers (array of strings) */ public function updateGeneralSettingsWithHttpInfo($update_general_settings_request = null, string $contentType = self::contentTypes['updateGeneralSettings'][0]) { @@ -723,7 +729,7 @@ public function updateGeneralSettingsWithHttpInfo($update_general_settings_reque switch($statusCode) { case 200: return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\SysAdmin\UpdateGeneralSettings200Response', $request, $response, ); @@ -745,7 +751,7 @@ public function updateGeneralSettingsWithHttpInfo($update_general_settings_reque } return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\SysAdmin\UpdateGeneralSettings200Response', $request, $response, ); @@ -754,7 +760,7 @@ public function updateGeneralSettingsWithHttpInfo($update_general_settings_reque case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - 'object', + '\SeaTable\Client\SysAdmin\UpdateGeneralSettings200Response', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -800,7 +806,7 @@ function ($response) { */ public function updateGeneralSettingsAsyncWithHttpInfo($update_general_settings_request = null, string $contentType = self::contentTypes['updateGeneralSettings'][0]) { - $returnType = 'object'; + $returnType = '\SeaTable\Client\SysAdmin\UpdateGeneralSettings200Response'; $request = $this->updateGeneralSettingsRequest($update_general_settings_request, $contentType); return $this->client @@ -933,14 +939,14 @@ public function updateGeneralSettingsRequest($update_general_settings_request = * * Update Login Background Image * - * @param \SplFileObject|null $login_bg_image The path and filename of the background image. (optional) + * @param \SplFileObject $login_bg_image The path and filename of the background image. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateLoginBackgroundImage'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return object */ - public function updateLoginBackgroundImage($login_bg_image = null, string $contentType = self::contentTypes['updateLoginBackgroundImage'][0]) + public function updateLoginBackgroundImage($login_bg_image, string $contentType = self::contentTypes['updateLoginBackgroundImage'][0]) { list($response) = $this->updateLoginBackgroundImageWithHttpInfo($login_bg_image, $contentType); return $response; @@ -951,14 +957,14 @@ public function updateLoginBackgroundImage($login_bg_image = null, string $conte * * Update Login Background Image * - * @param \SplFileObject|null $login_bg_image The path and filename of the background image. (optional) + * @param \SplFileObject $login_bg_image The path and filename of the background image. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateLoginBackgroundImage'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of object, HTTP status code, HTTP response headers (array of strings) */ - public function updateLoginBackgroundImageWithHttpInfo($login_bg_image = null, string $contentType = self::contentTypes['updateLoginBackgroundImage'][0]) + public function updateLoginBackgroundImageWithHttpInfo($login_bg_image, string $contentType = self::contentTypes['updateLoginBackgroundImage'][0]) { $request = $this->updateLoginBackgroundImageRequest($login_bg_image, $contentType); @@ -1036,13 +1042,13 @@ public function updateLoginBackgroundImageWithHttpInfo($login_bg_image = null, s * * Update Login Background Image * - * @param \SplFileObject|null $login_bg_image The path and filename of the background image. (optional) + * @param \SplFileObject $login_bg_image The path and filename of the background image. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateLoginBackgroundImage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateLoginBackgroundImageAsync($login_bg_image = null, string $contentType = self::contentTypes['updateLoginBackgroundImage'][0]) + public function updateLoginBackgroundImageAsync($login_bg_image, string $contentType = self::contentTypes['updateLoginBackgroundImage'][0]) { return $this->updateLoginBackgroundImageAsyncWithHttpInfo($login_bg_image, $contentType) ->then( @@ -1057,13 +1063,13 @@ function ($response) { * * Update Login Background Image * - * @param \SplFileObject|null $login_bg_image The path and filename of the background image. (optional) + * @param \SplFileObject $login_bg_image The path and filename of the background image. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateLoginBackgroundImage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateLoginBackgroundImageAsyncWithHttpInfo($login_bg_image = null, string $contentType = self::contentTypes['updateLoginBackgroundImage'][0]) + public function updateLoginBackgroundImageAsyncWithHttpInfo($login_bg_image, string $contentType = self::contentTypes['updateLoginBackgroundImage'][0]) { $returnType = 'object'; $request = $this->updateLoginBackgroundImageRequest($login_bg_image, $contentType); @@ -1107,15 +1113,21 @@ function ($exception) { /** * Create request for operation 'updateLoginBackgroundImage' * - * @param \SplFileObject|null $login_bg_image The path and filename of the background image. (optional) + * @param \SplFileObject $login_bg_image The path and filename of the background image. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateLoginBackgroundImage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function updateLoginBackgroundImageRequest($login_bg_image = null, string $contentType = self::contentTypes['updateLoginBackgroundImage'][0]) + public function updateLoginBackgroundImageRequest($login_bg_image, string $contentType = self::contentTypes['updateLoginBackgroundImage'][0]) { + // verify the required parameter 'login_bg_image' is set + if ($login_bg_image === null || (is_array($login_bg_image) && count($login_bg_image) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $login_bg_image when calling updateLoginBackgroundImage' + ); + } $resourcePath = '/api/v2.1/admin/login-background-image/'; @@ -1201,14 +1213,14 @@ public function updateLoginBackgroundImageRequest($login_bg_image = null, string * * Update Logo * - * @param \SplFileObject|null $logo The path and filename of the image file of your logo. (optional) + * @param \SplFileObject $logo The path and filename of the image file of your logo. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateLogo'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return object */ - public function updateLogo($logo = null, string $contentType = self::contentTypes['updateLogo'][0]) + public function updateLogo($logo, string $contentType = self::contentTypes['updateLogo'][0]) { list($response) = $this->updateLogoWithHttpInfo($logo, $contentType); return $response; @@ -1219,14 +1231,14 @@ public function updateLogo($logo = null, string $contentType = self::contentType * * Update Logo * - * @param \SplFileObject|null $logo The path and filename of the image file of your logo. (optional) + * @param \SplFileObject $logo The path and filename of the image file of your logo. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateLogo'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of object, HTTP status code, HTTP response headers (array of strings) */ - public function updateLogoWithHttpInfo($logo = null, string $contentType = self::contentTypes['updateLogo'][0]) + public function updateLogoWithHttpInfo($logo, string $contentType = self::contentTypes['updateLogo'][0]) { $request = $this->updateLogoRequest($logo, $contentType); @@ -1304,13 +1316,13 @@ public function updateLogoWithHttpInfo($logo = null, string $contentType = self: * * Update Logo * - * @param \SplFileObject|null $logo The path and filename of the image file of your logo. (optional) + * @param \SplFileObject $logo The path and filename of the image file of your logo. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateLogo'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateLogoAsync($logo = null, string $contentType = self::contentTypes['updateLogo'][0]) + public function updateLogoAsync($logo, string $contentType = self::contentTypes['updateLogo'][0]) { return $this->updateLogoAsyncWithHttpInfo($logo, $contentType) ->then( @@ -1325,13 +1337,13 @@ function ($response) { * * Update Logo * - * @param \SplFileObject|null $logo The path and filename of the image file of your logo. (optional) + * @param \SplFileObject $logo The path and filename of the image file of your logo. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateLogo'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateLogoAsyncWithHttpInfo($logo = null, string $contentType = self::contentTypes['updateLogo'][0]) + public function updateLogoAsyncWithHttpInfo($logo, string $contentType = self::contentTypes['updateLogo'][0]) { $returnType = 'object'; $request = $this->updateLogoRequest($logo, $contentType); @@ -1375,15 +1387,21 @@ function ($exception) { /** * Create request for operation 'updateLogo' * - * @param \SplFileObject|null $logo The path and filename of the image file of your logo. (optional) + * @param \SplFileObject $logo The path and filename of the image file of your logo. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateLogo'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function updateLogoRequest($logo = null, string $contentType = self::contentTypes['updateLogo'][0]) + public function updateLogoRequest($logo, string $contentType = self::contentTypes['updateLogo'][0]) { + // verify the required parameter 'logo' is set + if ($logo === null || (is_array($logo) && count($logo) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $logo when calling updateLogo' + ); + } $resourcePath = '/api/v2.1/admin/logo/'; @@ -1480,6 +1498,14 @@ protected function createHttpClientOption() } } + if ($this->config->getCertFile()) { + $options[RequestOptions::CERT] = $this->config->getCertFile(); + } + + if ($this->config->getKeyFile()) { + $options[RequestOptions::SSL_KEY] = $this->config->getKeyFile(); + } + return $options; } diff --git a/lib/SysAdmin/SystemNotificationsApi.php b/lib/SysAdmin/SystemNotificationsApi.php index 811f69ae..edbb4df9 100644 --- a/lib/SysAdmin/SystemNotificationsApi.php +++ b/lib/SysAdmin/SystemNotificationsApi.php @@ -14,7 +14,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -400,7 +400,7 @@ public function addNotificationToUserRequest($add_notification_to_user_request = * * Delete Notification * - * @param int $sys_notification_id sys_notification_id (required) + * @param int $sys_notification_id The ID of the system notification. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteNotification'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -418,7 +418,7 @@ public function deleteNotification($sys_notification_id, string $contentType = s * * Delete Notification * - * @param int $sys_notification_id (required) + * @param int $sys_notification_id The ID of the system notification. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteNotification'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -503,7 +503,7 @@ public function deleteNotificationWithHttpInfo($sys_notification_id, string $con * * Delete Notification * - * @param int $sys_notification_id (required) + * @param int $sys_notification_id The ID of the system notification. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteNotification'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -524,7 +524,7 @@ function ($response) { * * Delete Notification * - * @param int $sys_notification_id (required) + * @param int $sys_notification_id The ID of the system notification. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteNotification'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -574,7 +574,7 @@ function ($exception) { /** * Create request for operation 'deleteNotification' * - * @param int $sys_notification_id (required) + * @param int $sys_notification_id The ID of the system notification. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteNotification'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -971,6 +971,14 @@ protected function createHttpClientOption() } } + if ($this->config->getCertFile()) { + $options[RequestOptions::CERT] = $this->config->getCertFile(); + } + + if ($this->config->getKeyFile()) { + $options[RequestOptions::SSL_KEY] = $this->config->getKeyFile(); + } + return $options; } diff --git a/lib/SysAdmin/TeamsApi.php b/lib/SysAdmin/TeamsApi.php index ad4e1cd1..53719ba4 100644 --- a/lib/SysAdmin/TeamsApi.php +++ b/lib/SysAdmin/TeamsApi.php @@ -14,7 +14,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -170,7 +170,7 @@ public function getConfig() * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return object + * @return \SeaTable\Client\SysAdmin\AddTeam200Response */ public function addTeam($add_team_request = null, string $contentType = self::contentTypes['addTeam'][0]) { @@ -188,7 +188,7 @@ public function addTeam($add_team_request = null, string $contentType = self::co * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) + * @return array of \SeaTable\Client\SysAdmin\AddTeam200Response, HTTP status code, HTTP response headers (array of strings) */ public function addTeamWithHttpInfo($add_team_request = null, string $contentType = self::contentTypes['addTeam'][0]) { @@ -220,7 +220,7 @@ public function addTeamWithHttpInfo($add_team_request = null, string $contentTyp switch($statusCode) { case 200: return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\SysAdmin\AddTeam200Response', $request, $response, ); @@ -242,7 +242,7 @@ public function addTeamWithHttpInfo($add_team_request = null, string $contentTyp } return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\SysAdmin\AddTeam200Response', $request, $response, ); @@ -251,7 +251,7 @@ public function addTeamWithHttpInfo($add_team_request = null, string $contentTyp case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - 'object', + '\SeaTable\Client\SysAdmin\AddTeam200Response', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -297,7 +297,7 @@ function ($response) { */ public function addTeamAsyncWithHttpInfo($add_team_request = null, string $contentType = self::contentTypes['addTeam'][0]) { - $returnType = 'object'; + $returnType = '\SeaTable\Client\SysAdmin\AddTeam200Response'; $request = $this->addTeamRequest($add_team_request, $contentType); return $this->client @@ -439,7 +439,7 @@ public function addTeamRequest($add_team_request = null, string $contentType = s * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return object + * @return \SeaTable\Client\SysAdmin\AddTeamUser200Response */ public function addTeamUser($org_id, $email, $password, $name = null, $with_workspace = null, string $contentType = self::contentTypes['addTeamUser'][0]) { @@ -461,7 +461,7 @@ public function addTeamUser($org_id, $email, $password, $name = null, $with_work * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) + * @return array of \SeaTable\Client\SysAdmin\AddTeamUser200Response, HTTP status code, HTTP response headers (array of strings) */ public function addTeamUserWithHttpInfo($org_id, $email, $password, $name = null, $with_workspace = null, string $contentType = self::contentTypes['addTeamUser'][0]) { @@ -493,7 +493,7 @@ public function addTeamUserWithHttpInfo($org_id, $email, $password, $name = null switch($statusCode) { case 200: return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\SysAdmin\AddTeamUser200Response', $request, $response, ); @@ -515,7 +515,7 @@ public function addTeamUserWithHttpInfo($org_id, $email, $password, $name = null } return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\SysAdmin\AddTeamUser200Response', $request, $response, ); @@ -524,7 +524,7 @@ public function addTeamUserWithHttpInfo($org_id, $email, $password, $name = null case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - 'object', + '\SeaTable\Client\SysAdmin\AddTeamUser200Response', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -578,7 +578,7 @@ function ($response) { */ public function addTeamUserAsyncWithHttpInfo($org_id, $email, $password, $name = null, $with_workspace = null, string $contentType = self::contentTypes['addTeamUser'][0]) { - $returnType = 'object'; + $returnType = '\SeaTable\Client\SysAdmin\AddTeamUser200Response'; $request = $this->addTeamUserRequest($org_id, $email, $password, $name, $with_workspace, $contentType); return $this->client @@ -1030,7 +1030,7 @@ public function deleteTeamRequest($org_id, string $contentType = self::contentTy * Delete Group * * @param int $org_id The id of your team/organization. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) - * @param int $group_id group_id (required) + * @param int $group_id The ID of the group. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteTeamGroup'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -1049,7 +1049,7 @@ public function deleteTeamGroup($org_id, $group_id, string $contentType = self:: * Delete Group * * @param int $org_id The id of your team/organization. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) - * @param int $group_id (required) + * @param int $group_id The ID of the group. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteTeamGroup'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -1135,7 +1135,7 @@ public function deleteTeamGroupWithHttpInfo($org_id, $group_id, string $contentT * Delete Group * * @param int $org_id The id of your team/organization. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) - * @param int $group_id (required) + * @param int $group_id The ID of the group. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteTeamGroup'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1157,7 +1157,7 @@ function ($response) { * Delete Group * * @param int $org_id The id of your team/organization. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) - * @param int $group_id (required) + * @param int $group_id The ID of the group. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteTeamGroup'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1208,7 +1208,7 @@ function ($exception) { * Create request for operation 'deleteTeamGroup' * * @param int $org_id The id of your team/organization. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) - * @param int $group_id (required) + * @param int $group_id The ID of the group. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteTeamGroup'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1625,16 +1625,17 @@ public function deleteTeamUserRequest($org_id, $user_id, string $contentType = s * * Get Organization Names * - * @param string[]|null $org_ids org_ids (optional) + * @param string[]|null $org_ids Comma-separated list of organization IDs to look up. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getOrganizationNames'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return void + * @return object */ public function getOrganizationNames($org_ids = null, string $contentType = self::contentTypes['getOrganizationNames'][0]) { - $this->getOrganizationNamesWithHttpInfo($org_ids, $contentType); + list($response) = $this->getOrganizationNamesWithHttpInfo($org_ids, $contentType); + return $response; } /** @@ -1642,12 +1643,12 @@ public function getOrganizationNames($org_ids = null, string $contentType = self * * Get Organization Names * - * @param string[]|null $org_ids (optional) + * @param string[]|null $org_ids Comma-separated list of organization IDs to look up. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getOrganizationNames'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of null, HTTP status code, HTTP response headers (array of strings) + * @return array of object, HTTP status code, HTTP response headers (array of strings) */ public function getOrganizationNamesWithHttpInfo($org_ids = null, string $contentType = self::contentTypes['getOrganizationNames'][0]) { @@ -1676,9 +1677,45 @@ public function getOrganizationNamesWithHttpInfo($org_ids = null, string $conten $statusCode = $response->getStatusCode(); - return [null, $statusCode, $response->getHeaders()]; + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + 'object', + $request, + $response, + ); + } + + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + 'object', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + 'object', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; } @@ -1691,7 +1728,7 @@ public function getOrganizationNamesWithHttpInfo($org_ids = null, string $conten * * Get Organization Names * - * @param string[]|null $org_ids (optional) + * @param string[]|null $org_ids Comma-separated list of organization IDs to look up. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getOrganizationNames'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1712,7 +1749,7 @@ function ($response) { * * Get Organization Names * - * @param string[]|null $org_ids (optional) + * @param string[]|null $org_ids Comma-separated list of organization IDs to look up. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getOrganizationNames'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1720,14 +1757,27 @@ function ($response) { */ public function getOrganizationNamesAsyncWithHttpInfo($org_ids = null, string $contentType = self::contentTypes['getOrganizationNames'][0]) { - $returnType = ''; + $returnType = 'object'; $request = $this->getOrganizationNamesRequest($org_ids, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) ->then( function ($response) use ($returnType) { - return [null, $response->getStatusCode(), $response->getHeaders()]; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; }, function ($exception) { $response = $exception->getResponse(); @@ -1749,7 +1799,7 @@ function ($exception) { /** * Create request for operation 'getOrganizationNames' * - * @param string[]|null $org_ids (optional) + * @param string[]|null $org_ids Comma-separated list of organization IDs to look up. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getOrganizationNames'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1781,7 +1831,7 @@ public function getOrganizationNamesRequest($org_ids = null, string $contentType $headers = $this->headerSelector->selectHeaders( - [], + ['application/json', ], $contentType, $multipart ); @@ -3011,7 +3061,7 @@ public function listTeamsRequest($page = null, $per_page = null, $role = null, s * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return object + * @return \SeaTable\Client\SysAdmin\SearchTeam200Response */ public function searchTeam($org_id, string $contentType = self::contentTypes['searchTeam'][0]) { @@ -3029,7 +3079,7 @@ public function searchTeam($org_id, string $contentType = self::contentTypes['se * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) + * @return array of \SeaTable\Client\SysAdmin\SearchTeam200Response, HTTP status code, HTTP response headers (array of strings) */ public function searchTeamWithHttpInfo($org_id, string $contentType = self::contentTypes['searchTeam'][0]) { @@ -3061,7 +3111,7 @@ public function searchTeamWithHttpInfo($org_id, string $contentType = self::cont switch($statusCode) { case 200: return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\SysAdmin\SearchTeam200Response', $request, $response, ); @@ -3083,7 +3133,7 @@ public function searchTeamWithHttpInfo($org_id, string $contentType = self::cont } return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\SysAdmin\SearchTeam200Response', $request, $response, ); @@ -3092,7 +3142,7 @@ public function searchTeamWithHttpInfo($org_id, string $contentType = self::cont case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - 'object', + '\SeaTable\Client\SysAdmin\SearchTeam200Response', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -3138,7 +3188,7 @@ function ($response) { */ public function searchTeamAsyncWithHttpInfo($org_id, string $contentType = self::contentTypes['searchTeam'][0]) { - $returnType = 'object'; + $returnType = '\SeaTable\Client\SysAdmin\SearchTeam200Response'; $request = $this->searchTeamRequest($org_id, $contentType); return $this->client @@ -3287,7 +3337,7 @@ public function searchTeamRequest($org_id, string $contentType = self::contentTy * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return object + * @return \SeaTable\Client\SysAdmin\UpdateTeam200Response */ public function updateTeam($org_id, $update_team_request = null, string $contentType = self::contentTypes['updateTeam'][0]) { @@ -3306,7 +3356,7 @@ public function updateTeam($org_id, $update_team_request = null, string $content * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) + * @return array of \SeaTable\Client\SysAdmin\UpdateTeam200Response, HTTP status code, HTTP response headers (array of strings) */ public function updateTeamWithHttpInfo($org_id, $update_team_request = null, string $contentType = self::contentTypes['updateTeam'][0]) { @@ -3338,7 +3388,7 @@ public function updateTeamWithHttpInfo($org_id, $update_team_request = null, str switch($statusCode) { case 200: return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\SysAdmin\UpdateTeam200Response', $request, $response, ); @@ -3360,7 +3410,7 @@ public function updateTeamWithHttpInfo($org_id, $update_team_request = null, str } return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\SysAdmin\UpdateTeam200Response', $request, $response, ); @@ -3369,7 +3419,7 @@ public function updateTeamWithHttpInfo($org_id, $update_team_request = null, str case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - 'object', + '\SeaTable\Client\SysAdmin\UpdateTeam200Response', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -3417,7 +3467,7 @@ function ($response) { */ public function updateTeamAsyncWithHttpInfo($org_id, $update_team_request = null, string $contentType = self::contentTypes['updateTeam'][0]) { - $returnType = 'object'; + $returnType = '\SeaTable\Client\SysAdmin\UpdateTeam200Response'; $request = $this->updateTeamRequest($org_id, $update_team_request, $contentType); return $this->client @@ -3576,7 +3626,7 @@ public function updateTeamRequest($org_id, $update_team_request = null, string $ * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return object + * @return \SeaTable\Client\SysAdmin\AddTeamUser200Response */ public function updateTeamUser($org_id, $user_id, $update_team_user_request = null, string $contentType = self::contentTypes['updateTeamUser'][0]) { @@ -3596,7 +3646,7 @@ public function updateTeamUser($org_id, $user_id, $update_team_user_request = nu * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) + * @return array of \SeaTable\Client\SysAdmin\AddTeamUser200Response, HTTP status code, HTTP response headers (array of strings) */ public function updateTeamUserWithHttpInfo($org_id, $user_id, $update_team_user_request = null, string $contentType = self::contentTypes['updateTeamUser'][0]) { @@ -3628,7 +3678,7 @@ public function updateTeamUserWithHttpInfo($org_id, $user_id, $update_team_user_ switch($statusCode) { case 200: return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\SysAdmin\AddTeamUser200Response', $request, $response, ); @@ -3650,7 +3700,7 @@ public function updateTeamUserWithHttpInfo($org_id, $user_id, $update_team_user_ } return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\SysAdmin\AddTeamUser200Response', $request, $response, ); @@ -3659,7 +3709,7 @@ public function updateTeamUserWithHttpInfo($org_id, $user_id, $update_team_user_ case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - 'object', + '\SeaTable\Client\SysAdmin\AddTeamUser200Response', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -3709,7 +3759,7 @@ function ($response) { */ public function updateTeamUserAsyncWithHttpInfo($org_id, $user_id, $update_team_user_request = null, string $contentType = self::contentTypes['updateTeamUser'][0]) { - $returnType = 'object'; + $returnType = '\SeaTable\Client\SysAdmin\AddTeamUser200Response'; $request = $this->updateTeamUserRequest($org_id, $user_id, $update_team_user_request, $contentType); return $this->client @@ -3891,6 +3941,14 @@ protected function createHttpClientOption() } } + if ($this->config->getCertFile()) { + $options[RequestOptions::CERT] = $this->config->getCertFile(); + } + + if ($this->config->getKeyFile()) { + $options[RequestOptions::SSL_KEY] = $this->config->getKeyFile(); + } + return $options; } diff --git a/lib/SysAdmin/TransferGroup200Response.php b/lib/SysAdmin/TransferGroup200Response.php new file mode 100644 index 00000000..9d1d9d5e --- /dev/null +++ b/lib/SysAdmin/TransferGroup200Response.php @@ -0,0 +1,612 @@ + + */ +class TransferGroup200Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'transferGroup_200_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'id' => 'int', + 'parent_group_id' => 'int', + 'name' => 'string', + 'owner' => 'string', + 'created_at' => 'string', + 'avatar_url' => 'string', + 'admins' => 'string[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'id' => null, + 'parent_group_id' => null, + 'name' => null, + 'owner' => null, + 'created_at' => null, + 'avatar_url' => null, + 'admins' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'id' => false, + 'parent_group_id' => false, + 'name' => false, + 'owner' => false, + 'created_at' => false, + 'avatar_url' => false, + 'admins' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'parent_group_id' => 'parent_group_id', + 'name' => 'name', + 'owner' => 'owner', + 'created_at' => 'created_at', + 'avatar_url' => 'avatar_url', + 'admins' => 'admins' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'parent_group_id' => 'setParentGroupId', + 'name' => 'setName', + 'owner' => 'setOwner', + 'created_at' => 'setCreatedAt', + 'avatar_url' => 'setAvatarUrl', + 'admins' => 'setAdmins' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'parent_group_id' => 'getParentGroupId', + 'name' => 'getName', + 'owner' => 'getOwner', + 'created_at' => 'getCreatedAt', + 'avatar_url' => 'getAvatarUrl', + 'admins' => 'getAdmins' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('parent_group_id', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('owner', $data ?? [], null); + $this->setIfExists('created_at', $data ?? [], null); + $this->setIfExists('avatar_url', $data ?? [], null); + $this->setIfExists('admins', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return int|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int|null $id id + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets parent_group_id + * + * @return int|null + */ + public function getParentGroupId() + { + return $this->container['parent_group_id']; + } + + /** + * Sets parent_group_id + * + * @param int|null $parent_group_id parent_group_id + * + * @return self + */ + public function setParentGroupId($parent_group_id) + { + if (is_null($parent_group_id)) { + throw new \InvalidArgumentException('non-nullable parent_group_id cannot be null'); + } + $this->container['parent_group_id'] = $parent_group_id; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name name + * + * @return self + */ + public function setName($name) + { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets owner + * + * @return string|null + */ + public function getOwner() + { + return $this->container['owner']; + } + + /** + * Sets owner + * + * @param string|null $owner owner + * + * @return self + */ + public function setOwner($owner) + { + if (is_null($owner)) { + throw new \InvalidArgumentException('non-nullable owner cannot be null'); + } + $this->container['owner'] = $owner; + + return $this; + } + + /** + * Gets created_at + * + * @return string|null + */ + public function getCreatedAt() + { + return $this->container['created_at']; + } + + /** + * Sets created_at + * + * @param string|null $created_at created_at + * + * @return self + */ + public function setCreatedAt($created_at) + { + if (is_null($created_at)) { + throw new \InvalidArgumentException('non-nullable created_at cannot be null'); + } + $this->container['created_at'] = $created_at; + + return $this; + } + + /** + * Gets avatar_url + * + * @return string|null + */ + public function getAvatarUrl() + { + return $this->container['avatar_url']; + } + + /** + * Sets avatar_url + * + * @param string|null $avatar_url avatar_url + * + * @return self + */ + public function setAvatarUrl($avatar_url) + { + if (is_null($avatar_url)) { + throw new \InvalidArgumentException('non-nullable avatar_url cannot be null'); + } + $this->container['avatar_url'] = $avatar_url; + + return $this; + } + + /** + * Gets admins + * + * @return string[]|null + */ + public function getAdmins() + { + return $this->container['admins']; + } + + /** + * Sets admins + * + * @param string[]|null $admins admins + * + * @return self + */ + public function setAdmins($admins) + { + if (is_null($admins)) { + throw new \InvalidArgumentException('non-nullable admins cannot be null'); + } + $this->container['admins'] = $admins; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/SysAdmin/TransferGroupRequest.php b/lib/SysAdmin/TransferGroupRequest.php index ccdb69c7..9a432806 100644 --- a/lib/SysAdmin/TransferGroupRequest.php +++ b/lib/SysAdmin/TransferGroupRequest.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -273,6 +273,9 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['new_owner'] === null) { + $invalidProperties[] = "'new_owner' can't be null"; + } return $invalidProperties; } @@ -291,7 +294,7 @@ public function valid() /** * Gets new_owner * - * @return string|null + * @return string */ public function getNewOwner() { @@ -301,7 +304,7 @@ public function getNewOwner() /** * Sets new_owner * - * @param string|null $new_owner new_owner + * @param string $new_owner new_owner * * @return self */ @@ -317,11 +320,11 @@ public function setNewOwner($new_owner) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -329,12 +332,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -359,11 +362,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/SysAdmin/UpdateAbuseReport200Response.php b/lib/SysAdmin/UpdateAbuseReport200Response.php new file mode 100644 index 00000000..c2de40cb --- /dev/null +++ b/lib/SysAdmin/UpdateAbuseReport200Response.php @@ -0,0 +1,680 @@ + + */ +class UpdateAbuseReport200Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'updateAbuseReport_200_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'id' => 'int', + 'dtable_uuid' => 'string', + 'reporter' => 'string', + 'external_link_token' => 'string', + 'create_time' => 'string', + 'abuse_type' => 'string', + 'description' => 'string', + 'handled' => 'bool', + 'dtable_name' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'id' => null, + 'dtable_uuid' => null, + 'reporter' => null, + 'external_link_token' => null, + 'create_time' => null, + 'abuse_type' => null, + 'description' => null, + 'handled' => null, + 'dtable_name' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'id' => false, + 'dtable_uuid' => false, + 'reporter' => false, + 'external_link_token' => false, + 'create_time' => false, + 'abuse_type' => false, + 'description' => false, + 'handled' => false, + 'dtable_name' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'dtable_uuid' => 'dtable_uuid', + 'reporter' => 'reporter', + 'external_link_token' => 'external_link_token', + 'create_time' => 'create_time', + 'abuse_type' => 'abuse_type', + 'description' => 'description', + 'handled' => 'handled', + 'dtable_name' => 'dtable_name' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'dtable_uuid' => 'setDtableUuid', + 'reporter' => 'setReporter', + 'external_link_token' => 'setExternalLinkToken', + 'create_time' => 'setCreateTime', + 'abuse_type' => 'setAbuseType', + 'description' => 'setDescription', + 'handled' => 'setHandled', + 'dtable_name' => 'setDtableName' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'dtable_uuid' => 'getDtableUuid', + 'reporter' => 'getReporter', + 'external_link_token' => 'getExternalLinkToken', + 'create_time' => 'getCreateTime', + 'abuse_type' => 'getAbuseType', + 'description' => 'getDescription', + 'handled' => 'getHandled', + 'dtable_name' => 'getDtableName' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('dtable_uuid', $data ?? [], null); + $this->setIfExists('reporter', $data ?? [], null); + $this->setIfExists('external_link_token', $data ?? [], null); + $this->setIfExists('create_time', $data ?? [], null); + $this->setIfExists('abuse_type', $data ?? [], null); + $this->setIfExists('description', $data ?? [], null); + $this->setIfExists('handled', $data ?? [], null); + $this->setIfExists('dtable_name', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return int|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int|null $id id + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets dtable_uuid + * + * @return string|null + */ + public function getDtableUuid() + { + return $this->container['dtable_uuid']; + } + + /** + * Sets dtable_uuid + * + * @param string|null $dtable_uuid dtable_uuid + * + * @return self + */ + public function setDtableUuid($dtable_uuid) + { + if (is_null($dtable_uuid)) { + throw new \InvalidArgumentException('non-nullable dtable_uuid cannot be null'); + } + $this->container['dtable_uuid'] = $dtable_uuid; + + return $this; + } + + /** + * Gets reporter + * + * @return string|null + */ + public function getReporter() + { + return $this->container['reporter']; + } + + /** + * Sets reporter + * + * @param string|null $reporter reporter + * + * @return self + */ + public function setReporter($reporter) + { + if (is_null($reporter)) { + throw new \InvalidArgumentException('non-nullable reporter cannot be null'); + } + $this->container['reporter'] = $reporter; + + return $this; + } + + /** + * Gets external_link_token + * + * @return string|null + */ + public function getExternalLinkToken() + { + return $this->container['external_link_token']; + } + + /** + * Sets external_link_token + * + * @param string|null $external_link_token external_link_token + * + * @return self + */ + public function setExternalLinkToken($external_link_token) + { + if (is_null($external_link_token)) { + throw new \InvalidArgumentException('non-nullable external_link_token cannot be null'); + } + $this->container['external_link_token'] = $external_link_token; + + return $this; + } + + /** + * Gets create_time + * + * @return string|null + */ + public function getCreateTime() + { + return $this->container['create_time']; + } + + /** + * Sets create_time + * + * @param string|null $create_time create_time + * + * @return self + */ + public function setCreateTime($create_time) + { + if (is_null($create_time)) { + throw new \InvalidArgumentException('non-nullable create_time cannot be null'); + } + $this->container['create_time'] = $create_time; + + return $this; + } + + /** + * Gets abuse_type + * + * @return string|null + */ + public function getAbuseType() + { + return $this->container['abuse_type']; + } + + /** + * Sets abuse_type + * + * @param string|null $abuse_type abuse_type + * + * @return self + */ + public function setAbuseType($abuse_type) + { + if (is_null($abuse_type)) { + throw new \InvalidArgumentException('non-nullable abuse_type cannot be null'); + } + $this->container['abuse_type'] = $abuse_type; + + return $this; + } + + /** + * Gets description + * + * @return string|null + */ + public function getDescription() + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string|null $description description + * + * @return self + */ + public function setDescription($description) + { + if (is_null($description)) { + throw new \InvalidArgumentException('non-nullable description cannot be null'); + } + $this->container['description'] = $description; + + return $this; + } + + /** + * Gets handled + * + * @return bool|null + */ + public function getHandled() + { + return $this->container['handled']; + } + + /** + * Sets handled + * + * @param bool|null $handled handled + * + * @return self + */ + public function setHandled($handled) + { + if (is_null($handled)) { + throw new \InvalidArgumentException('non-nullable handled cannot be null'); + } + $this->container['handled'] = $handled; + + return $this; + } + + /** + * Gets dtable_name + * + * @return string|null + */ + public function getDtableName() + { + return $this->container['dtable_name']; + } + + /** + * Sets dtable_name + * + * @param string|null $dtable_name dtable_name + * + * @return self + */ + public function setDtableName($dtable_name) + { + if (is_null($dtable_name)) { + throw new \InvalidArgumentException('non-nullable dtable_name cannot be null'); + } + $this->container['dtable_name'] = $dtable_name; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/SysAdmin/UpdateAbuseReportRequest.php b/lib/SysAdmin/UpdateAbuseReportRequest.php index 50095c3d..dbd48052 100644 --- a/lib/SysAdmin/UpdateAbuseReportRequest.php +++ b/lib/SysAdmin/UpdateAbuseReportRequest.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -273,6 +273,9 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['handled'] === null) { + $invalidProperties[] = "'handled' can't be null"; + } return $invalidProperties; } @@ -291,7 +294,7 @@ public function valid() /** * Gets handled * - * @return bool|null + * @return bool */ public function getHandled() { @@ -301,7 +304,7 @@ public function getHandled() /** * Sets handled * - * @param bool|null $handled Required. Use `true` or `false` to mark the status of the report. + * @param bool $handled Required. Use `true` or `false` to mark the status of the report. * * @return self */ @@ -317,11 +320,11 @@ public function setHandled($handled) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -329,12 +332,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -359,11 +362,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/SysAdmin/UpdateAdminsRole.php b/lib/SysAdmin/UpdateAdminsRole.php index cd1b69ba..f388fe68 100644 --- a/lib/SysAdmin/UpdateAdminsRole.php +++ b/lib/SysAdmin/UpdateAdminsRole.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -351,11 +351,11 @@ public function setRole($role) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -363,12 +363,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -393,11 +393,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/SysAdmin/UpdateGeneralSettings200Response.php b/lib/SysAdmin/UpdateGeneralSettings200Response.php new file mode 100644 index 00000000..7ff57fa3 --- /dev/null +++ b/lib/SysAdmin/UpdateGeneralSettings200Response.php @@ -0,0 +1,884 @@ + + */ +class UpdateGeneralSettings200Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'updateGeneralSettings_200_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'enable_signup' => 'int', + 'activate_after_registration' => 'int', + 'registration_send_mail' => 'int', + 'login_remember_days' => 'int', + 'user_strong_password_required' => 'int', + 'user_password_min_length' => 'int', + 'user_password_strength_level' => 'int', + 'force_password_change' => 'int', + 'login_attempt_limit' => 'int', + 'freeze_user_on_login_failed' => 'int', + 'enable_two_factor_auth' => 'int', + 'enable_branding_css' => 'int', + 'site_name' => 'string', + 'site_title' => 'string', + 'custom_css' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'enable_signup' => null, + 'activate_after_registration' => null, + 'registration_send_mail' => null, + 'login_remember_days' => null, + 'user_strong_password_required' => null, + 'user_password_min_length' => null, + 'user_password_strength_level' => null, + 'force_password_change' => null, + 'login_attempt_limit' => null, + 'freeze_user_on_login_failed' => null, + 'enable_two_factor_auth' => null, + 'enable_branding_css' => null, + 'site_name' => null, + 'site_title' => null, + 'custom_css' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'enable_signup' => false, + 'activate_after_registration' => false, + 'registration_send_mail' => false, + 'login_remember_days' => false, + 'user_strong_password_required' => false, + 'user_password_min_length' => false, + 'user_password_strength_level' => false, + 'force_password_change' => false, + 'login_attempt_limit' => false, + 'freeze_user_on_login_failed' => false, + 'enable_two_factor_auth' => false, + 'enable_branding_css' => false, + 'site_name' => false, + 'site_title' => false, + 'custom_css' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'enable_signup' => 'ENABLE_SIGNUP', + 'activate_after_registration' => 'ACTIVATE_AFTER_REGISTRATION', + 'registration_send_mail' => 'REGISTRATION_SEND_MAIL', + 'login_remember_days' => 'LOGIN_REMEMBER_DAYS', + 'user_strong_password_required' => 'USER_STRONG_PASSWORD_REQUIRED', + 'user_password_min_length' => 'USER_PASSWORD_MIN_LENGTH', + 'user_password_strength_level' => 'USER_PASSWORD_STRENGTH_LEVEL', + 'force_password_change' => 'FORCE_PASSWORD_CHANGE', + 'login_attempt_limit' => 'LOGIN_ATTEMPT_LIMIT', + 'freeze_user_on_login_failed' => 'FREEZE_USER_ON_LOGIN_FAILED', + 'enable_two_factor_auth' => 'ENABLE_TWO_FACTOR_AUTH', + 'enable_branding_css' => 'ENABLE_BRANDING_CSS', + 'site_name' => 'SITE_NAME', + 'site_title' => 'SITE_TITLE', + 'custom_css' => 'CUSTOM_CSS' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'enable_signup' => 'setEnableSignup', + 'activate_after_registration' => 'setActivateAfterRegistration', + 'registration_send_mail' => 'setRegistrationSendMail', + 'login_remember_days' => 'setLoginRememberDays', + 'user_strong_password_required' => 'setUserStrongPasswordRequired', + 'user_password_min_length' => 'setUserPasswordMinLength', + 'user_password_strength_level' => 'setUserPasswordStrengthLevel', + 'force_password_change' => 'setForcePasswordChange', + 'login_attempt_limit' => 'setLoginAttemptLimit', + 'freeze_user_on_login_failed' => 'setFreezeUserOnLoginFailed', + 'enable_two_factor_auth' => 'setEnableTwoFactorAuth', + 'enable_branding_css' => 'setEnableBrandingCss', + 'site_name' => 'setSiteName', + 'site_title' => 'setSiteTitle', + 'custom_css' => 'setCustomCss' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'enable_signup' => 'getEnableSignup', + 'activate_after_registration' => 'getActivateAfterRegistration', + 'registration_send_mail' => 'getRegistrationSendMail', + 'login_remember_days' => 'getLoginRememberDays', + 'user_strong_password_required' => 'getUserStrongPasswordRequired', + 'user_password_min_length' => 'getUserPasswordMinLength', + 'user_password_strength_level' => 'getUserPasswordStrengthLevel', + 'force_password_change' => 'getForcePasswordChange', + 'login_attempt_limit' => 'getLoginAttemptLimit', + 'freeze_user_on_login_failed' => 'getFreezeUserOnLoginFailed', + 'enable_two_factor_auth' => 'getEnableTwoFactorAuth', + 'enable_branding_css' => 'getEnableBrandingCss', + 'site_name' => 'getSiteName', + 'site_title' => 'getSiteTitle', + 'custom_css' => 'getCustomCss' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('enable_signup', $data ?? [], null); + $this->setIfExists('activate_after_registration', $data ?? [], null); + $this->setIfExists('registration_send_mail', $data ?? [], null); + $this->setIfExists('login_remember_days', $data ?? [], null); + $this->setIfExists('user_strong_password_required', $data ?? [], null); + $this->setIfExists('user_password_min_length', $data ?? [], null); + $this->setIfExists('user_password_strength_level', $data ?? [], null); + $this->setIfExists('force_password_change', $data ?? [], null); + $this->setIfExists('login_attempt_limit', $data ?? [], null); + $this->setIfExists('freeze_user_on_login_failed', $data ?? [], null); + $this->setIfExists('enable_two_factor_auth', $data ?? [], null); + $this->setIfExists('enable_branding_css', $data ?? [], null); + $this->setIfExists('site_name', $data ?? [], null); + $this->setIfExists('site_title', $data ?? [], null); + $this->setIfExists('custom_css', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets enable_signup + * + * @return int|null + */ + public function getEnableSignup() + { + return $this->container['enable_signup']; + } + + /** + * Sets enable_signup + * + * @param int|null $enable_signup enable_signup + * + * @return self + */ + public function setEnableSignup($enable_signup) + { + if (is_null($enable_signup)) { + throw new \InvalidArgumentException('non-nullable enable_signup cannot be null'); + } + $this->container['enable_signup'] = $enable_signup; + + return $this; + } + + /** + * Gets activate_after_registration + * + * @return int|null + */ + public function getActivateAfterRegistration() + { + return $this->container['activate_after_registration']; + } + + /** + * Sets activate_after_registration + * + * @param int|null $activate_after_registration activate_after_registration + * + * @return self + */ + public function setActivateAfterRegistration($activate_after_registration) + { + if (is_null($activate_after_registration)) { + throw new \InvalidArgumentException('non-nullable activate_after_registration cannot be null'); + } + $this->container['activate_after_registration'] = $activate_after_registration; + + return $this; + } + + /** + * Gets registration_send_mail + * + * @return int|null + */ + public function getRegistrationSendMail() + { + return $this->container['registration_send_mail']; + } + + /** + * Sets registration_send_mail + * + * @param int|null $registration_send_mail registration_send_mail + * + * @return self + */ + public function setRegistrationSendMail($registration_send_mail) + { + if (is_null($registration_send_mail)) { + throw new \InvalidArgumentException('non-nullable registration_send_mail cannot be null'); + } + $this->container['registration_send_mail'] = $registration_send_mail; + + return $this; + } + + /** + * Gets login_remember_days + * + * @return int|null + */ + public function getLoginRememberDays() + { + return $this->container['login_remember_days']; + } + + /** + * Sets login_remember_days + * + * @param int|null $login_remember_days login_remember_days + * + * @return self + */ + public function setLoginRememberDays($login_remember_days) + { + if (is_null($login_remember_days)) { + throw new \InvalidArgumentException('non-nullable login_remember_days cannot be null'); + } + $this->container['login_remember_days'] = $login_remember_days; + + return $this; + } + + /** + * Gets user_strong_password_required + * + * @return int|null + */ + public function getUserStrongPasswordRequired() + { + return $this->container['user_strong_password_required']; + } + + /** + * Sets user_strong_password_required + * + * @param int|null $user_strong_password_required user_strong_password_required + * + * @return self + */ + public function setUserStrongPasswordRequired($user_strong_password_required) + { + if (is_null($user_strong_password_required)) { + throw new \InvalidArgumentException('non-nullable user_strong_password_required cannot be null'); + } + $this->container['user_strong_password_required'] = $user_strong_password_required; + + return $this; + } + + /** + * Gets user_password_min_length + * + * @return int|null + */ + public function getUserPasswordMinLength() + { + return $this->container['user_password_min_length']; + } + + /** + * Sets user_password_min_length + * + * @param int|null $user_password_min_length user_password_min_length + * + * @return self + */ + public function setUserPasswordMinLength($user_password_min_length) + { + if (is_null($user_password_min_length)) { + throw new \InvalidArgumentException('non-nullable user_password_min_length cannot be null'); + } + $this->container['user_password_min_length'] = $user_password_min_length; + + return $this; + } + + /** + * Gets user_password_strength_level + * + * @return int|null + */ + public function getUserPasswordStrengthLevel() + { + return $this->container['user_password_strength_level']; + } + + /** + * Sets user_password_strength_level + * + * @param int|null $user_password_strength_level user_password_strength_level + * + * @return self + */ + public function setUserPasswordStrengthLevel($user_password_strength_level) + { + if (is_null($user_password_strength_level)) { + throw new \InvalidArgumentException('non-nullable user_password_strength_level cannot be null'); + } + $this->container['user_password_strength_level'] = $user_password_strength_level; + + return $this; + } + + /** + * Gets force_password_change + * + * @return int|null + */ + public function getForcePasswordChange() + { + return $this->container['force_password_change']; + } + + /** + * Sets force_password_change + * + * @param int|null $force_password_change force_password_change + * + * @return self + */ + public function setForcePasswordChange($force_password_change) + { + if (is_null($force_password_change)) { + throw new \InvalidArgumentException('non-nullable force_password_change cannot be null'); + } + $this->container['force_password_change'] = $force_password_change; + + return $this; + } + + /** + * Gets login_attempt_limit + * + * @return int|null + */ + public function getLoginAttemptLimit() + { + return $this->container['login_attempt_limit']; + } + + /** + * Sets login_attempt_limit + * + * @param int|null $login_attempt_limit login_attempt_limit + * + * @return self + */ + public function setLoginAttemptLimit($login_attempt_limit) + { + if (is_null($login_attempt_limit)) { + throw new \InvalidArgumentException('non-nullable login_attempt_limit cannot be null'); + } + $this->container['login_attempt_limit'] = $login_attempt_limit; + + return $this; + } + + /** + * Gets freeze_user_on_login_failed + * + * @return int|null + */ + public function getFreezeUserOnLoginFailed() + { + return $this->container['freeze_user_on_login_failed']; + } + + /** + * Sets freeze_user_on_login_failed + * + * @param int|null $freeze_user_on_login_failed freeze_user_on_login_failed + * + * @return self + */ + public function setFreezeUserOnLoginFailed($freeze_user_on_login_failed) + { + if (is_null($freeze_user_on_login_failed)) { + throw new \InvalidArgumentException('non-nullable freeze_user_on_login_failed cannot be null'); + } + $this->container['freeze_user_on_login_failed'] = $freeze_user_on_login_failed; + + return $this; + } + + /** + * Gets enable_two_factor_auth + * + * @return int|null + */ + public function getEnableTwoFactorAuth() + { + return $this->container['enable_two_factor_auth']; + } + + /** + * Sets enable_two_factor_auth + * + * @param int|null $enable_two_factor_auth enable_two_factor_auth + * + * @return self + */ + public function setEnableTwoFactorAuth($enable_two_factor_auth) + { + if (is_null($enable_two_factor_auth)) { + throw new \InvalidArgumentException('non-nullable enable_two_factor_auth cannot be null'); + } + $this->container['enable_two_factor_auth'] = $enable_two_factor_auth; + + return $this; + } + + /** + * Gets enable_branding_css + * + * @return int|null + */ + public function getEnableBrandingCss() + { + return $this->container['enable_branding_css']; + } + + /** + * Sets enable_branding_css + * + * @param int|null $enable_branding_css enable_branding_css + * + * @return self + */ + public function setEnableBrandingCss($enable_branding_css) + { + if (is_null($enable_branding_css)) { + throw new \InvalidArgumentException('non-nullable enable_branding_css cannot be null'); + } + $this->container['enable_branding_css'] = $enable_branding_css; + + return $this; + } + + /** + * Gets site_name + * + * @return string|null + */ + public function getSiteName() + { + return $this->container['site_name']; + } + + /** + * Sets site_name + * + * @param string|null $site_name site_name + * + * @return self + */ + public function setSiteName($site_name) + { + if (is_null($site_name)) { + throw new \InvalidArgumentException('non-nullable site_name cannot be null'); + } + $this->container['site_name'] = $site_name; + + return $this; + } + + /** + * Gets site_title + * + * @return string|null + */ + public function getSiteTitle() + { + return $this->container['site_title']; + } + + /** + * Sets site_title + * + * @param string|null $site_title site_title + * + * @return self + */ + public function setSiteTitle($site_title) + { + if (is_null($site_title)) { + throw new \InvalidArgumentException('non-nullable site_title cannot be null'); + } + $this->container['site_title'] = $site_title; + + return $this; + } + + /** + * Gets custom_css + * + * @return string|null + */ + public function getCustomCss() + { + return $this->container['custom_css']; + } + + /** + * Sets custom_css + * + * @param string|null $custom_css custom_css + * + * @return self + */ + public function setCustomCss($custom_css) + { + if (is_null($custom_css)) { + throw new \InvalidArgumentException('non-nullable custom_css cannot be null'); + } + $this->container['custom_css'] = $custom_css; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/SysAdmin/UpdateGeneralSettingsRequest.php b/lib/SysAdmin/UpdateGeneralSettingsRequest.php index 6030fa46..d7e4ee41 100644 --- a/lib/SysAdmin/UpdateGeneralSettingsRequest.php +++ b/lib/SysAdmin/UpdateGeneralSettingsRequest.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -793,11 +793,11 @@ public function setEnableSignup($enable_signup) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -805,12 +805,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -835,11 +835,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/SysAdmin/UpdateTeam200Response.php b/lib/SysAdmin/UpdateTeam200Response.php new file mode 100644 index 00000000..7ed53a64 --- /dev/null +++ b/lib/SysAdmin/UpdateTeam200Response.php @@ -0,0 +1,884 @@ + + */ +class UpdateTeam200Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'updateTeam_200_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'org_id' => 'int', + 'org_name' => 'string', + 'ctime' => 'string', + 'org_url_prefix' => 'string', + 'role' => 'string', + 'creator_email' => 'string', + 'creator_name' => 'string', + 'creator_contact_email' => 'string', + 'quota' => 'int', + 'storage_usage' => 'int', + 'storage_quota' => 'int', + 'max_user_number' => 'int', + 'rows_count' => 'int', + 'row_limit' => 'int', + 'monthly_automation_limit_per_user' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'org_id' => null, + 'org_name' => null, + 'ctime' => null, + 'org_url_prefix' => null, + 'role' => null, + 'creator_email' => null, + 'creator_name' => null, + 'creator_contact_email' => null, + 'quota' => null, + 'storage_usage' => null, + 'storage_quota' => null, + 'max_user_number' => null, + 'rows_count' => null, + 'row_limit' => null, + 'monthly_automation_limit_per_user' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'org_id' => false, + 'org_name' => false, + 'ctime' => false, + 'org_url_prefix' => false, + 'role' => false, + 'creator_email' => false, + 'creator_name' => false, + 'creator_contact_email' => false, + 'quota' => false, + 'storage_usage' => false, + 'storage_quota' => false, + 'max_user_number' => false, + 'rows_count' => false, + 'row_limit' => false, + 'monthly_automation_limit_per_user' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'org_id' => 'org_id', + 'org_name' => 'org_name', + 'ctime' => 'ctime', + 'org_url_prefix' => 'org_url_prefix', + 'role' => 'role', + 'creator_email' => 'creator_email', + 'creator_name' => 'creator_name', + 'creator_contact_email' => 'creator_contact_email', + 'quota' => 'quota', + 'storage_usage' => 'storage_usage', + 'storage_quota' => 'storage_quota', + 'max_user_number' => 'max_user_number', + 'rows_count' => 'rows_count', + 'row_limit' => 'row_limit', + 'monthly_automation_limit_per_user' => 'monthly_automation_limit_per_user' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'org_id' => 'setOrgId', + 'org_name' => 'setOrgName', + 'ctime' => 'setCtime', + 'org_url_prefix' => 'setOrgUrlPrefix', + 'role' => 'setRole', + 'creator_email' => 'setCreatorEmail', + 'creator_name' => 'setCreatorName', + 'creator_contact_email' => 'setCreatorContactEmail', + 'quota' => 'setQuota', + 'storage_usage' => 'setStorageUsage', + 'storage_quota' => 'setStorageQuota', + 'max_user_number' => 'setMaxUserNumber', + 'rows_count' => 'setRowsCount', + 'row_limit' => 'setRowLimit', + 'monthly_automation_limit_per_user' => 'setMonthlyAutomationLimitPerUser' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'org_id' => 'getOrgId', + 'org_name' => 'getOrgName', + 'ctime' => 'getCtime', + 'org_url_prefix' => 'getOrgUrlPrefix', + 'role' => 'getRole', + 'creator_email' => 'getCreatorEmail', + 'creator_name' => 'getCreatorName', + 'creator_contact_email' => 'getCreatorContactEmail', + 'quota' => 'getQuota', + 'storage_usage' => 'getStorageUsage', + 'storage_quota' => 'getStorageQuota', + 'max_user_number' => 'getMaxUserNumber', + 'rows_count' => 'getRowsCount', + 'row_limit' => 'getRowLimit', + 'monthly_automation_limit_per_user' => 'getMonthlyAutomationLimitPerUser' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('org_id', $data ?? [], null); + $this->setIfExists('org_name', $data ?? [], null); + $this->setIfExists('ctime', $data ?? [], null); + $this->setIfExists('org_url_prefix', $data ?? [], null); + $this->setIfExists('role', $data ?? [], null); + $this->setIfExists('creator_email', $data ?? [], null); + $this->setIfExists('creator_name', $data ?? [], null); + $this->setIfExists('creator_contact_email', $data ?? [], null); + $this->setIfExists('quota', $data ?? [], null); + $this->setIfExists('storage_usage', $data ?? [], null); + $this->setIfExists('storage_quota', $data ?? [], null); + $this->setIfExists('max_user_number', $data ?? [], null); + $this->setIfExists('rows_count', $data ?? [], null); + $this->setIfExists('row_limit', $data ?? [], null); + $this->setIfExists('monthly_automation_limit_per_user', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets org_id + * + * @return int|null + */ + public function getOrgId() + { + return $this->container['org_id']; + } + + /** + * Sets org_id + * + * @param int|null $org_id org_id + * + * @return self + */ + public function setOrgId($org_id) + { + if (is_null($org_id)) { + throw new \InvalidArgumentException('non-nullable org_id cannot be null'); + } + $this->container['org_id'] = $org_id; + + return $this; + } + + /** + * Gets org_name + * + * @return string|null + */ + public function getOrgName() + { + return $this->container['org_name']; + } + + /** + * Sets org_name + * + * @param string|null $org_name org_name + * + * @return self + */ + public function setOrgName($org_name) + { + if (is_null($org_name)) { + throw new \InvalidArgumentException('non-nullable org_name cannot be null'); + } + $this->container['org_name'] = $org_name; + + return $this; + } + + /** + * Gets ctime + * + * @return string|null + */ + public function getCtime() + { + return $this->container['ctime']; + } + + /** + * Sets ctime + * + * @param string|null $ctime ctime + * + * @return self + */ + public function setCtime($ctime) + { + if (is_null($ctime)) { + throw new \InvalidArgumentException('non-nullable ctime cannot be null'); + } + $this->container['ctime'] = $ctime; + + return $this; + } + + /** + * Gets org_url_prefix + * + * @return string|null + */ + public function getOrgUrlPrefix() + { + return $this->container['org_url_prefix']; + } + + /** + * Sets org_url_prefix + * + * @param string|null $org_url_prefix org_url_prefix + * + * @return self + */ + public function setOrgUrlPrefix($org_url_prefix) + { + if (is_null($org_url_prefix)) { + throw new \InvalidArgumentException('non-nullable org_url_prefix cannot be null'); + } + $this->container['org_url_prefix'] = $org_url_prefix; + + return $this; + } + + /** + * Gets role + * + * @return string|null + */ + public function getRole() + { + return $this->container['role']; + } + + /** + * Sets role + * + * @param string|null $role role + * + * @return self + */ + public function setRole($role) + { + if (is_null($role)) { + throw new \InvalidArgumentException('non-nullable role cannot be null'); + } + $this->container['role'] = $role; + + return $this; + } + + /** + * Gets creator_email + * + * @return string|null + */ + public function getCreatorEmail() + { + return $this->container['creator_email']; + } + + /** + * Sets creator_email + * + * @param string|null $creator_email creator_email + * + * @return self + */ + public function setCreatorEmail($creator_email) + { + if (is_null($creator_email)) { + throw new \InvalidArgumentException('non-nullable creator_email cannot be null'); + } + $this->container['creator_email'] = $creator_email; + + return $this; + } + + /** + * Gets creator_name + * + * @return string|null + */ + public function getCreatorName() + { + return $this->container['creator_name']; + } + + /** + * Sets creator_name + * + * @param string|null $creator_name creator_name + * + * @return self + */ + public function setCreatorName($creator_name) + { + if (is_null($creator_name)) { + throw new \InvalidArgumentException('non-nullable creator_name cannot be null'); + } + $this->container['creator_name'] = $creator_name; + + return $this; + } + + /** + * Gets creator_contact_email + * + * @return string|null + */ + public function getCreatorContactEmail() + { + return $this->container['creator_contact_email']; + } + + /** + * Sets creator_contact_email + * + * @param string|null $creator_contact_email creator_contact_email + * + * @return self + */ + public function setCreatorContactEmail($creator_contact_email) + { + if (is_null($creator_contact_email)) { + throw new \InvalidArgumentException('non-nullable creator_contact_email cannot be null'); + } + $this->container['creator_contact_email'] = $creator_contact_email; + + return $this; + } + + /** + * Gets quota + * + * @return int|null + */ + public function getQuota() + { + return $this->container['quota']; + } + + /** + * Sets quota + * + * @param int|null $quota quota + * + * @return self + */ + public function setQuota($quota) + { + if (is_null($quota)) { + throw new \InvalidArgumentException('non-nullable quota cannot be null'); + } + $this->container['quota'] = $quota; + + return $this; + } + + /** + * Gets storage_usage + * + * @return int|null + */ + public function getStorageUsage() + { + return $this->container['storage_usage']; + } + + /** + * Sets storage_usage + * + * @param int|null $storage_usage storage_usage + * + * @return self + */ + public function setStorageUsage($storage_usage) + { + if (is_null($storage_usage)) { + throw new \InvalidArgumentException('non-nullable storage_usage cannot be null'); + } + $this->container['storage_usage'] = $storage_usage; + + return $this; + } + + /** + * Gets storage_quota + * + * @return int|null + */ + public function getStorageQuota() + { + return $this->container['storage_quota']; + } + + /** + * Sets storage_quota + * + * @param int|null $storage_quota storage_quota + * + * @return self + */ + public function setStorageQuota($storage_quota) + { + if (is_null($storage_quota)) { + throw new \InvalidArgumentException('non-nullable storage_quota cannot be null'); + } + $this->container['storage_quota'] = $storage_quota; + + return $this; + } + + /** + * Gets max_user_number + * + * @return int|null + */ + public function getMaxUserNumber() + { + return $this->container['max_user_number']; + } + + /** + * Sets max_user_number + * + * @param int|null $max_user_number max_user_number + * + * @return self + */ + public function setMaxUserNumber($max_user_number) + { + if (is_null($max_user_number)) { + throw new \InvalidArgumentException('non-nullable max_user_number cannot be null'); + } + $this->container['max_user_number'] = $max_user_number; + + return $this; + } + + /** + * Gets rows_count + * + * @return int|null + */ + public function getRowsCount() + { + return $this->container['rows_count']; + } + + /** + * Sets rows_count + * + * @param int|null $rows_count rows_count + * + * @return self + */ + public function setRowsCount($rows_count) + { + if (is_null($rows_count)) { + throw new \InvalidArgumentException('non-nullable rows_count cannot be null'); + } + $this->container['rows_count'] = $rows_count; + + return $this; + } + + /** + * Gets row_limit + * + * @return int|null + */ + public function getRowLimit() + { + return $this->container['row_limit']; + } + + /** + * Sets row_limit + * + * @param int|null $row_limit row_limit + * + * @return self + */ + public function setRowLimit($row_limit) + { + if (is_null($row_limit)) { + throw new \InvalidArgumentException('non-nullable row_limit cannot be null'); + } + $this->container['row_limit'] = $row_limit; + + return $this; + } + + /** + * Gets monthly_automation_limit_per_user + * + * @return int|null + */ + public function getMonthlyAutomationLimitPerUser() + { + return $this->container['monthly_automation_limit_per_user']; + } + + /** + * Sets monthly_automation_limit_per_user + * + * @param int|null $monthly_automation_limit_per_user monthly_automation_limit_per_user + * + * @return self + */ + public function setMonthlyAutomationLimitPerUser($monthly_automation_limit_per_user) + { + if (is_null($monthly_automation_limit_per_user)) { + throw new \InvalidArgumentException('non-nullable monthly_automation_limit_per_user cannot be null'); + } + $this->container['monthly_automation_limit_per_user'] = $monthly_automation_limit_per_user; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/SysAdmin/UpdateTeamRequest.php b/lib/SysAdmin/UpdateTeamRequest.php index d006222b..3901d594 100644 --- a/lib/SysAdmin/UpdateTeamRequest.php +++ b/lib/SysAdmin/UpdateTeamRequest.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -60,7 +60,8 @@ class UpdateTeamRequest implements ModelInterface, ArrayAccess, \JsonSerializabl 'role' => 'string', 'row_limit' => 'int', 'max_user_number' => 'string', - 'asset_quota_mb' => 'string' + 'asset_quota_mb' => 'string', + 'monthly_automation_limit_per_user' => 'int' ]; /** @@ -75,7 +76,8 @@ class UpdateTeamRequest implements ModelInterface, ArrayAccess, \JsonSerializabl 'role' => null, 'row_limit' => null, 'max_user_number' => null, - 'asset_quota_mb' => null + 'asset_quota_mb' => null, + 'monthly_automation_limit_per_user' => null ]; /** @@ -88,7 +90,8 @@ class UpdateTeamRequest implements ModelInterface, ArrayAccess, \JsonSerializabl 'role' => false, 'row_limit' => false, 'max_user_number' => false, - 'asset_quota_mb' => false + 'asset_quota_mb' => false, + 'monthly_automation_limit_per_user' => false ]; /** @@ -181,7 +184,8 @@ public function isNullableSetToNull(string $property): bool 'role' => 'role', 'row_limit' => 'row_limit', 'max_user_number' => 'max_user_number', - 'asset_quota_mb' => 'asset_quota_mb' + 'asset_quota_mb' => 'asset_quota_mb', + 'monthly_automation_limit_per_user' => 'monthly_automation_limit_per_user' ]; /** @@ -194,7 +198,8 @@ public function isNullableSetToNull(string $property): bool 'role' => 'setRole', 'row_limit' => 'setRowLimit', 'max_user_number' => 'setMaxUserNumber', - 'asset_quota_mb' => 'setAssetQuotaMb' + 'asset_quota_mb' => 'setAssetQuotaMb', + 'monthly_automation_limit_per_user' => 'setMonthlyAutomationLimitPerUser' ]; /** @@ -207,7 +212,8 @@ public function isNullableSetToNull(string $property): bool 'role' => 'getRole', 'row_limit' => 'getRowLimit', 'max_user_number' => 'getMaxUserNumber', - 'asset_quota_mb' => 'getAssetQuotaMb' + 'asset_quota_mb' => 'getAssetQuotaMb', + 'monthly_automation_limit_per_user' => 'getMonthlyAutomationLimitPerUser' ]; /** @@ -272,6 +278,7 @@ public function __construct(?array $data = null) $this->setIfExists('row_limit', $data ?? [], null); $this->setIfExists('max_user_number', $data ?? [], null); $this->setIfExists('asset_quota_mb', $data ?? [], null); + $this->setIfExists('monthly_automation_limit_per_user', $data ?? [], null); } /** @@ -450,14 +457,41 @@ public function setAssetQuotaMb($asset_quota_mb) return $this; } + + /** + * Gets monthly_automation_limit_per_user + * + * @return int|null + */ + public function getMonthlyAutomationLimitPerUser() + { + return $this->container['monthly_automation_limit_per_user']; + } + + /** + * Sets monthly_automation_limit_per_user + * + * @param int|null $monthly_automation_limit_per_user Monthly limit on the number of automation rules per user. + * + * @return self + */ + public function setMonthlyAutomationLimitPerUser($monthly_automation_limit_per_user) + { + if (is_null($monthly_automation_limit_per_user)) { + throw new \InvalidArgumentException('non-nullable monthly_automation_limit_per_user cannot be null'); + } + $this->container['monthly_automation_limit_per_user'] = $monthly_automation_limit_per_user; + + return $this; + } /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -465,12 +499,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -495,11 +529,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/SysAdmin/UpdateTeamUserRequest.php b/lib/SysAdmin/UpdateTeamUserRequest.php index 8a2baa53..9f88af26 100644 --- a/lib/SysAdmin/UpdateTeamUserRequest.php +++ b/lib/SysAdmin/UpdateTeamUserRequest.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -453,11 +453,11 @@ public function setQuotaTotal($quota_total) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -465,12 +465,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -495,11 +495,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/SysAdmin/UpdateUser200Response.php b/lib/SysAdmin/UpdateUser200Response.php new file mode 100644 index 00000000..bbd697dd --- /dev/null +++ b/lib/SysAdmin/UpdateUser200Response.php @@ -0,0 +1,884 @@ + + */ +class UpdateUser200Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'updateUser_200_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'email' => 'string', + 'name' => 'string', + 'contact_email' => 'string', + 'unit' => 'string', + 'login_id' => 'string', + 'id_in_org' => 'string', + 'is_staff' => 'bool', + 'is_active' => 'bool', + 'phone' => 'string', + 'org_id' => 'int', + 'org_name' => 'string', + 'create_time' => 'string', + 'role' => 'string', + 'update_status_tip' => 'string', + 'monthly_automation_limit_per_user' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'email' => null, + 'name' => null, + 'contact_email' => null, + 'unit' => null, + 'login_id' => null, + 'id_in_org' => null, + 'is_staff' => null, + 'is_active' => null, + 'phone' => null, + 'org_id' => null, + 'org_name' => null, + 'create_time' => null, + 'role' => null, + 'update_status_tip' => null, + 'monthly_automation_limit_per_user' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'email' => false, + 'name' => false, + 'contact_email' => false, + 'unit' => false, + 'login_id' => false, + 'id_in_org' => false, + 'is_staff' => false, + 'is_active' => false, + 'phone' => false, + 'org_id' => false, + 'org_name' => false, + 'create_time' => false, + 'role' => false, + 'update_status_tip' => false, + 'monthly_automation_limit_per_user' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'email' => 'email', + 'name' => 'name', + 'contact_email' => 'contact_email', + 'unit' => 'unit', + 'login_id' => 'login_id', + 'id_in_org' => 'id_in_org', + 'is_staff' => 'is_staff', + 'is_active' => 'is_active', + 'phone' => 'phone', + 'org_id' => 'org_id', + 'org_name' => 'org_name', + 'create_time' => 'create_time', + 'role' => 'role', + 'update_status_tip' => 'update_status_tip', + 'monthly_automation_limit_per_user' => 'monthly_automation_limit_per_user' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'email' => 'setEmail', + 'name' => 'setName', + 'contact_email' => 'setContactEmail', + 'unit' => 'setUnit', + 'login_id' => 'setLoginId', + 'id_in_org' => 'setIdInOrg', + 'is_staff' => 'setIsStaff', + 'is_active' => 'setIsActive', + 'phone' => 'setPhone', + 'org_id' => 'setOrgId', + 'org_name' => 'setOrgName', + 'create_time' => 'setCreateTime', + 'role' => 'setRole', + 'update_status_tip' => 'setUpdateStatusTip', + 'monthly_automation_limit_per_user' => 'setMonthlyAutomationLimitPerUser' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'email' => 'getEmail', + 'name' => 'getName', + 'contact_email' => 'getContactEmail', + 'unit' => 'getUnit', + 'login_id' => 'getLoginId', + 'id_in_org' => 'getIdInOrg', + 'is_staff' => 'getIsStaff', + 'is_active' => 'getIsActive', + 'phone' => 'getPhone', + 'org_id' => 'getOrgId', + 'org_name' => 'getOrgName', + 'create_time' => 'getCreateTime', + 'role' => 'getRole', + 'update_status_tip' => 'getUpdateStatusTip', + 'monthly_automation_limit_per_user' => 'getMonthlyAutomationLimitPerUser' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('email', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('contact_email', $data ?? [], null); + $this->setIfExists('unit', $data ?? [], null); + $this->setIfExists('login_id', $data ?? [], null); + $this->setIfExists('id_in_org', $data ?? [], null); + $this->setIfExists('is_staff', $data ?? [], null); + $this->setIfExists('is_active', $data ?? [], null); + $this->setIfExists('phone', $data ?? [], null); + $this->setIfExists('org_id', $data ?? [], null); + $this->setIfExists('org_name', $data ?? [], null); + $this->setIfExists('create_time', $data ?? [], null); + $this->setIfExists('role', $data ?? [], null); + $this->setIfExists('update_status_tip', $data ?? [], null); + $this->setIfExists('monthly_automation_limit_per_user', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets email + * + * @return string|null + */ + public function getEmail() + { + return $this->container['email']; + } + + /** + * Sets email + * + * @param string|null $email email + * + * @return self + */ + public function setEmail($email) + { + if (is_null($email)) { + throw new \InvalidArgumentException('non-nullable email cannot be null'); + } + $this->container['email'] = $email; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name name + * + * @return self + */ + public function setName($name) + { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets contact_email + * + * @return string|null + */ + public function getContactEmail() + { + return $this->container['contact_email']; + } + + /** + * Sets contact_email + * + * @param string|null $contact_email contact_email + * + * @return self + */ + public function setContactEmail($contact_email) + { + if (is_null($contact_email)) { + throw new \InvalidArgumentException('non-nullable contact_email cannot be null'); + } + $this->container['contact_email'] = $contact_email; + + return $this; + } + + /** + * Gets unit + * + * @return string|null + */ + public function getUnit() + { + return $this->container['unit']; + } + + /** + * Sets unit + * + * @param string|null $unit unit + * + * @return self + */ + public function setUnit($unit) + { + if (is_null($unit)) { + throw new \InvalidArgumentException('non-nullable unit cannot be null'); + } + $this->container['unit'] = $unit; + + return $this; + } + + /** + * Gets login_id + * + * @return string|null + */ + public function getLoginId() + { + return $this->container['login_id']; + } + + /** + * Sets login_id + * + * @param string|null $login_id login_id + * + * @return self + */ + public function setLoginId($login_id) + { + if (is_null($login_id)) { + throw new \InvalidArgumentException('non-nullable login_id cannot be null'); + } + $this->container['login_id'] = $login_id; + + return $this; + } + + /** + * Gets id_in_org + * + * @return string|null + */ + public function getIdInOrg() + { + return $this->container['id_in_org']; + } + + /** + * Sets id_in_org + * + * @param string|null $id_in_org id_in_org + * + * @return self + */ + public function setIdInOrg($id_in_org) + { + if (is_null($id_in_org)) { + throw new \InvalidArgumentException('non-nullable id_in_org cannot be null'); + } + $this->container['id_in_org'] = $id_in_org; + + return $this; + } + + /** + * Gets is_staff + * + * @return bool|null + */ + public function getIsStaff() + { + return $this->container['is_staff']; + } + + /** + * Sets is_staff + * + * @param bool|null $is_staff is_staff + * + * @return self + */ + public function setIsStaff($is_staff) + { + if (is_null($is_staff)) { + throw new \InvalidArgumentException('non-nullable is_staff cannot be null'); + } + $this->container['is_staff'] = $is_staff; + + return $this; + } + + /** + * Gets is_active + * + * @return bool|null + */ + public function getIsActive() + { + return $this->container['is_active']; + } + + /** + * Sets is_active + * + * @param bool|null $is_active is_active + * + * @return self + */ + public function setIsActive($is_active) + { + if (is_null($is_active)) { + throw new \InvalidArgumentException('non-nullable is_active cannot be null'); + } + $this->container['is_active'] = $is_active; + + return $this; + } + + /** + * Gets phone + * + * @return string|null + */ + public function getPhone() + { + return $this->container['phone']; + } + + /** + * Sets phone + * + * @param string|null $phone phone + * + * @return self + */ + public function setPhone($phone) + { + if (is_null($phone)) { + throw new \InvalidArgumentException('non-nullable phone cannot be null'); + } + $this->container['phone'] = $phone; + + return $this; + } + + /** + * Gets org_id + * + * @return int|null + */ + public function getOrgId() + { + return $this->container['org_id']; + } + + /** + * Sets org_id + * + * @param int|null $org_id org_id + * + * @return self + */ + public function setOrgId($org_id) + { + if (is_null($org_id)) { + throw new \InvalidArgumentException('non-nullable org_id cannot be null'); + } + $this->container['org_id'] = $org_id; + + return $this; + } + + /** + * Gets org_name + * + * @return string|null + */ + public function getOrgName() + { + return $this->container['org_name']; + } + + /** + * Sets org_name + * + * @param string|null $org_name org_name + * + * @return self + */ + public function setOrgName($org_name) + { + if (is_null($org_name)) { + throw new \InvalidArgumentException('non-nullable org_name cannot be null'); + } + $this->container['org_name'] = $org_name; + + return $this; + } + + /** + * Gets create_time + * + * @return string|null + */ + public function getCreateTime() + { + return $this->container['create_time']; + } + + /** + * Sets create_time + * + * @param string|null $create_time create_time + * + * @return self + */ + public function setCreateTime($create_time) + { + if (is_null($create_time)) { + throw new \InvalidArgumentException('non-nullable create_time cannot be null'); + } + $this->container['create_time'] = $create_time; + + return $this; + } + + /** + * Gets role + * + * @return string|null + */ + public function getRole() + { + return $this->container['role']; + } + + /** + * Sets role + * + * @param string|null $role role + * + * @return self + */ + public function setRole($role) + { + if (is_null($role)) { + throw new \InvalidArgumentException('non-nullable role cannot be null'); + } + $this->container['role'] = $role; + + return $this; + } + + /** + * Gets update_status_tip + * + * @return string|null + */ + public function getUpdateStatusTip() + { + return $this->container['update_status_tip']; + } + + /** + * Sets update_status_tip + * + * @param string|null $update_status_tip update_status_tip + * + * @return self + */ + public function setUpdateStatusTip($update_status_tip) + { + if (is_null($update_status_tip)) { + throw new \InvalidArgumentException('non-nullable update_status_tip cannot be null'); + } + $this->container['update_status_tip'] = $update_status_tip; + + return $this; + } + + /** + * Gets monthly_automation_limit_per_user + * + * @return int|null + */ + public function getMonthlyAutomationLimitPerUser() + { + return $this->container['monthly_automation_limit_per_user']; + } + + /** + * Sets monthly_automation_limit_per_user + * + * @param int|null $monthly_automation_limit_per_user monthly_automation_limit_per_user + * + * @return self + */ + public function setMonthlyAutomationLimitPerUser($monthly_automation_limit_per_user) + { + if (is_null($monthly_automation_limit_per_user)) { + throw new \InvalidArgumentException('non-nullable monthly_automation_limit_per_user cannot be null'); + } + $this->container['monthly_automation_limit_per_user'] = $monthly_automation_limit_per_user; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/SysAdmin/UpdateUserRequest.php b/lib/SysAdmin/UpdateUserRequest.php index f0f4d4d1..a2325b98 100644 --- a/lib/SysAdmin/UpdateUserRequest.php +++ b/lib/SysAdmin/UpdateUserRequest.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -68,7 +68,8 @@ class UpdateUserRequest implements ModelInterface, ArrayAccess, \JsonSerializabl 'institution' => 'string', 'row_limit' => 'int', 'quota_total' => 'string', - 'asset_quota_mb' => 'string' + 'asset_quota_mb' => 'string', + 'monthly_automation_limit_per_user' => 'int' ]; /** @@ -91,7 +92,8 @@ class UpdateUserRequest implements ModelInterface, ArrayAccess, \JsonSerializabl 'institution' => null, 'row_limit' => null, 'quota_total' => null, - 'asset_quota_mb' => null + 'asset_quota_mb' => null, + 'monthly_automation_limit_per_user' => null ]; /** @@ -112,7 +114,8 @@ class UpdateUserRequest implements ModelInterface, ArrayAccess, \JsonSerializabl 'institution' => false, 'row_limit' => false, 'quota_total' => false, - 'asset_quota_mb' => false + 'asset_quota_mb' => false, + 'monthly_automation_limit_per_user' => false ]; /** @@ -213,7 +216,8 @@ public function isNullableSetToNull(string $property): bool 'institution' => 'institution', 'row_limit' => 'row_limit', 'quota_total' => 'quota_total', - 'asset_quota_mb' => 'asset_quota_mb' + 'asset_quota_mb' => 'asset_quota_mb', + 'monthly_automation_limit_per_user' => 'monthly_automation_limit_per_user' ]; /** @@ -234,7 +238,8 @@ public function isNullableSetToNull(string $property): bool 'institution' => 'setInstitution', 'row_limit' => 'setRowLimit', 'quota_total' => 'setQuotaTotal', - 'asset_quota_mb' => 'setAssetQuotaMb' + 'asset_quota_mb' => 'setAssetQuotaMb', + 'monthly_automation_limit_per_user' => 'setMonthlyAutomationLimitPerUser' ]; /** @@ -255,7 +260,8 @@ public function isNullableSetToNull(string $property): bool 'institution' => 'getInstitution', 'row_limit' => 'getRowLimit', 'quota_total' => 'getQuotaTotal', - 'asset_quota_mb' => 'getAssetQuotaMb' + 'asset_quota_mb' => 'getAssetQuotaMb', + 'monthly_automation_limit_per_user' => 'getMonthlyAutomationLimitPerUser' ]; /** @@ -328,6 +334,7 @@ public function __construct(?array $data = null) $this->setIfExists('row_limit', $data ?? [], null); $this->setIfExists('quota_total', $data ?? [], null); $this->setIfExists('asset_quota_mb', $data ?? [], null); + $this->setIfExists('monthly_automation_limit_per_user', $data ?? [], null); } /** @@ -722,14 +729,41 @@ public function setAssetQuotaMb($asset_quota_mb) return $this; } + + /** + * Gets monthly_automation_limit_per_user + * + * @return int|null + */ + public function getMonthlyAutomationLimitPerUser() + { + return $this->container['monthly_automation_limit_per_user']; + } + + /** + * Sets monthly_automation_limit_per_user + * + * @param int|null $monthly_automation_limit_per_user Monthly limit on the number of automation rules per user. + * + * @return self + */ + public function setMonthlyAutomationLimitPerUser($monthly_automation_limit_per_user) + { + if (is_null($monthly_automation_limit_per_user)) { + throw new \InvalidArgumentException('non-nullable monthly_automation_limit_per_user cannot be null'); + } + $this->container['monthly_automation_limit_per_user'] = $monthly_automation_limit_per_user; + + return $this; + } /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -737,12 +771,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -767,11 +801,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/SysAdmin/UsersApi.php b/lib/SysAdmin/UsersApi.php index 107a5efe..0f5d25bc 100644 --- a/lib/SysAdmin/UsersApi.php +++ b/lib/SysAdmin/UsersApi.php @@ -14,7 +14,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -176,7 +176,7 @@ public function getConfig() * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return object + * @return \SeaTable\Client\SysAdmin\AddNewUser200Response */ public function addNewUser($add_new_user_request = null, string $contentType = self::contentTypes['addNewUser'][0]) { @@ -194,7 +194,7 @@ public function addNewUser($add_new_user_request = null, string $contentType = s * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) + * @return array of \SeaTable\Client\SysAdmin\AddNewUser200Response, HTTP status code, HTTP response headers (array of strings) */ public function addNewUserWithHttpInfo($add_new_user_request = null, string $contentType = self::contentTypes['addNewUser'][0]) { @@ -226,7 +226,7 @@ public function addNewUserWithHttpInfo($add_new_user_request = null, string $con switch($statusCode) { case 200: return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\SysAdmin\AddNewUser200Response', $request, $response, ); @@ -248,7 +248,7 @@ public function addNewUserWithHttpInfo($add_new_user_request = null, string $con } return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\SysAdmin\AddNewUser200Response', $request, $response, ); @@ -257,7 +257,7 @@ public function addNewUserWithHttpInfo($add_new_user_request = null, string $con case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - 'object', + '\SeaTable\Client\SysAdmin\AddNewUser200Response', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -303,7 +303,7 @@ function ($response) { */ public function addNewUserAsyncWithHttpInfo($add_new_user_request = null, string $contentType = self::contentTypes['addNewUser'][0]) { - $returnType = 'object'; + $returnType = '\SeaTable\Client\SysAdmin\AddNewUser200Response'; $request = $this->addNewUserRequest($add_new_user_request, $contentType); return $this->client @@ -1279,7 +1279,7 @@ public function enforceTwoFactorRequest($user_id, $enforce_two_factor_request = * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return object + * @return \SeaTable\Client\SysAdmin\GetUser200Response */ public function getUser($user_id, string $contentType = self::contentTypes['getUser'][0]) { @@ -1297,7 +1297,7 @@ public function getUser($user_id, string $contentType = self::contentTypes['getU * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) + * @return array of \SeaTable\Client\SysAdmin\GetUser200Response, HTTP status code, HTTP response headers (array of strings) */ public function getUserWithHttpInfo($user_id, string $contentType = self::contentTypes['getUser'][0]) { @@ -1329,7 +1329,7 @@ public function getUserWithHttpInfo($user_id, string $contentType = self::conten switch($statusCode) { case 200: return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\SysAdmin\GetUser200Response', $request, $response, ); @@ -1351,7 +1351,7 @@ public function getUserWithHttpInfo($user_id, string $contentType = self::conten } return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\SysAdmin\GetUser200Response', $request, $response, ); @@ -1360,7 +1360,7 @@ public function getUserWithHttpInfo($user_id, string $contentType = self::conten case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - 'object', + '\SeaTable\Client\SysAdmin\GetUser200Response', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1406,7 +1406,7 @@ function ($response) { */ public function getUserAsyncWithHttpInfo($user_id, string $contentType = self::contentTypes['getUser'][0]) { - $returnType = 'object'; + $returnType = '\SeaTable\Client\SysAdmin\GetUser200Response'; $request = $this->getUserRequest($user_id, $contentType); return $this->client @@ -1547,16 +1547,16 @@ public function getUserRequest($user_id, string $contentType = self::contentType /** * Operation importUsers * - * Import users + * Import Users * - * @param \SplFileObject|null $file file (optional) + * @param \SplFileObject $file file (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['importUsers'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return object */ - public function importUsers($file = null, string $contentType = self::contentTypes['importUsers'][0]) + public function importUsers($file, string $contentType = self::contentTypes['importUsers'][0]) { list($response) = $this->importUsersWithHttpInfo($file, $contentType); return $response; @@ -1565,16 +1565,16 @@ public function importUsers($file = null, string $contentType = self::contentTyp /** * Operation importUsersWithHttpInfo * - * Import users + * Import Users * - * @param \SplFileObject|null $file (optional) + * @param \SplFileObject $file (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['importUsers'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of object, HTTP status code, HTTP response headers (array of strings) */ - public function importUsersWithHttpInfo($file = null, string $contentType = self::contentTypes['importUsers'][0]) + public function importUsersWithHttpInfo($file, string $contentType = self::contentTypes['importUsers'][0]) { $request = $this->importUsersRequest($file, $contentType); @@ -1650,15 +1650,15 @@ public function importUsersWithHttpInfo($file = null, string $contentType = self /** * Operation importUsersAsync * - * Import users + * Import Users * - * @param \SplFileObject|null $file (optional) + * @param \SplFileObject $file (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['importUsers'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function importUsersAsync($file = null, string $contentType = self::contentTypes['importUsers'][0]) + public function importUsersAsync($file, string $contentType = self::contentTypes['importUsers'][0]) { return $this->importUsersAsyncWithHttpInfo($file, $contentType) ->then( @@ -1671,15 +1671,15 @@ function ($response) { /** * Operation importUsersAsyncWithHttpInfo * - * Import users + * Import Users * - * @param \SplFileObject|null $file (optional) + * @param \SplFileObject $file (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['importUsers'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function importUsersAsyncWithHttpInfo($file = null, string $contentType = self::contentTypes['importUsers'][0]) + public function importUsersAsyncWithHttpInfo($file, string $contentType = self::contentTypes['importUsers'][0]) { $returnType = 'object'; $request = $this->importUsersRequest($file, $contentType); @@ -1723,15 +1723,21 @@ function ($exception) { /** * Create request for operation 'importUsers' * - * @param \SplFileObject|null $file (optional) + * @param \SplFileObject $file (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['importUsers'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function importUsersRequest($file = null, string $contentType = self::contentTypes['importUsers'][0]) + public function importUsersRequest($file, string $contentType = self::contentTypes['importUsers'][0]) { + // verify the required parameter 'file' is set + if ($file === null || (is_array($file) && count($file) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $file when calling importUsers' + ); + } $resourcePath = '/api/v2.1/admin/import-users/'; @@ -2381,7 +2387,7 @@ public function listBasesSharedToUserRequest($user_id, $page = null, $per_page = * List User's Storage Objects * * @param string $user_id The unique user id in the form ...@auth.local. This is not the email address of the user. (required) - * @param string|null $parent_dir parent_dir (optional) + * @param string|null $parent_dir The parent directory path. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listUserStorageObjects'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -2400,7 +2406,7 @@ public function listUserStorageObjects($user_id, $parent_dir = null, string $con * List User's Storage Objects * * @param string $user_id The unique user id in the form ...@auth.local. This is not the email address of the user. (required) - * @param string|null $parent_dir (optional) + * @param string|null $parent_dir The parent directory path. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listUserStorageObjects'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -2486,7 +2492,7 @@ public function listUserStorageObjectsWithHttpInfo($user_id, $parent_dir = null, * List User's Storage Objects * * @param string $user_id The unique user id in the form ...@auth.local. This is not the email address of the user. (required) - * @param string|null $parent_dir (optional) + * @param string|null $parent_dir The parent directory path. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listUserStorageObjects'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -2508,7 +2514,7 @@ function ($response) { * List User's Storage Objects * * @param string $user_id The unique user id in the form ...@auth.local. This is not the email address of the user. (required) - * @param string|null $parent_dir (optional) + * @param string|null $parent_dir The parent directory path. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listUserStorageObjects'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -2559,7 +2565,7 @@ function ($exception) { * Create request for operation 'listUserStorageObjects' * * @param string $user_id The unique user id in the form ...@auth.local. This is not the email address of the user. (required) - * @param string|null $parent_dir (optional) + * @param string|null $parent_dir The parent directory path. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listUserStorageObjects'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -2676,7 +2682,7 @@ public function listUserStorageObjectsRequest($user_id, $parent_dir = null, stri * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return object + * @return object|object */ public function listUsers($page = null, $per_page = null, string $contentType = self::contentTypes['listUsers'][0]) { @@ -2695,7 +2701,7 @@ public function listUsers($page = null, $per_page = null, string $contentType = * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) + * @return array of object|object, HTTP status code, HTTP response headers (array of strings) */ public function listUsersWithHttpInfo($page = null, $per_page = null, string $contentType = self::contentTypes['listUsers'][0]) { @@ -2731,6 +2737,12 @@ public function listUsersWithHttpInfo($page = null, $per_page = null, string $co $request, $response, ); + case 403: + return $this->handleResponseWithDataType( + 'object', + $request, + $response, + ); } @@ -2763,6 +2775,14 @@ public function listUsersWithHttpInfo($page = null, $per_page = null, string $co ); $e->setResponseObject($data); throw $e; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + 'object', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; } @@ -3503,8 +3523,8 @@ public function searchUserRequest($query = null, string $contentType = self::con * * Search User by Org-ID * - * @param string|null $query query (optional) - * @param int|null $org_id org_id (optional) + * @param string|null $query Search query string. (optional) + * @param int|null $org_id Filter by team ID. (optional) * @param int|null $limit Limit of search User (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['searchUserByOrgId'] to see the possible values for this operation * @@ -3522,8 +3542,8 @@ public function searchUserByOrgId($query = null, $org_id = null, $limit = null, * * Search User by Org-ID * - * @param string|null $query (optional) - * @param int|null $org_id (optional) + * @param string|null $query Search query string. (optional) + * @param int|null $org_id Filter by team ID. (optional) * @param int|null $limit Limit of search User (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['searchUserByOrgId'] to see the possible values for this operation * @@ -3573,8 +3593,8 @@ public function searchUserByOrgIdWithHttpInfo($query = null, $org_id = null, $li * * Search User by Org-ID * - * @param string|null $query (optional) - * @param int|null $org_id (optional) + * @param string|null $query Search query string. (optional) + * @param int|null $org_id Filter by team ID. (optional) * @param int|null $limit Limit of search User (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['searchUserByOrgId'] to see the possible values for this operation * @@ -3596,8 +3616,8 @@ function ($response) { * * Search User by Org-ID * - * @param string|null $query (optional) - * @param int|null $org_id (optional) + * @param string|null $query Search query string. (optional) + * @param int|null $org_id Filter by team ID. (optional) * @param int|null $limit Limit of search User (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['searchUserByOrgId'] to see the possible values for this operation * @@ -3635,8 +3655,8 @@ function ($exception) { /** * Create request for operation 'searchUserByOrgId' * - * @param string|null $query (optional) - * @param int|null $org_id (optional) + * @param string|null $query Search query string. (optional) + * @param int|null $org_id Filter by team ID. (optional) * @param int|null $limit Limit of search User (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['searchUserByOrgId'] to see the possible values for this operation * @@ -4027,7 +4047,7 @@ public function updateAdminRoleRequest($update_admins_role = null, string $conte * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return object + * @return \SeaTable\Client\SysAdmin\UpdateUser200Response */ public function updateUser($user_id, $update_user_request = null, string $contentType = self::contentTypes['updateUser'][0]) { @@ -4046,7 +4066,7 @@ public function updateUser($user_id, $update_user_request = null, string $conten * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) + * @return array of \SeaTable\Client\SysAdmin\UpdateUser200Response, HTTP status code, HTTP response headers (array of strings) */ public function updateUserWithHttpInfo($user_id, $update_user_request = null, string $contentType = self::contentTypes['updateUser'][0]) { @@ -4078,7 +4098,7 @@ public function updateUserWithHttpInfo($user_id, $update_user_request = null, st switch($statusCode) { case 200: return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\SysAdmin\UpdateUser200Response', $request, $response, ); @@ -4100,7 +4120,7 @@ public function updateUserWithHttpInfo($user_id, $update_user_request = null, st } return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\SysAdmin\UpdateUser200Response', $request, $response, ); @@ -4109,7 +4129,7 @@ public function updateUserWithHttpInfo($user_id, $update_user_request = null, st case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - 'object', + '\SeaTable\Client\SysAdmin\UpdateUser200Response', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -4157,7 +4177,7 @@ function ($response) { */ public function updateUserAsyncWithHttpInfo($user_id, $update_user_request = null, string $contentType = self::contentTypes['updateUser'][0]) { - $returnType = 'object'; + $returnType = '\SeaTable\Client\SysAdmin\UpdateUser200Response'; $request = $this->updateUserRequest($user_id, $update_user_request, $contentType); return $this->client @@ -4320,6 +4340,14 @@ protected function createHttpClientOption() } } + if ($this->config->getCertFile()) { + $options[RequestOptions::CERT] = $this->config->getCertFile(); + } + + if ($this->config->getKeyFile()) { + $options[RequestOptions::SSL_KEY] = $this->config->getKeyFile(); + } + return $options; } diff --git a/lib/TeamAdmin/ActivitiesLogsApi.php b/lib/TeamAdmin/ActivitiesLogsApi.php index f191f496..5ed60e77 100644 --- a/lib/TeamAdmin/ActivitiesLogsApi.php +++ b/lib/TeamAdmin/ActivitiesLogsApi.php @@ -14,7 +14,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -73,12 +73,18 @@ class ActivitiesLogsApi /** @var string[] $contentTypes **/ public const contentTypes = [ + 'listAutomationLogs' => [ + 'application/json', + ], 'listFileAccessLogs' => [ 'application/json', ], 'listGroupMemberAuditLogs' => [ 'application/json', ], + 'listPythonRuns' => [ + 'application/json', + ], 'listTeamLogins' => [ 'application/json', ], @@ -90,89 +96,759 @@ class ActivitiesLogsApi ], ]; - /** - * @param ClientInterface $client - * @param Configuration $config - * @param HeaderSelector $selector - * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec - */ - public function __construct( - ?ClientInterface $client = null, - ?Configuration $config = null, - ?HeaderSelector $selector = null, - int $hostIndex = 0 - ) { - $this->client = $client ?: new Client(); - $this->config = $config ?: Configuration::getDefaultConfiguration(); - $this->headerSelector = $selector ?: new HeaderSelector(); - $this->hostIndex = $hostIndex; - } + /** + * @param ClientInterface $client + * @param Configuration $config + * @param HeaderSelector $selector + * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec + */ + public function __construct( + ?ClientInterface $client = null, + ?Configuration $config = null, + ?HeaderSelector $selector = null, + int $hostIndex = 0 + ) { + $this->client = $client ?: new Client(); + $this->config = $config ?: Configuration::getDefaultConfiguration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + $this->hostIndex = $hostIndex; + } + + /** + * Set the host index + * + * @param int $hostIndex Host index (required) + */ + public function setHostIndex($hostIndex): void + { + $this->hostIndex = $hostIndex; + } + + /** + * Get the host index + * + * @return int Host index + */ + public function getHostIndex() + { + return $this->hostIndex; + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->config; + } + + /** + * Operation listAutomationLogs + * + * List Automation Logs + * + * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) + * @param string|null $dtable_uuid The unique identifier of a base. (optional) + * @param \DateTime|null $start Start date in ISO format. (optional) + * @param \DateTime|null $end End date in ISO format. (optional) + * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) + * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listAutomationLogs'] to see the possible values for this operation + * + * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return object + */ + public function listAutomationLogs($org_id, $dtable_uuid = null, $start = null, $end = null, $page = null, $per_page = null, string $contentType = self::contentTypes['listAutomationLogs'][0]) + { + list($response) = $this->listAutomationLogsWithHttpInfo($org_id, $dtable_uuid, $start, $end, $page, $per_page, $contentType); + return $response; + } + + /** + * Operation listAutomationLogsWithHttpInfo + * + * List Automation Logs + * + * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) + * @param string|null $dtable_uuid The unique identifier of a base. (optional) + * @param \DateTime|null $start Start date in ISO format. (optional) + * @param \DateTime|null $end End date in ISO format. (optional) + * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) + * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listAutomationLogs'] to see the possible values for this operation + * + * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of object, HTTP status code, HTTP response headers (array of strings) + */ + public function listAutomationLogsWithHttpInfo($org_id, $dtable_uuid = null, $start = null, $end = null, $page = null, $per_page = null, string $contentType = self::contentTypes['listAutomationLogs'][0]) + { + $request = $this->listAutomationLogsRequest($org_id, $dtable_uuid, $start, $end, $page, $per_page, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + 'object', + $request, + $response, + ); + } + + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + 'object', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + 'object', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + + throw $e; + } + } + + /** + * Operation listAutomationLogsAsync + * + * List Automation Logs + * + * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) + * @param string|null $dtable_uuid The unique identifier of a base. (optional) + * @param \DateTime|null $start Start date in ISO format. (optional) + * @param \DateTime|null $end End date in ISO format. (optional) + * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) + * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listAutomationLogs'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function listAutomationLogsAsync($org_id, $dtable_uuid = null, $start = null, $end = null, $page = null, $per_page = null, string $contentType = self::contentTypes['listAutomationLogs'][0]) + { + return $this->listAutomationLogsAsyncWithHttpInfo($org_id, $dtable_uuid, $start, $end, $page, $per_page, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation listAutomationLogsAsyncWithHttpInfo + * + * List Automation Logs + * + * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) + * @param string|null $dtable_uuid The unique identifier of a base. (optional) + * @param \DateTime|null $start Start date in ISO format. (optional) + * @param \DateTime|null $end End date in ISO format. (optional) + * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) + * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listAutomationLogs'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function listAutomationLogsAsyncWithHttpInfo($org_id, $dtable_uuid = null, $start = null, $end = null, $page = null, $per_page = null, string $contentType = self::contentTypes['listAutomationLogs'][0]) + { + $returnType = 'object'; + $request = $this->listAutomationLogsRequest($org_id, $dtable_uuid, $start, $end, $page, $per_page, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'listAutomationLogs' + * + * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) + * @param string|null $dtable_uuid The unique identifier of a base. (optional) + * @param \DateTime|null $start Start date in ISO format. (optional) + * @param \DateTime|null $end End date in ISO format. (optional) + * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) + * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listAutomationLogs'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function listAutomationLogsRequest($org_id, $dtable_uuid = null, $start = null, $end = null, $page = null, $per_page = null, string $contentType = self::contentTypes['listAutomationLogs'][0]) + { + + // verify the required parameter 'org_id' is set + if ($org_id === null || (is_array($org_id) && count($org_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $org_id when calling listAutomationLogs' + ); + } + if ($org_id < 1) { + throw new \InvalidArgumentException('invalid value for "$org_id" when calling ActivitiesLogsApi.listAutomationLogs, must be bigger than or equal to 1.'); + } + + if ($dtable_uuid !== null && !preg_match("/^[0-9a-fA-F]{8}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{12}$/", $dtable_uuid)) { + throw new \InvalidArgumentException("invalid value for \"dtable_uuid\" when calling ActivitiesLogsApi.listAutomationLogs, must conform to the pattern /^[0-9a-fA-F]{8}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{12}$/."); + } + + + + if ($page !== null && $page < 1) { + throw new \InvalidArgumentException('invalid value for "$page" when calling ActivitiesLogsApi.listAutomationLogs, must be bigger than or equal to 1.'); + } + + if ($per_page !== null && $per_page < 1) { + throw new \InvalidArgumentException('invalid value for "$per_page" when calling ActivitiesLogsApi.listAutomationLogs, must be bigger than or equal to 1.'); + } + + + $resourcePath = '/api/v2.1/org/{org_id}/admin/automation-logs/'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $dtable_uuid, + 'dtable_uuid', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $start, + 'start', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $end, + 'end', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $page, + 'page', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $per_page, + 'per_page', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + + + // path params + if ($org_id !== null) { + $resourcePath = str_replace( + '{' . 'org_id' . '}', + ObjectSerializer::toPathValue($org_id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation listFileAccessLogs + * + * List File Access Logs + * + * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) + * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) + * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listFileAccessLogs'] to see the possible values for this operation + * + * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return object + */ + public function listFileAccessLogs($org_id, $page = null, $per_page = null, string $contentType = self::contentTypes['listFileAccessLogs'][0]) + { + list($response) = $this->listFileAccessLogsWithHttpInfo($org_id, $page, $per_page, $contentType); + return $response; + } + + /** + * Operation listFileAccessLogsWithHttpInfo + * + * List File Access Logs + * + * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) + * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) + * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listFileAccessLogs'] to see the possible values for this operation + * + * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of object, HTTP status code, HTTP response headers (array of strings) + */ + public function listFileAccessLogsWithHttpInfo($org_id, $page = null, $per_page = null, string $contentType = self::contentTypes['listFileAccessLogs'][0]) + { + $request = $this->listFileAccessLogsRequest($org_id, $page, $per_page, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + 'object', + $request, + $response, + ); + } + + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + 'object', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + 'object', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + + throw $e; + } + } + + /** + * Operation listFileAccessLogsAsync + * + * List File Access Logs + * + * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) + * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) + * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listFileAccessLogs'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function listFileAccessLogsAsync($org_id, $page = null, $per_page = null, string $contentType = self::contentTypes['listFileAccessLogs'][0]) + { + return $this->listFileAccessLogsAsyncWithHttpInfo($org_id, $page, $per_page, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation listFileAccessLogsAsyncWithHttpInfo + * + * List File Access Logs + * + * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) + * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) + * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listFileAccessLogs'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function listFileAccessLogsAsyncWithHttpInfo($org_id, $page = null, $per_page = null, string $contentType = self::contentTypes['listFileAccessLogs'][0]) + { + $returnType = 'object'; + $request = $this->listFileAccessLogsRequest($org_id, $page, $per_page, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'listFileAccessLogs' + * + * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) + * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) + * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listFileAccessLogs'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function listFileAccessLogsRequest($org_id, $page = null, $per_page = null, string $contentType = self::contentTypes['listFileAccessLogs'][0]) + { + + // verify the required parameter 'org_id' is set + if ($org_id === null || (is_array($org_id) && count($org_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $org_id when calling listFileAccessLogs' + ); + } + if ($org_id < 1) { + throw new \InvalidArgumentException('invalid value for "$org_id" when calling ActivitiesLogsApi.listFileAccessLogs, must be bigger than or equal to 1.'); + } + + if ($page !== null && $page < 1) { + throw new \InvalidArgumentException('invalid value for "$page" when calling ActivitiesLogsApi.listFileAccessLogs, must be bigger than or equal to 1.'); + } + + if ($per_page !== null && $per_page < 1) { + throw new \InvalidArgumentException('invalid value for "$per_page" when calling ActivitiesLogsApi.listFileAccessLogs, must be bigger than or equal to 1.'); + } + + + $resourcePath = '/api/v2.1/org/{org_id}/admin/file-access-logs/'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $page, + 'page', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $per_page, + 'per_page', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + - /** - * Set the host index - * - * @param int $hostIndex Host index (required) - */ - public function setHostIndex($hostIndex): void - { - $this->hostIndex = $hostIndex; - } + // path params + if ($org_id !== null) { + $resourcePath = str_replace( + '{' . 'org_id' . '}', + ObjectSerializer::toPathValue($org_id), + $resourcePath + ); + } - /** - * Get the host index - * - * @return int Host index - */ - public function getHostIndex() - { - return $this->hostIndex; - } - /** - * @return Configuration - */ - public function getConfig() - { - return $this->config; + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); } /** - * Operation listFileAccessLogs + * Operation listGroupMemberAuditLogs * - * List File Access Logs + * List Group Member Audit Logs * * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listFileAccessLogs'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listGroupMemberAuditLogs'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return object */ - public function listFileAccessLogs($org_id, $page = null, $per_page = null, string $contentType = self::contentTypes['listFileAccessLogs'][0]) + public function listGroupMemberAuditLogs($org_id, $page = null, $per_page = null, string $contentType = self::contentTypes['listGroupMemberAuditLogs'][0]) { - list($response) = $this->listFileAccessLogsWithHttpInfo($org_id, $page, $per_page, $contentType); + list($response) = $this->listGroupMemberAuditLogsWithHttpInfo($org_id, $page, $per_page, $contentType); return $response; } /** - * Operation listFileAccessLogsWithHttpInfo + * Operation listGroupMemberAuditLogsWithHttpInfo * - * List File Access Logs + * List Group Member Audit Logs * * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listFileAccessLogs'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listGroupMemberAuditLogs'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of object, HTTP status code, HTTP response headers (array of strings) */ - public function listFileAccessLogsWithHttpInfo($org_id, $page = null, $per_page = null, string $contentType = self::contentTypes['listFileAccessLogs'][0]) + public function listGroupMemberAuditLogsWithHttpInfo($org_id, $page = null, $per_page = null, string $contentType = self::contentTypes['listGroupMemberAuditLogs'][0]) { - $request = $this->listFileAccessLogsRequest($org_id, $page, $per_page, $contentType); + $request = $this->listGroupMemberAuditLogsRequest($org_id, $page, $per_page, $contentType); try { $options = $this->createHttpClientOption(); @@ -244,21 +920,21 @@ public function listFileAccessLogsWithHttpInfo($org_id, $page = null, $per_page } /** - * Operation listFileAccessLogsAsync + * Operation listGroupMemberAuditLogsAsync * - * List File Access Logs + * List Group Member Audit Logs * * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listFileAccessLogs'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listGroupMemberAuditLogs'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function listFileAccessLogsAsync($org_id, $page = null, $per_page = null, string $contentType = self::contentTypes['listFileAccessLogs'][0]) + public function listGroupMemberAuditLogsAsync($org_id, $page = null, $per_page = null, string $contentType = self::contentTypes['listGroupMemberAuditLogs'][0]) { - return $this->listFileAccessLogsAsyncWithHttpInfo($org_id, $page, $per_page, $contentType) + return $this->listGroupMemberAuditLogsAsyncWithHttpInfo($org_id, $page, $per_page, $contentType) ->then( function ($response) { return $response[0]; @@ -267,22 +943,22 @@ function ($response) { } /** - * Operation listFileAccessLogsAsyncWithHttpInfo + * Operation listGroupMemberAuditLogsAsyncWithHttpInfo * - * List File Access Logs + * List Group Member Audit Logs * * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listFileAccessLogs'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listGroupMemberAuditLogs'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function listFileAccessLogsAsyncWithHttpInfo($org_id, $page = null, $per_page = null, string $contentType = self::contentTypes['listFileAccessLogs'][0]) + public function listGroupMemberAuditLogsAsyncWithHttpInfo($org_id, $page = null, $per_page = null, string $contentType = self::contentTypes['listGroupMemberAuditLogs'][0]) { $returnType = 'object'; - $request = $this->listFileAccessLogsRequest($org_id, $page, $per_page, $contentType); + $request = $this->listGroupMemberAuditLogsRequest($org_id, $page, $per_page, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -321,39 +997,39 @@ function ($exception) { } /** - * Create request for operation 'listFileAccessLogs' + * Create request for operation 'listGroupMemberAuditLogs' * * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listFileAccessLogs'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listGroupMemberAuditLogs'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function listFileAccessLogsRequest($org_id, $page = null, $per_page = null, string $contentType = self::contentTypes['listFileAccessLogs'][0]) + public function listGroupMemberAuditLogsRequest($org_id, $page = null, $per_page = null, string $contentType = self::contentTypes['listGroupMemberAuditLogs'][0]) { // verify the required parameter 'org_id' is set if ($org_id === null || (is_array($org_id) && count($org_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $org_id when calling listFileAccessLogs' + 'Missing the required parameter $org_id when calling listGroupMemberAuditLogs' ); } if ($org_id < 1) { - throw new \InvalidArgumentException('invalid value for "$org_id" when calling ActivitiesLogsApi.listFileAccessLogs, must be bigger than or equal to 1.'); + throw new \InvalidArgumentException('invalid value for "$org_id" when calling ActivitiesLogsApi.listGroupMemberAuditLogs, must be bigger than or equal to 1.'); } if ($page !== null && $page < 1) { - throw new \InvalidArgumentException('invalid value for "$page" when calling ActivitiesLogsApi.listFileAccessLogs, must be bigger than or equal to 1.'); + throw new \InvalidArgumentException('invalid value for "$page" when calling ActivitiesLogsApi.listGroupMemberAuditLogs, must be bigger than or equal to 1.'); } if ($per_page !== null && $per_page < 1) { - throw new \InvalidArgumentException('invalid value for "$per_page" when calling ActivitiesLogsApi.listFileAccessLogs, must be bigger than or equal to 1.'); + throw new \InvalidArgumentException('invalid value for "$per_page" when calling ActivitiesLogsApi.listGroupMemberAuditLogs, must be bigger than or equal to 1.'); } - $resourcePath = '/api/v2.1/org/{org_id}/admin/file-access-logs/'; + $resourcePath = '/api/v2.1/org/{org_id}/admin/group-member-audit/'; $formParams = []; $queryParams = []; $headerParams = []; @@ -448,42 +1124,48 @@ public function listFileAccessLogsRequest($org_id, $page = null, $per_page = nul } /** - * Operation listGroupMemberAuditLogs + * Operation listPythonRuns * - * List Group Member Audit Logs + * List Python Runs * * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) + * @param string|null $dtable_uuid The unique identifier of a base. (optional) + * @param \DateTime|null $start Start date in ISO format. (optional) + * @param \DateTime|null $end End date in ISO format. (optional) * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listGroupMemberAuditLogs'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listPythonRuns'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return object */ - public function listGroupMemberAuditLogs($org_id, $page = null, $per_page = null, string $contentType = self::contentTypes['listGroupMemberAuditLogs'][0]) + public function listPythonRuns($org_id, $dtable_uuid = null, $start = null, $end = null, $page = null, $per_page = null, string $contentType = self::contentTypes['listPythonRuns'][0]) { - list($response) = $this->listGroupMemberAuditLogsWithHttpInfo($org_id, $page, $per_page, $contentType); + list($response) = $this->listPythonRunsWithHttpInfo($org_id, $dtable_uuid, $start, $end, $page, $per_page, $contentType); return $response; } /** - * Operation listGroupMemberAuditLogsWithHttpInfo + * Operation listPythonRunsWithHttpInfo * - * List Group Member Audit Logs + * List Python Runs * * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) + * @param string|null $dtable_uuid The unique identifier of a base. (optional) + * @param \DateTime|null $start Start date in ISO format. (optional) + * @param \DateTime|null $end End date in ISO format. (optional) * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listGroupMemberAuditLogs'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listPythonRuns'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of object, HTTP status code, HTTP response headers (array of strings) */ - public function listGroupMemberAuditLogsWithHttpInfo($org_id, $page = null, $per_page = null, string $contentType = self::contentTypes['listGroupMemberAuditLogs'][0]) + public function listPythonRunsWithHttpInfo($org_id, $dtable_uuid = null, $start = null, $end = null, $page = null, $per_page = null, string $contentType = self::contentTypes['listPythonRuns'][0]) { - $request = $this->listGroupMemberAuditLogsRequest($org_id, $page, $per_page, $contentType); + $request = $this->listPythonRunsRequest($org_id, $dtable_uuid, $start, $end, $page, $per_page, $contentType); try { $options = $this->createHttpClientOption(); @@ -555,21 +1237,24 @@ public function listGroupMemberAuditLogsWithHttpInfo($org_id, $page = null, $per } /** - * Operation listGroupMemberAuditLogsAsync + * Operation listPythonRunsAsync * - * List Group Member Audit Logs + * List Python Runs * * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) + * @param string|null $dtable_uuid The unique identifier of a base. (optional) + * @param \DateTime|null $start Start date in ISO format. (optional) + * @param \DateTime|null $end End date in ISO format. (optional) * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listGroupMemberAuditLogs'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listPythonRuns'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function listGroupMemberAuditLogsAsync($org_id, $page = null, $per_page = null, string $contentType = self::contentTypes['listGroupMemberAuditLogs'][0]) + public function listPythonRunsAsync($org_id, $dtable_uuid = null, $start = null, $end = null, $page = null, $per_page = null, string $contentType = self::contentTypes['listPythonRuns'][0]) { - return $this->listGroupMemberAuditLogsAsyncWithHttpInfo($org_id, $page, $per_page, $contentType) + return $this->listPythonRunsAsyncWithHttpInfo($org_id, $dtable_uuid, $start, $end, $page, $per_page, $contentType) ->then( function ($response) { return $response[0]; @@ -578,22 +1263,25 @@ function ($response) { } /** - * Operation listGroupMemberAuditLogsAsyncWithHttpInfo + * Operation listPythonRunsAsyncWithHttpInfo * - * List Group Member Audit Logs + * List Python Runs * * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) + * @param string|null $dtable_uuid The unique identifier of a base. (optional) + * @param \DateTime|null $start Start date in ISO format. (optional) + * @param \DateTime|null $end End date in ISO format. (optional) * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listGroupMemberAuditLogs'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listPythonRuns'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function listGroupMemberAuditLogsAsyncWithHttpInfo($org_id, $page = null, $per_page = null, string $contentType = self::contentTypes['listGroupMemberAuditLogs'][0]) + public function listPythonRunsAsyncWithHttpInfo($org_id, $dtable_uuid = null, $start = null, $end = null, $page = null, $per_page = null, string $contentType = self::contentTypes['listPythonRuns'][0]) { $returnType = 'object'; - $request = $this->listGroupMemberAuditLogsRequest($org_id, $page, $per_page, $contentType); + $request = $this->listPythonRunsRequest($org_id, $dtable_uuid, $start, $end, $page, $per_page, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -632,45 +1320,81 @@ function ($exception) { } /** - * Create request for operation 'listGroupMemberAuditLogs' + * Create request for operation 'listPythonRuns' * * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) + * @param string|null $dtable_uuid The unique identifier of a base. (optional) + * @param \DateTime|null $start Start date in ISO format. (optional) + * @param \DateTime|null $end End date in ISO format. (optional) * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listGroupMemberAuditLogs'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listPythonRuns'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function listGroupMemberAuditLogsRequest($org_id, $page = null, $per_page = null, string $contentType = self::contentTypes['listGroupMemberAuditLogs'][0]) + public function listPythonRunsRequest($org_id, $dtable_uuid = null, $start = null, $end = null, $page = null, $per_page = null, string $contentType = self::contentTypes['listPythonRuns'][0]) { // verify the required parameter 'org_id' is set if ($org_id === null || (is_array($org_id) && count($org_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $org_id when calling listGroupMemberAuditLogs' + 'Missing the required parameter $org_id when calling listPythonRuns' ); } if ($org_id < 1) { - throw new \InvalidArgumentException('invalid value for "$org_id" when calling ActivitiesLogsApi.listGroupMemberAuditLogs, must be bigger than or equal to 1.'); + throw new \InvalidArgumentException('invalid value for "$org_id" when calling ActivitiesLogsApi.listPythonRuns, must be bigger than or equal to 1.'); + } + + if ($dtable_uuid !== null && !preg_match("/^[0-9a-fA-F]{8}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{12}$/", $dtable_uuid)) { + throw new \InvalidArgumentException("invalid value for \"dtable_uuid\" when calling ActivitiesLogsApi.listPythonRuns, must conform to the pattern /^[0-9a-fA-F]{8}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{12}$/."); } + + if ($page !== null && $page < 1) { - throw new \InvalidArgumentException('invalid value for "$page" when calling ActivitiesLogsApi.listGroupMemberAuditLogs, must be bigger than or equal to 1.'); + throw new \InvalidArgumentException('invalid value for "$page" when calling ActivitiesLogsApi.listPythonRuns, must be bigger than or equal to 1.'); } if ($per_page !== null && $per_page < 1) { - throw new \InvalidArgumentException('invalid value for "$per_page" when calling ActivitiesLogsApi.listGroupMemberAuditLogs, must be bigger than or equal to 1.'); + throw new \InvalidArgumentException('invalid value for "$per_page" when calling ActivitiesLogsApi.listPythonRuns, must be bigger than or equal to 1.'); } - $resourcePath = '/api/v2.1/org/{org_id}/admin/group-member-audit/'; + $resourcePath = '/api/v2.1/org/{org_id}/admin/python-runs/'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $dtable_uuid, + 'dtable_uuid', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $start, + 'start', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $end, + 'end', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( $page, @@ -766,15 +1490,18 @@ public function listGroupMemberAuditLogsRequest($org_id, $page = null, $per_page * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) + * @param string|null $status Set this to `success` to only return successful logins. By default, all logins are returned. (optional) + * @param \DateTime|null $start Start date in ISO format. (optional) + * @param \DateTime|null $end End date in ISO format. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listTeamLogins'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return object */ - public function listTeamLogins($org_id, $page = null, $per_page = null, string $contentType = self::contentTypes['listTeamLogins'][0]) + public function listTeamLogins($org_id, $page = null, $per_page = null, $status = null, $start = null, $end = null, string $contentType = self::contentTypes['listTeamLogins'][0]) { - list($response) = $this->listTeamLoginsWithHttpInfo($org_id, $page, $per_page, $contentType); + list($response) = $this->listTeamLoginsWithHttpInfo($org_id, $page, $per_page, $status, $start, $end, $contentType); return $response; } @@ -786,15 +1513,18 @@ public function listTeamLogins($org_id, $page = null, $per_page = null, string $ * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) + * @param string|null $status Set this to `success` to only return successful logins. By default, all logins are returned. (optional) + * @param \DateTime|null $start Start date in ISO format. (optional) + * @param \DateTime|null $end End date in ISO format. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listTeamLogins'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of object, HTTP status code, HTTP response headers (array of strings) */ - public function listTeamLoginsWithHttpInfo($org_id, $page = null, $per_page = null, string $contentType = self::contentTypes['listTeamLogins'][0]) + public function listTeamLoginsWithHttpInfo($org_id, $page = null, $per_page = null, $status = null, $start = null, $end = null, string $contentType = self::contentTypes['listTeamLogins'][0]) { - $request = $this->listTeamLoginsRequest($org_id, $page, $per_page, $contentType); + $request = $this->listTeamLoginsRequest($org_id, $page, $per_page, $status, $start, $end, $contentType); try { $options = $this->createHttpClientOption(); @@ -873,14 +1603,17 @@ public function listTeamLoginsWithHttpInfo($org_id, $page = null, $per_page = nu * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) + * @param string|null $status Set this to `success` to only return successful logins. By default, all logins are returned. (optional) + * @param \DateTime|null $start Start date in ISO format. (optional) + * @param \DateTime|null $end End date in ISO format. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listTeamLogins'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function listTeamLoginsAsync($org_id, $page = null, $per_page = null, string $contentType = self::contentTypes['listTeamLogins'][0]) + public function listTeamLoginsAsync($org_id, $page = null, $per_page = null, $status = null, $start = null, $end = null, string $contentType = self::contentTypes['listTeamLogins'][0]) { - return $this->listTeamLoginsAsyncWithHttpInfo($org_id, $page, $per_page, $contentType) + return $this->listTeamLoginsAsyncWithHttpInfo($org_id, $page, $per_page, $status, $start, $end, $contentType) ->then( function ($response) { return $response[0]; @@ -896,15 +1629,18 @@ function ($response) { * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) + * @param string|null $status Set this to `success` to only return successful logins. By default, all logins are returned. (optional) + * @param \DateTime|null $start Start date in ISO format. (optional) + * @param \DateTime|null $end End date in ISO format. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listTeamLogins'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function listTeamLoginsAsyncWithHttpInfo($org_id, $page = null, $per_page = null, string $contentType = self::contentTypes['listTeamLogins'][0]) + public function listTeamLoginsAsyncWithHttpInfo($org_id, $page = null, $per_page = null, $status = null, $start = null, $end = null, string $contentType = self::contentTypes['listTeamLogins'][0]) { $returnType = 'object'; - $request = $this->listTeamLoginsRequest($org_id, $page, $per_page, $contentType); + $request = $this->listTeamLoginsRequest($org_id, $page, $per_page, $status, $start, $end, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -948,12 +1684,15 @@ function ($exception) { * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) + * @param string|null $status Set this to `success` to only return successful logins. By default, all logins are returned. (optional) + * @param \DateTime|null $start Start date in ISO format. (optional) + * @param \DateTime|null $end End date in ISO format. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listTeamLogins'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function listTeamLoginsRequest($org_id, $page = null, $per_page = null, string $contentType = self::contentTypes['listTeamLogins'][0]) + public function listTeamLoginsRequest($org_id, $page = null, $per_page = null, $status = null, $start = null, $end = null, string $contentType = self::contentTypes['listTeamLogins'][0]) { // verify the required parameter 'org_id' is set @@ -975,6 +1714,9 @@ public function listTeamLoginsRequest($org_id, $page = null, $per_page = null, s } + + + $resourcePath = '/api/v2.1/org/{org_id}/admin/login-logs/'; $formParams = []; $queryParams = []; @@ -1000,6 +1742,33 @@ public function listTeamLoginsRequest($org_id, $page = null, $per_page = null, s true, // explode false // required ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $status, + 'status', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $start, + 'start', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $end, + 'end', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); // path params @@ -1077,15 +1846,18 @@ public function listTeamLoginsRequest($org_id, $page = null, $per_page = null, s * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) + * @param string|null $operation_group Filter by a specific operation group. By default, all operations are returned. (optional) + * @param \DateTime|null $start Start date in ISO format. (optional) + * @param \DateTime|null $end End date in ISO format. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listTeamOperationLog'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return object */ - public function listTeamOperationLog($org_id, $page = null, $per_page = null, string $contentType = self::contentTypes['listTeamOperationLog'][0]) + public function listTeamOperationLog($org_id, $page = null, $per_page = null, $operation_group = null, $start = null, $end = null, string $contentType = self::contentTypes['listTeamOperationLog'][0]) { - list($response) = $this->listTeamOperationLogWithHttpInfo($org_id, $page, $per_page, $contentType); + list($response) = $this->listTeamOperationLogWithHttpInfo($org_id, $page, $per_page, $operation_group, $start, $end, $contentType); return $response; } @@ -1097,15 +1869,18 @@ public function listTeamOperationLog($org_id, $page = null, $per_page = null, st * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) + * @param string|null $operation_group Filter by a specific operation group. By default, all operations are returned. (optional) + * @param \DateTime|null $start Start date in ISO format. (optional) + * @param \DateTime|null $end End date in ISO format. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listTeamOperationLog'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of object, HTTP status code, HTTP response headers (array of strings) */ - public function listTeamOperationLogWithHttpInfo($org_id, $page = null, $per_page = null, string $contentType = self::contentTypes['listTeamOperationLog'][0]) + public function listTeamOperationLogWithHttpInfo($org_id, $page = null, $per_page = null, $operation_group = null, $start = null, $end = null, string $contentType = self::contentTypes['listTeamOperationLog'][0]) { - $request = $this->listTeamOperationLogRequest($org_id, $page, $per_page, $contentType); + $request = $this->listTeamOperationLogRequest($org_id, $page, $per_page, $operation_group, $start, $end, $contentType); try { $options = $this->createHttpClientOption(); @@ -1184,14 +1959,17 @@ public function listTeamOperationLogWithHttpInfo($org_id, $page = null, $per_pag * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) + * @param string|null $operation_group Filter by a specific operation group. By default, all operations are returned. (optional) + * @param \DateTime|null $start Start date in ISO format. (optional) + * @param \DateTime|null $end End date in ISO format. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listTeamOperationLog'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function listTeamOperationLogAsync($org_id, $page = null, $per_page = null, string $contentType = self::contentTypes['listTeamOperationLog'][0]) + public function listTeamOperationLogAsync($org_id, $page = null, $per_page = null, $operation_group = null, $start = null, $end = null, string $contentType = self::contentTypes['listTeamOperationLog'][0]) { - return $this->listTeamOperationLogAsyncWithHttpInfo($org_id, $page, $per_page, $contentType) + return $this->listTeamOperationLogAsyncWithHttpInfo($org_id, $page, $per_page, $operation_group, $start, $end, $contentType) ->then( function ($response) { return $response[0]; @@ -1207,15 +1985,18 @@ function ($response) { * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) + * @param string|null $operation_group Filter by a specific operation group. By default, all operations are returned. (optional) + * @param \DateTime|null $start Start date in ISO format. (optional) + * @param \DateTime|null $end End date in ISO format. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listTeamOperationLog'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function listTeamOperationLogAsyncWithHttpInfo($org_id, $page = null, $per_page = null, string $contentType = self::contentTypes['listTeamOperationLog'][0]) + public function listTeamOperationLogAsyncWithHttpInfo($org_id, $page = null, $per_page = null, $operation_group = null, $start = null, $end = null, string $contentType = self::contentTypes['listTeamOperationLog'][0]) { $returnType = 'object'; - $request = $this->listTeamOperationLogRequest($org_id, $page, $per_page, $contentType); + $request = $this->listTeamOperationLogRequest($org_id, $page, $per_page, $operation_group, $start, $end, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1259,12 +2040,15 @@ function ($exception) { * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) + * @param string|null $operation_group Filter by a specific operation group. By default, all operations are returned. (optional) + * @param \DateTime|null $start Start date in ISO format. (optional) + * @param \DateTime|null $end End date in ISO format. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listTeamOperationLog'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function listTeamOperationLogRequest($org_id, $page = null, $per_page = null, string $contentType = self::contentTypes['listTeamOperationLog'][0]) + public function listTeamOperationLogRequest($org_id, $page = null, $per_page = null, $operation_group = null, $start = null, $end = null, string $contentType = self::contentTypes['listTeamOperationLog'][0]) { // verify the required parameter 'org_id' is set @@ -1286,6 +2070,9 @@ public function listTeamOperationLogRequest($org_id, $page = null, $per_page = n } + + + $resourcePath = '/api/v2.1/org/{org_id}/admin/admin-logs/'; $formParams = []; $queryParams = []; @@ -1311,6 +2098,33 @@ public function listTeamOperationLogRequest($org_id, $page = null, $per_page = n true, // explode false // required ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $operation_group, + 'operation_group', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $start, + 'start', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $end, + 'end', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); // path params @@ -1730,6 +2544,14 @@ protected function createHttpClientOption() } } + if ($this->config->getCertFile()) { + $options[RequestOptions::CERT] = $this->config->getCertFile(); + } + + if ($this->config->getKeyFile()) { + $options[RequestOptions::SSL_KEY] = $this->config->getKeyFile(); + } + return $options; } diff --git a/lib/TeamAdmin/AddGroup200Response.php b/lib/TeamAdmin/AddGroup200Response.php new file mode 100644 index 00000000..99a0f899 --- /dev/null +++ b/lib/TeamAdmin/AddGroup200Response.php @@ -0,0 +1,578 @@ + + */ +class AddGroup200Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'addGroup_200_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'id' => 'int', + 'group_name' => 'string', + 'ctime' => 'string', + 'creator_email' => 'string', + 'creator_name' => 'string', + 'creator_contact_email' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'id' => null, + 'group_name' => null, + 'ctime' => null, + 'creator_email' => null, + 'creator_name' => null, + 'creator_contact_email' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'id' => false, + 'group_name' => false, + 'ctime' => false, + 'creator_email' => false, + 'creator_name' => false, + 'creator_contact_email' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'group_name' => 'group_name', + 'ctime' => 'ctime', + 'creator_email' => 'creator_email', + 'creator_name' => 'creator_name', + 'creator_contact_email' => 'creator_contact_email' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'group_name' => 'setGroupName', + 'ctime' => 'setCtime', + 'creator_email' => 'setCreatorEmail', + 'creator_name' => 'setCreatorName', + 'creator_contact_email' => 'setCreatorContactEmail' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'group_name' => 'getGroupName', + 'ctime' => 'getCtime', + 'creator_email' => 'getCreatorEmail', + 'creator_name' => 'getCreatorName', + 'creator_contact_email' => 'getCreatorContactEmail' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('group_name', $data ?? [], null); + $this->setIfExists('ctime', $data ?? [], null); + $this->setIfExists('creator_email', $data ?? [], null); + $this->setIfExists('creator_name', $data ?? [], null); + $this->setIfExists('creator_contact_email', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return int|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int|null $id id + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets group_name + * + * @return string|null + */ + public function getGroupName() + { + return $this->container['group_name']; + } + + /** + * Sets group_name + * + * @param string|null $group_name group_name + * + * @return self + */ + public function setGroupName($group_name) + { + if (is_null($group_name)) { + throw new \InvalidArgumentException('non-nullable group_name cannot be null'); + } + $this->container['group_name'] = $group_name; + + return $this; + } + + /** + * Gets ctime + * + * @return string|null + */ + public function getCtime() + { + return $this->container['ctime']; + } + + /** + * Sets ctime + * + * @param string|null $ctime ctime + * + * @return self + */ + public function setCtime($ctime) + { + if (is_null($ctime)) { + throw new \InvalidArgumentException('non-nullable ctime cannot be null'); + } + $this->container['ctime'] = $ctime; + + return $this; + } + + /** + * Gets creator_email + * + * @return string|null + */ + public function getCreatorEmail() + { + return $this->container['creator_email']; + } + + /** + * Sets creator_email + * + * @param string|null $creator_email creator_email + * + * @return self + */ + public function setCreatorEmail($creator_email) + { + if (is_null($creator_email)) { + throw new \InvalidArgumentException('non-nullable creator_email cannot be null'); + } + $this->container['creator_email'] = $creator_email; + + return $this; + } + + /** + * Gets creator_name + * + * @return string|null + */ + public function getCreatorName() + { + return $this->container['creator_name']; + } + + /** + * Sets creator_name + * + * @param string|null $creator_name creator_name + * + * @return self + */ + public function setCreatorName($creator_name) + { + if (is_null($creator_name)) { + throw new \InvalidArgumentException('non-nullable creator_name cannot be null'); + } + $this->container['creator_name'] = $creator_name; + + return $this; + } + + /** + * Gets creator_contact_email + * + * @return string|null + */ + public function getCreatorContactEmail() + { + return $this->container['creator_contact_email']; + } + + /** + * Sets creator_contact_email + * + * @param string|null $creator_contact_email creator_contact_email + * + * @return self + */ + public function setCreatorContactEmail($creator_contact_email) + { + if (is_null($creator_contact_email)) { + throw new \InvalidArgumentException('non-nullable creator_contact_email cannot be null'); + } + $this->container['creator_contact_email'] = $creator_contact_email; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/TeamAdmin/AddUser200Response.php b/lib/TeamAdmin/AddUser200Response.php new file mode 100644 index 00000000..116519d8 --- /dev/null +++ b/lib/TeamAdmin/AddUser200Response.php @@ -0,0 +1,714 @@ + + */ +class AddUser200Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'addUser_200_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'id' => 'int', + 'is_active' => 'bool', + 'ctime' => 'string', + 'name' => 'string', + 'email' => 'string', + 'contact_email' => 'string', + 'last_login' => 'string', + 'self_usage' => 'int', + 'quota' => 'int', + 'workspace_id' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'id' => null, + 'is_active' => null, + 'ctime' => null, + 'name' => null, + 'email' => null, + 'contact_email' => null, + 'last_login' => null, + 'self_usage' => null, + 'quota' => null, + 'workspace_id' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'id' => false, + 'is_active' => false, + 'ctime' => false, + 'name' => false, + 'email' => false, + 'contact_email' => false, + 'last_login' => false, + 'self_usage' => false, + 'quota' => false, + 'workspace_id' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'is_active' => 'is_active', + 'ctime' => 'ctime', + 'name' => 'name', + 'email' => 'email', + 'contact_email' => 'contact_email', + 'last_login' => 'last_login', + 'self_usage' => 'self_usage', + 'quota' => 'quota', + 'workspace_id' => 'workspace_id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'is_active' => 'setIsActive', + 'ctime' => 'setCtime', + 'name' => 'setName', + 'email' => 'setEmail', + 'contact_email' => 'setContactEmail', + 'last_login' => 'setLastLogin', + 'self_usage' => 'setSelfUsage', + 'quota' => 'setQuota', + 'workspace_id' => 'setWorkspaceId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'is_active' => 'getIsActive', + 'ctime' => 'getCtime', + 'name' => 'getName', + 'email' => 'getEmail', + 'contact_email' => 'getContactEmail', + 'last_login' => 'getLastLogin', + 'self_usage' => 'getSelfUsage', + 'quota' => 'getQuota', + 'workspace_id' => 'getWorkspaceId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('is_active', $data ?? [], null); + $this->setIfExists('ctime', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('email', $data ?? [], null); + $this->setIfExists('contact_email', $data ?? [], null); + $this->setIfExists('last_login', $data ?? [], null); + $this->setIfExists('self_usage', $data ?? [], null); + $this->setIfExists('quota', $data ?? [], null); + $this->setIfExists('workspace_id', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return int|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int|null $id id + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets is_active + * + * @return bool|null + */ + public function getIsActive() + { + return $this->container['is_active']; + } + + /** + * Sets is_active + * + * @param bool|null $is_active is_active + * + * @return self + */ + public function setIsActive($is_active) + { + if (is_null($is_active)) { + throw new \InvalidArgumentException('non-nullable is_active cannot be null'); + } + $this->container['is_active'] = $is_active; + + return $this; + } + + /** + * Gets ctime + * + * @return string|null + */ + public function getCtime() + { + return $this->container['ctime']; + } + + /** + * Sets ctime + * + * @param string|null $ctime ctime + * + * @return self + */ + public function setCtime($ctime) + { + if (is_null($ctime)) { + throw new \InvalidArgumentException('non-nullable ctime cannot be null'); + } + $this->container['ctime'] = $ctime; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name name + * + * @return self + */ + public function setName($name) + { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets email + * + * @return string|null + */ + public function getEmail() + { + return $this->container['email']; + } + + /** + * Sets email + * + * @param string|null $email email + * + * @return self + */ + public function setEmail($email) + { + if (is_null($email)) { + throw new \InvalidArgumentException('non-nullable email cannot be null'); + } + $this->container['email'] = $email; + + return $this; + } + + /** + * Gets contact_email + * + * @return string|null + */ + public function getContactEmail() + { + return $this->container['contact_email']; + } + + /** + * Sets contact_email + * + * @param string|null $contact_email contact_email + * + * @return self + */ + public function setContactEmail($contact_email) + { + if (is_null($contact_email)) { + throw new \InvalidArgumentException('non-nullable contact_email cannot be null'); + } + $this->container['contact_email'] = $contact_email; + + return $this; + } + + /** + * Gets last_login + * + * @return string|null + */ + public function getLastLogin() + { + return $this->container['last_login']; + } + + /** + * Sets last_login + * + * @param string|null $last_login last_login + * + * @return self + */ + public function setLastLogin($last_login) + { + if (is_null($last_login)) { + throw new \InvalidArgumentException('non-nullable last_login cannot be null'); + } + $this->container['last_login'] = $last_login; + + return $this; + } + + /** + * Gets self_usage + * + * @return int|null + */ + public function getSelfUsage() + { + return $this->container['self_usage']; + } + + /** + * Sets self_usage + * + * @param int|null $self_usage self_usage + * + * @return self + */ + public function setSelfUsage($self_usage) + { + if (is_null($self_usage)) { + throw new \InvalidArgumentException('non-nullable self_usage cannot be null'); + } + $this->container['self_usage'] = $self_usage; + + return $this; + } + + /** + * Gets quota + * + * @return int|null + */ + public function getQuota() + { + return $this->container['quota']; + } + + /** + * Sets quota + * + * @param int|null $quota quota + * + * @return self + */ + public function setQuota($quota) + { + if (is_null($quota)) { + throw new \InvalidArgumentException('non-nullable quota cannot be null'); + } + $this->container['quota'] = $quota; + + return $this; + } + + /** + * Gets workspace_id + * + * @return int|null + */ + public function getWorkspaceId() + { + return $this->container['workspace_id']; + } + + /** + * Sets workspace_id + * + * @param int|null $workspace_id workspace_id + * + * @return self + */ + public function setWorkspaceId($workspace_id) + { + if (is_null($workspace_id)) { + throw new \InvalidArgumentException('non-nullable workspace_id cannot be null'); + } + $this->container['workspace_id'] = $workspace_id; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/TeamAdmin/BasesApi.php b/lib/TeamAdmin/BasesApi.php index f0d5804c..1a2a80fc 100644 --- a/lib/TeamAdmin/BasesApi.php +++ b/lib/TeamAdmin/BasesApi.php @@ -14,7 +14,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -76,12 +76,21 @@ class BasesApi 'clearTeamTrashBin' => [ 'application/json', ], + 'deleteApiToken' => [ + 'application/json', + ], 'deleteBase' => [ 'application/json', ], 'getBase' => [ 'application/json', ], + 'listApiTokens' => [ + 'application/json', + ], + 'listApiTokensOfAllBases' => [ + 'application/json', + ], 'listBaseSharings' => [ 'application/json', ], @@ -91,6 +100,9 @@ class BasesApi 'listTrashBases' => [ 'application/json', ], + 'listUsersBases' => [ + 'application/json', + ], 'restoreBaseFromTrash' => [ 'application/json', ], @@ -421,40 +433,42 @@ public function clearTeamTrashBinRequest($org_id, string $contentType = self::co } /** - * Operation deleteBase + * Operation deleteApiToken * - * Delete Base + * Delete API-Token * * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) * @param string $base_uuid The unique identifier of a base. Sometimes also called dtable_uuid. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteBase'] to see the possible values for this operation + * @param string $app_name The name of your app. Every API-Token has a name to identify the purpose. The name of the app must be unique for every base. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteApiToken'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return object */ - public function deleteBase($org_id, $base_uuid, string $contentType = self::contentTypes['deleteBase'][0]) + public function deleteApiToken($org_id, $base_uuid, $app_name, string $contentType = self::contentTypes['deleteApiToken'][0]) { - list($response) = $this->deleteBaseWithHttpInfo($org_id, $base_uuid, $contentType); + list($response) = $this->deleteApiTokenWithHttpInfo($org_id, $base_uuid, $app_name, $contentType); return $response; } /** - * Operation deleteBaseWithHttpInfo + * Operation deleteApiTokenWithHttpInfo * - * Delete Base + * Delete API-Token * * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) * @param string $base_uuid The unique identifier of a base. Sometimes also called dtable_uuid. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteBase'] to see the possible values for this operation + * @param string $app_name The name of your app. Every API-Token has a name to identify the purpose. The name of the app must be unique for every base. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteApiToken'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of object, HTTP status code, HTTP response headers (array of strings) */ - public function deleteBaseWithHttpInfo($org_id, $base_uuid, string $contentType = self::contentTypes['deleteBase'][0]) + public function deleteApiTokenWithHttpInfo($org_id, $base_uuid, $app_name, string $contentType = self::contentTypes['deleteApiToken'][0]) { - $request = $this->deleteBaseRequest($org_id, $base_uuid, $contentType); + $request = $this->deleteApiTokenRequest($org_id, $base_uuid, $app_name, $contentType); try { $options = $this->createHttpClientOption(); @@ -526,20 +540,21 @@ public function deleteBaseWithHttpInfo($org_id, $base_uuid, string $contentType } /** - * Operation deleteBaseAsync + * Operation deleteApiTokenAsync * - * Delete Base + * Delete API-Token * * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) * @param string $base_uuid The unique identifier of a base. Sometimes also called dtable_uuid. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteBase'] to see the possible values for this operation + * @param string $app_name The name of your app. Every API-Token has a name to identify the purpose. The name of the app must be unique for every base. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteApiToken'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteBaseAsync($org_id, $base_uuid, string $contentType = self::contentTypes['deleteBase'][0]) + public function deleteApiTokenAsync($org_id, $base_uuid, $app_name, string $contentType = self::contentTypes['deleteApiToken'][0]) { - return $this->deleteBaseAsyncWithHttpInfo($org_id, $base_uuid, $contentType) + return $this->deleteApiTokenAsyncWithHttpInfo($org_id, $base_uuid, $app_name, $contentType) ->then( function ($response) { return $response[0]; @@ -548,21 +563,22 @@ function ($response) { } /** - * Operation deleteBaseAsyncWithHttpInfo + * Operation deleteApiTokenAsyncWithHttpInfo * - * Delete Base + * Delete API-Token * * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) * @param string $base_uuid The unique identifier of a base. Sometimes also called dtable_uuid. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteBase'] to see the possible values for this operation + * @param string $app_name The name of your app. Every API-Token has a name to identify the purpose. The name of the app must be unique for every base. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteApiToken'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteBaseAsyncWithHttpInfo($org_id, $base_uuid, string $contentType = self::contentTypes['deleteBase'][0]) + public function deleteApiTokenAsyncWithHttpInfo($org_id, $base_uuid, $app_name, string $contentType = self::contentTypes['deleteApiToken'][0]) { $returnType = 'object'; - $request = $this->deleteBaseRequest($org_id, $base_uuid, $contentType); + $request = $this->deleteApiTokenRequest($org_id, $base_uuid, $app_name, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -601,40 +617,48 @@ function ($exception) { } /** - * Create request for operation 'deleteBase' + * Create request for operation 'deleteApiToken' * * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) * @param string $base_uuid The unique identifier of a base. Sometimes also called dtable_uuid. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteBase'] to see the possible values for this operation + * @param string $app_name The name of your app. Every API-Token has a name to identify the purpose. The name of the app must be unique for every base. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteApiToken'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function deleteBaseRequest($org_id, $base_uuid, string $contentType = self::contentTypes['deleteBase'][0]) + public function deleteApiTokenRequest($org_id, $base_uuid, $app_name, string $contentType = self::contentTypes['deleteApiToken'][0]) { // verify the required parameter 'org_id' is set if ($org_id === null || (is_array($org_id) && count($org_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $org_id when calling deleteBase' + 'Missing the required parameter $org_id when calling deleteApiToken' ); } if ($org_id < 1) { - throw new \InvalidArgumentException('invalid value for "$org_id" when calling BasesApi.deleteBase, must be bigger than or equal to 1.'); + throw new \InvalidArgumentException('invalid value for "$org_id" when calling BasesApi.deleteApiToken, must be bigger than or equal to 1.'); } // verify the required parameter 'base_uuid' is set if ($base_uuid === null || (is_array($base_uuid) && count($base_uuid) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $base_uuid when calling deleteBase' + 'Missing the required parameter $base_uuid when calling deleteApiToken' ); } if (!preg_match("/^[0-9a-fA-F]{8}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{12}$/", $base_uuid)) { - throw new \InvalidArgumentException("invalid value for \"base_uuid\" when calling BasesApi.deleteBase, must conform to the pattern /^[0-9a-fA-F]{8}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{12}$/."); + throw new \InvalidArgumentException("invalid value for \"base_uuid\" when calling BasesApi.deleteApiToken, must conform to the pattern /^[0-9a-fA-F]{8}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{12}$/."); } + // verify the required parameter 'app_name' is set + if ($app_name === null || (is_array($app_name) && count($app_name) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $app_name when calling deleteApiToken' + ); + } - $resourcePath = '/api/v2.1/org/{org_id}/admin/dtables/{base_uuid}/'; + + $resourcePath = '/api/v2.1/org/{org_id}/admin/dtables/{base_uuid}/api-tokens/{app_name}/'; $formParams = []; $queryParams = []; $headerParams = []; @@ -659,6 +683,14 @@ public function deleteBaseRequest($org_id, $base_uuid, string $contentType = sel $resourcePath ); } + // path params + if ($app_name !== null) { + $resourcePath = str_replace( + '{' . 'app_name' . '}', + ObjectSerializer::toPathValue($app_name), + $resourcePath + ); + } $headers = $this->headerSelector->selectHeaders( @@ -719,40 +751,1245 @@ public function deleteBaseRequest($org_id, $base_uuid, string $contentType = sel } /** - * Operation getBase + * Operation deleteBase * - * Get Base + * Delete Base + * + * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) + * @param string $base_uuid The unique identifier of a base. Sometimes also called dtable_uuid. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteBase'] to see the possible values for this operation + * + * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return object + */ + public function deleteBase($org_id, $base_uuid, string $contentType = self::contentTypes['deleteBase'][0]) + { + list($response) = $this->deleteBaseWithHttpInfo($org_id, $base_uuid, $contentType); + return $response; + } + + /** + * Operation deleteBaseWithHttpInfo + * + * Delete Base + * + * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) + * @param string $base_uuid The unique identifier of a base. Sometimes also called dtable_uuid. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteBase'] to see the possible values for this operation + * + * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of object, HTTP status code, HTTP response headers (array of strings) + */ + public function deleteBaseWithHttpInfo($org_id, $base_uuid, string $contentType = self::contentTypes['deleteBase'][0]) + { + $request = $this->deleteBaseRequest($org_id, $base_uuid, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + 'object', + $request, + $response, + ); + } + + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + 'object', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + 'object', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + + throw $e; + } + } + + /** + * Operation deleteBaseAsync + * + * Delete Base + * + * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) + * @param string $base_uuid The unique identifier of a base. Sometimes also called dtable_uuid. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteBase'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteBaseAsync($org_id, $base_uuid, string $contentType = self::contentTypes['deleteBase'][0]) + { + return $this->deleteBaseAsyncWithHttpInfo($org_id, $base_uuid, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation deleteBaseAsyncWithHttpInfo + * + * Delete Base + * + * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) + * @param string $base_uuid The unique identifier of a base. Sometimes also called dtable_uuid. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteBase'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteBaseAsyncWithHttpInfo($org_id, $base_uuid, string $contentType = self::contentTypes['deleteBase'][0]) + { + $returnType = 'object'; + $request = $this->deleteBaseRequest($org_id, $base_uuid, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'deleteBase' + * + * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) + * @param string $base_uuid The unique identifier of a base. Sometimes also called dtable_uuid. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteBase'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function deleteBaseRequest($org_id, $base_uuid, string $contentType = self::contentTypes['deleteBase'][0]) + { + + // verify the required parameter 'org_id' is set + if ($org_id === null || (is_array($org_id) && count($org_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $org_id when calling deleteBase' + ); + } + if ($org_id < 1) { + throw new \InvalidArgumentException('invalid value for "$org_id" when calling BasesApi.deleteBase, must be bigger than or equal to 1.'); + } + + // verify the required parameter 'base_uuid' is set + if ($base_uuid === null || (is_array($base_uuid) && count($base_uuid) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $base_uuid when calling deleteBase' + ); + } + if (!preg_match("/^[0-9a-fA-F]{8}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{12}$/", $base_uuid)) { + throw new \InvalidArgumentException("invalid value for \"base_uuid\" when calling BasesApi.deleteBase, must conform to the pattern /^[0-9a-fA-F]{8}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{12}$/."); + } + + + $resourcePath = '/api/v2.1/org/{org_id}/admin/dtables/{base_uuid}/'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($org_id !== null) { + $resourcePath = str_replace( + '{' . 'org_id' . '}', + ObjectSerializer::toPathValue($org_id), + $resourcePath + ); + } + // path params + if ($base_uuid !== null) { + $resourcePath = str_replace( + '{' . 'base_uuid' . '}', + ObjectSerializer::toPathValue($base_uuid), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'DELETE', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getBase + * + * Get Base + * + * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) + * @param string $base_uuid The unique identifier of a base. Sometimes also called dtable_uuid. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getBase'] to see the possible values for this operation + * + * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \SeaTable\Client\TeamAdmin\GetBase200Response + */ + public function getBase($org_id, $base_uuid, string $contentType = self::contentTypes['getBase'][0]) + { + list($response) = $this->getBaseWithHttpInfo($org_id, $base_uuid, $contentType); + return $response; + } + + /** + * Operation getBaseWithHttpInfo + * + * Get Base + * + * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) + * @param string $base_uuid The unique identifier of a base. Sometimes also called dtable_uuid. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getBase'] to see the possible values for this operation + * + * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \SeaTable\Client\TeamAdmin\GetBase200Response, HTTP status code, HTTP response headers (array of strings) + */ + public function getBaseWithHttpInfo($org_id, $base_uuid, string $contentType = self::contentTypes['getBase'][0]) + { + $request = $this->getBaseRequest($org_id, $base_uuid, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\SeaTable\Client\TeamAdmin\GetBase200Response', + $request, + $response, + ); + } + + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\SeaTable\Client\TeamAdmin\GetBase200Response', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\SeaTable\Client\TeamAdmin\GetBase200Response', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + + throw $e; + } + } + + /** + * Operation getBaseAsync + * + * Get Base + * + * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) + * @param string $base_uuid The unique identifier of a base. Sometimes also called dtable_uuid. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getBase'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getBaseAsync($org_id, $base_uuid, string $contentType = self::contentTypes['getBase'][0]) + { + return $this->getBaseAsyncWithHttpInfo($org_id, $base_uuid, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getBaseAsyncWithHttpInfo + * + * Get Base + * + * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) + * @param string $base_uuid The unique identifier of a base. Sometimes also called dtable_uuid. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getBase'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getBaseAsyncWithHttpInfo($org_id, $base_uuid, string $contentType = self::contentTypes['getBase'][0]) + { + $returnType = '\SeaTable\Client\TeamAdmin\GetBase200Response'; + $request = $this->getBaseRequest($org_id, $base_uuid, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getBase' + * + * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) + * @param string $base_uuid The unique identifier of a base. Sometimes also called dtable_uuid. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getBase'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getBaseRequest($org_id, $base_uuid, string $contentType = self::contentTypes['getBase'][0]) + { + + // verify the required parameter 'org_id' is set + if ($org_id === null || (is_array($org_id) && count($org_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $org_id when calling getBase' + ); + } + if ($org_id < 1) { + throw new \InvalidArgumentException('invalid value for "$org_id" when calling BasesApi.getBase, must be bigger than or equal to 1.'); + } + + // verify the required parameter 'base_uuid' is set + if ($base_uuid === null || (is_array($base_uuid) && count($base_uuid) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $base_uuid when calling getBase' + ); + } + if (!preg_match("/^[0-9a-fA-F]{8}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{12}$/", $base_uuid)) { + throw new \InvalidArgumentException("invalid value for \"base_uuid\" when calling BasesApi.getBase, must conform to the pattern /^[0-9a-fA-F]{8}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{12}$/."); + } + + + $resourcePath = '/api/v2.1/org/{org_id}/admin/dtables/{base_uuid}/'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($org_id !== null) { + $resourcePath = str_replace( + '{' . 'org_id' . '}', + ObjectSerializer::toPathValue($org_id), + $resourcePath + ); + } + // path params + if ($base_uuid !== null) { + $resourcePath = str_replace( + '{' . 'base_uuid' . '}', + ObjectSerializer::toPathValue($base_uuid), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation listApiTokens + * + * List API-Tokens + * + * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) + * @param string $base_uuid The unique identifier of a base. Sometimes also called dtable_uuid. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listApiTokens'] to see the possible values for this operation + * + * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return object + */ + public function listApiTokens($org_id, $base_uuid, string $contentType = self::contentTypes['listApiTokens'][0]) + { + list($response) = $this->listApiTokensWithHttpInfo($org_id, $base_uuid, $contentType); + return $response; + } + + /** + * Operation listApiTokensWithHttpInfo + * + * List API-Tokens + * + * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) + * @param string $base_uuid The unique identifier of a base. Sometimes also called dtable_uuid. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listApiTokens'] to see the possible values for this operation + * + * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of object, HTTP status code, HTTP response headers (array of strings) + */ + public function listApiTokensWithHttpInfo($org_id, $base_uuid, string $contentType = self::contentTypes['listApiTokens'][0]) + { + $request = $this->listApiTokensRequest($org_id, $base_uuid, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + 'object', + $request, + $response, + ); + } + + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + 'object', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + 'object', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + + throw $e; + } + } + + /** + * Operation listApiTokensAsync + * + * List API-Tokens + * + * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) + * @param string $base_uuid The unique identifier of a base. Sometimes also called dtable_uuid. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listApiTokens'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function listApiTokensAsync($org_id, $base_uuid, string $contentType = self::contentTypes['listApiTokens'][0]) + { + return $this->listApiTokensAsyncWithHttpInfo($org_id, $base_uuid, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation listApiTokensAsyncWithHttpInfo + * + * List API-Tokens + * + * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) + * @param string $base_uuid The unique identifier of a base. Sometimes also called dtable_uuid. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listApiTokens'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function listApiTokensAsyncWithHttpInfo($org_id, $base_uuid, string $contentType = self::contentTypes['listApiTokens'][0]) + { + $returnType = 'object'; + $request = $this->listApiTokensRequest($org_id, $base_uuid, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'listApiTokens' + * + * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) + * @param string $base_uuid The unique identifier of a base. Sometimes also called dtable_uuid. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listApiTokens'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function listApiTokensRequest($org_id, $base_uuid, string $contentType = self::contentTypes['listApiTokens'][0]) + { + + // verify the required parameter 'org_id' is set + if ($org_id === null || (is_array($org_id) && count($org_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $org_id when calling listApiTokens' + ); + } + if ($org_id < 1) { + throw new \InvalidArgumentException('invalid value for "$org_id" when calling BasesApi.listApiTokens, must be bigger than or equal to 1.'); + } + + // verify the required parameter 'base_uuid' is set + if ($base_uuid === null || (is_array($base_uuid) && count($base_uuid) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $base_uuid when calling listApiTokens' + ); + } + if (!preg_match("/^[0-9a-fA-F]{8}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{12}$/", $base_uuid)) { + throw new \InvalidArgumentException("invalid value for \"base_uuid\" when calling BasesApi.listApiTokens, must conform to the pattern /^[0-9a-fA-F]{8}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{12}$/."); + } + + + $resourcePath = '/api/v2.1/org/{org_id}/admin/dtables/{base_uuid}/api-tokens/'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($org_id !== null) { + $resourcePath = str_replace( + '{' . 'org_id' . '}', + ObjectSerializer::toPathValue($org_id), + $resourcePath + ); + } + // path params + if ($base_uuid !== null) { + $resourcePath = str_replace( + '{' . 'base_uuid' . '}', + ObjectSerializer::toPathValue($base_uuid), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation listApiTokensOfAllBases + * + * List API-Tokens of All Bases + * + * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) + * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) + * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listApiTokensOfAllBases'] to see the possible values for this operation + * + * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return object + */ + public function listApiTokensOfAllBases($org_id, $page = null, $per_page = null, string $contentType = self::contentTypes['listApiTokensOfAllBases'][0]) + { + list($response) = $this->listApiTokensOfAllBasesWithHttpInfo($org_id, $page, $per_page, $contentType); + return $response; + } + + /** + * Operation listApiTokensOfAllBasesWithHttpInfo + * + * List API-Tokens of All Bases + * + * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) + * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) + * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listApiTokensOfAllBases'] to see the possible values for this operation + * + * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of object, HTTP status code, HTTP response headers (array of strings) + */ + public function listApiTokensOfAllBasesWithHttpInfo($org_id, $page = null, $per_page = null, string $contentType = self::contentTypes['listApiTokensOfAllBases'][0]) + { + $request = $this->listApiTokensOfAllBasesRequest($org_id, $page, $per_page, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + 'object', + $request, + $response, + ); + } + + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + 'object', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + 'object', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + + throw $e; + } + } + + /** + * Operation listApiTokensOfAllBasesAsync + * + * List API-Tokens of All Bases + * + * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) + * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) + * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listApiTokensOfAllBases'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function listApiTokensOfAllBasesAsync($org_id, $page = null, $per_page = null, string $contentType = self::contentTypes['listApiTokensOfAllBases'][0]) + { + return $this->listApiTokensOfAllBasesAsyncWithHttpInfo($org_id, $page, $per_page, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation listApiTokensOfAllBasesAsyncWithHttpInfo + * + * List API-Tokens of All Bases + * + * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) + * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) + * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listApiTokensOfAllBases'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function listApiTokensOfAllBasesAsyncWithHttpInfo($org_id, $page = null, $per_page = null, string $contentType = self::contentTypes['listApiTokensOfAllBases'][0]) + { + $returnType = 'object'; + $request = $this->listApiTokensOfAllBasesRequest($org_id, $page, $per_page, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'listApiTokensOfAllBases' + * + * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) + * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) + * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listApiTokensOfAllBases'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function listApiTokensOfAllBasesRequest($org_id, $page = null, $per_page = null, string $contentType = self::contentTypes['listApiTokensOfAllBases'][0]) + { + + // verify the required parameter 'org_id' is set + if ($org_id === null || (is_array($org_id) && count($org_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $org_id when calling listApiTokensOfAllBases' + ); + } + if ($org_id < 1) { + throw new \InvalidArgumentException('invalid value for "$org_id" when calling BasesApi.listApiTokensOfAllBases, must be bigger than or equal to 1.'); + } + + if ($page !== null && $page < 1) { + throw new \InvalidArgumentException('invalid value for "$page" when calling BasesApi.listApiTokensOfAllBases, must be bigger than or equal to 1.'); + } + + if ($per_page !== null && $per_page < 1) { + throw new \InvalidArgumentException('invalid value for "$per_page" when calling BasesApi.listApiTokensOfAllBases, must be bigger than or equal to 1.'); + } + + + $resourcePath = '/api/v2.1/org/{org_id}/admin/api-tokens/'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $page, + 'page', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $per_page, + 'per_page', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + + + // path params + if ($org_id !== null) { + $resourcePath = str_replace( + '{' . 'org_id' . '}', + ObjectSerializer::toPathValue($org_id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation listBaseSharings + * + * List Base Sharings * * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) * @param string $base_uuid The unique identifier of a base. Sometimes also called dtable_uuid. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getBase'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listBaseSharings'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return object */ - public function getBase($org_id, $base_uuid, string $contentType = self::contentTypes['getBase'][0]) + public function listBaseSharings($org_id, $base_uuid, string $contentType = self::contentTypes['listBaseSharings'][0]) { - list($response) = $this->getBaseWithHttpInfo($org_id, $base_uuid, $contentType); + list($response) = $this->listBaseSharingsWithHttpInfo($org_id, $base_uuid, $contentType); return $response; } /** - * Operation getBaseWithHttpInfo + * Operation listBaseSharingsWithHttpInfo * - * Get Base + * List Base Sharings * * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) * @param string $base_uuid The unique identifier of a base. Sometimes also called dtable_uuid. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getBase'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listBaseSharings'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of object, HTTP status code, HTTP response headers (array of strings) */ - public function getBaseWithHttpInfo($org_id, $base_uuid, string $contentType = self::contentTypes['getBase'][0]) + public function listBaseSharingsWithHttpInfo($org_id, $base_uuid, string $contentType = self::contentTypes['listBaseSharings'][0]) { - $request = $this->getBaseRequest($org_id, $base_uuid, $contentType); + $request = $this->listBaseSharingsRequest($org_id, $base_uuid, $contentType); try { $options = $this->createHttpClientOption(); @@ -824,20 +2061,20 @@ public function getBaseWithHttpInfo($org_id, $base_uuid, string $contentType = s } /** - * Operation getBaseAsync + * Operation listBaseSharingsAsync * - * Get Base + * List Base Sharings * * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) * @param string $base_uuid The unique identifier of a base. Sometimes also called dtable_uuid. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getBase'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listBaseSharings'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getBaseAsync($org_id, $base_uuid, string $contentType = self::contentTypes['getBase'][0]) + public function listBaseSharingsAsync($org_id, $base_uuid, string $contentType = self::contentTypes['listBaseSharings'][0]) { - return $this->getBaseAsyncWithHttpInfo($org_id, $base_uuid, $contentType) + return $this->listBaseSharingsAsyncWithHttpInfo($org_id, $base_uuid, $contentType) ->then( function ($response) { return $response[0]; @@ -846,21 +2083,21 @@ function ($response) { } /** - * Operation getBaseAsyncWithHttpInfo + * Operation listBaseSharingsAsyncWithHttpInfo * - * Get Base + * List Base Sharings * * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) * @param string $base_uuid The unique identifier of a base. Sometimes also called dtable_uuid. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getBase'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listBaseSharings'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getBaseAsyncWithHttpInfo($org_id, $base_uuid, string $contentType = self::contentTypes['getBase'][0]) + public function listBaseSharingsAsyncWithHttpInfo($org_id, $base_uuid, string $contentType = self::contentTypes['listBaseSharings'][0]) { $returnType = 'object'; - $request = $this->getBaseRequest($org_id, $base_uuid, $contentType); + $request = $this->listBaseSharingsRequest($org_id, $base_uuid, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -899,40 +2136,40 @@ function ($exception) { } /** - * Create request for operation 'getBase' + * Create request for operation 'listBaseSharings' * * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) * @param string $base_uuid The unique identifier of a base. Sometimes also called dtable_uuid. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getBase'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listBaseSharings'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getBaseRequest($org_id, $base_uuid, string $contentType = self::contentTypes['getBase'][0]) + public function listBaseSharingsRequest($org_id, $base_uuid, string $contentType = self::contentTypes['listBaseSharings'][0]) { // verify the required parameter 'org_id' is set if ($org_id === null || (is_array($org_id) && count($org_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $org_id when calling getBase' + 'Missing the required parameter $org_id when calling listBaseSharings' ); } if ($org_id < 1) { - throw new \InvalidArgumentException('invalid value for "$org_id" when calling BasesApi.getBase, must be bigger than or equal to 1.'); + throw new \InvalidArgumentException('invalid value for "$org_id" when calling BasesApi.listBaseSharings, must be bigger than or equal to 1.'); } // verify the required parameter 'base_uuid' is set if ($base_uuid === null || (is_array($base_uuid) && count($base_uuid) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $base_uuid when calling getBase' + 'Missing the required parameter $base_uuid when calling listBaseSharings' ); } if (!preg_match("/^[0-9a-fA-F]{8}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{12}$/", $base_uuid)) { - throw new \InvalidArgumentException("invalid value for \"base_uuid\" when calling BasesApi.getBase, must conform to the pattern /^[0-9a-fA-F]{8}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{12}$/."); + throw new \InvalidArgumentException("invalid value for \"base_uuid\" when calling BasesApi.listBaseSharings, must conform to the pattern /^[0-9a-fA-F]{8}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{12}$/."); } - $resourcePath = '/api/v2.1/org/{org_id}/admin/dtables/{base_uuid}/'; + $resourcePath = '/api/v2.1/org/{org_id}/admin/dtables/{base_uuid}/shares/'; $formParams = []; $queryParams = []; $headerParams = []; @@ -1017,40 +2254,42 @@ public function getBaseRequest($org_id, $base_uuid, string $contentType = self:: } /** - * Operation listBaseSharings + * Operation listBases * - * List Base Sharings + * List Bases (Team) * * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) - * @param string $base_uuid The unique identifier of a base. Sometimes also called dtable_uuid. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listBaseSharings'] to see the possible values for this operation + * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) + * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listBases'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return object */ - public function listBaseSharings($org_id, $base_uuid, string $contentType = self::contentTypes['listBaseSharings'][0]) + public function listBases($org_id, $page = null, $per_page = null, string $contentType = self::contentTypes['listBases'][0]) { - list($response) = $this->listBaseSharingsWithHttpInfo($org_id, $base_uuid, $contentType); + list($response) = $this->listBasesWithHttpInfo($org_id, $page, $per_page, $contentType); return $response; } /** - * Operation listBaseSharingsWithHttpInfo + * Operation listBasesWithHttpInfo * - * List Base Sharings + * List Bases (Team) * * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) - * @param string $base_uuid The unique identifier of a base. Sometimes also called dtable_uuid. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listBaseSharings'] to see the possible values for this operation + * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) + * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listBases'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of object, HTTP status code, HTTP response headers (array of strings) */ - public function listBaseSharingsWithHttpInfo($org_id, $base_uuid, string $contentType = self::contentTypes['listBaseSharings'][0]) + public function listBasesWithHttpInfo($org_id, $page = null, $per_page = null, string $contentType = self::contentTypes['listBases'][0]) { - $request = $this->listBaseSharingsRequest($org_id, $base_uuid, $contentType); + $request = $this->listBasesRequest($org_id, $page, $per_page, $contentType); try { $options = $this->createHttpClientOption(); @@ -1122,20 +2361,21 @@ public function listBaseSharingsWithHttpInfo($org_id, $base_uuid, string $conten } /** - * Operation listBaseSharingsAsync + * Operation listBasesAsync * - * List Base Sharings + * List Bases (Team) * * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) - * @param string $base_uuid The unique identifier of a base. Sometimes also called dtable_uuid. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listBaseSharings'] to see the possible values for this operation + * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) + * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listBases'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function listBaseSharingsAsync($org_id, $base_uuid, string $contentType = self::contentTypes['listBaseSharings'][0]) + public function listBasesAsync($org_id, $page = null, $per_page = null, string $contentType = self::contentTypes['listBases'][0]) { - return $this->listBaseSharingsAsyncWithHttpInfo($org_id, $base_uuid, $contentType) + return $this->listBasesAsyncWithHttpInfo($org_id, $page, $per_page, $contentType) ->then( function ($response) { return $response[0]; @@ -1144,21 +2384,22 @@ function ($response) { } /** - * Operation listBaseSharingsAsyncWithHttpInfo + * Operation listBasesAsyncWithHttpInfo * - * List Base Sharings + * List Bases (Team) * * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) - * @param string $base_uuid The unique identifier of a base. Sometimes also called dtable_uuid. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listBaseSharings'] to see the possible values for this operation + * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) + * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listBases'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function listBaseSharingsAsyncWithHttpInfo($org_id, $base_uuid, string $contentType = self::contentTypes['listBaseSharings'][0]) + public function listBasesAsyncWithHttpInfo($org_id, $page = null, $per_page = null, string $contentType = self::contentTypes['listBases'][0]) { $returnType = 'object'; - $request = $this->listBaseSharingsRequest($org_id, $base_uuid, $contentType); + $request = $this->listBasesRequest($org_id, $page, $per_page, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1197,46 +2438,63 @@ function ($exception) { } /** - * Create request for operation 'listBaseSharings' + * Create request for operation 'listBases' * * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) - * @param string $base_uuid The unique identifier of a base. Sometimes also called dtable_uuid. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listBaseSharings'] to see the possible values for this operation + * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) + * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listBases'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function listBaseSharingsRequest($org_id, $base_uuid, string $contentType = self::contentTypes['listBaseSharings'][0]) + public function listBasesRequest($org_id, $page = null, $per_page = null, string $contentType = self::contentTypes['listBases'][0]) { // verify the required parameter 'org_id' is set if ($org_id === null || (is_array($org_id) && count($org_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $org_id when calling listBaseSharings' + 'Missing the required parameter $org_id when calling listBases' ); } if ($org_id < 1) { - throw new \InvalidArgumentException('invalid value for "$org_id" when calling BasesApi.listBaseSharings, must be bigger than or equal to 1.'); + throw new \InvalidArgumentException('invalid value for "$org_id" when calling BasesApi.listBases, must be bigger than or equal to 1.'); } - // verify the required parameter 'base_uuid' is set - if ($base_uuid === null || (is_array($base_uuid) && count($base_uuid) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $base_uuid when calling listBaseSharings' - ); + if ($page !== null && $page < 1) { + throw new \InvalidArgumentException('invalid value for "$page" when calling BasesApi.listBases, must be bigger than or equal to 1.'); } - if (!preg_match("/^[0-9a-fA-F]{8}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{12}$/", $base_uuid)) { - throw new \InvalidArgumentException("invalid value for \"base_uuid\" when calling BasesApi.listBaseSharings, must conform to the pattern /^[0-9a-fA-F]{8}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{12}$/."); + + if ($per_page !== null && $per_page < 1) { + throw new \InvalidArgumentException('invalid value for "$per_page" when calling BasesApi.listBases, must be bigger than or equal to 1.'); } - $resourcePath = '/api/v2.1/org/{org_id}/admin/dtables/{base_uuid}/shares/'; + $resourcePath = '/api/v2.1/org/{org_id}/admin/dtables/'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $page, + 'page', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $per_page, + 'per_page', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); // path params @@ -1247,14 +2505,6 @@ public function listBaseSharingsRequest($org_id, $base_uuid, string $contentType $resourcePath ); } - // path params - if ($base_uuid !== null) { - $resourcePath = str_replace( - '{' . 'base_uuid' . '}', - ObjectSerializer::toPathValue($base_uuid), - $resourcePath - ); - } $headers = $this->headerSelector->selectHeaders( @@ -1315,42 +2565,42 @@ public function listBaseSharingsRequest($org_id, $base_uuid, string $contentType } /** - * Operation listBases + * Operation listTrashBases * - * List Bases (Team) + * List Trash Bases * * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listBases'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listTrashBases'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return object */ - public function listBases($org_id, $page = null, $per_page = null, string $contentType = self::contentTypes['listBases'][0]) + public function listTrashBases($org_id, $page = null, $per_page = null, string $contentType = self::contentTypes['listTrashBases'][0]) { - list($response) = $this->listBasesWithHttpInfo($org_id, $page, $per_page, $contentType); + list($response) = $this->listTrashBasesWithHttpInfo($org_id, $page, $per_page, $contentType); return $response; } /** - * Operation listBasesWithHttpInfo + * Operation listTrashBasesWithHttpInfo * - * List Bases (Team) + * List Trash Bases * * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listBases'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listTrashBases'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of object, HTTP status code, HTTP response headers (array of strings) */ - public function listBasesWithHttpInfo($org_id, $page = null, $per_page = null, string $contentType = self::contentTypes['listBases'][0]) + public function listTrashBasesWithHttpInfo($org_id, $page = null, $per_page = null, string $contentType = self::contentTypes['listTrashBases'][0]) { - $request = $this->listBasesRequest($org_id, $page, $per_page, $contentType); + $request = $this->listTrashBasesRequest($org_id, $page, $per_page, $contentType); try { $options = $this->createHttpClientOption(); @@ -1422,21 +2672,21 @@ public function listBasesWithHttpInfo($org_id, $page = null, $per_page = null, s } /** - * Operation listBasesAsync + * Operation listTrashBasesAsync * - * List Bases (Team) + * List Trash Bases * * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listBases'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listTrashBases'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function listBasesAsync($org_id, $page = null, $per_page = null, string $contentType = self::contentTypes['listBases'][0]) + public function listTrashBasesAsync($org_id, $page = null, $per_page = null, string $contentType = self::contentTypes['listTrashBases'][0]) { - return $this->listBasesAsyncWithHttpInfo($org_id, $page, $per_page, $contentType) + return $this->listTrashBasesAsyncWithHttpInfo($org_id, $page, $per_page, $contentType) ->then( function ($response) { return $response[0]; @@ -1445,22 +2695,22 @@ function ($response) { } /** - * Operation listBasesAsyncWithHttpInfo + * Operation listTrashBasesAsyncWithHttpInfo * - * List Bases (Team) + * List Trash Bases * * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listBases'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listTrashBases'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function listBasesAsyncWithHttpInfo($org_id, $page = null, $per_page = null, string $contentType = self::contentTypes['listBases'][0]) + public function listTrashBasesAsyncWithHttpInfo($org_id, $page = null, $per_page = null, string $contentType = self::contentTypes['listTrashBases'][0]) { $returnType = 'object'; - $request = $this->listBasesRequest($org_id, $page, $per_page, $contentType); + $request = $this->listTrashBasesRequest($org_id, $page, $per_page, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1499,39 +2749,39 @@ function ($exception) { } /** - * Create request for operation 'listBases' + * Create request for operation 'listTrashBases' * * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listBases'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listTrashBases'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function listBasesRequest($org_id, $page = null, $per_page = null, string $contentType = self::contentTypes['listBases'][0]) + public function listTrashBasesRequest($org_id, $page = null, $per_page = null, string $contentType = self::contentTypes['listTrashBases'][0]) { // verify the required parameter 'org_id' is set if ($org_id === null || (is_array($org_id) && count($org_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $org_id when calling listBases' + 'Missing the required parameter $org_id when calling listTrashBases' ); } if ($org_id < 1) { - throw new \InvalidArgumentException('invalid value for "$org_id" when calling BasesApi.listBases, must be bigger than or equal to 1.'); + throw new \InvalidArgumentException('invalid value for "$org_id" when calling BasesApi.listTrashBases, must be bigger than or equal to 1.'); } if ($page !== null && $page < 1) { - throw new \InvalidArgumentException('invalid value for "$page" when calling BasesApi.listBases, must be bigger than or equal to 1.'); + throw new \InvalidArgumentException('invalid value for "$page" when calling BasesApi.listTrashBases, must be bigger than or equal to 1.'); } if ($per_page !== null && $per_page < 1) { - throw new \InvalidArgumentException('invalid value for "$per_page" when calling BasesApi.listBases, must be bigger than or equal to 1.'); + throw new \InvalidArgumentException('invalid value for "$per_page" when calling BasesApi.listTrashBases, must be bigger than or equal to 1.'); } - $resourcePath = '/api/v2.1/org/{org_id}/admin/dtables/'; + $resourcePath = '/api/v2.1/org/{org_id}/admin/trash-dtables/'; $formParams = []; $queryParams = []; $headerParams = []; @@ -1626,42 +2876,44 @@ public function listBasesRequest($org_id, $page = null, $per_page = null, string } /** - * Operation listTrashBases + * Operation listUsersBases * - * List Trash Bases + * List User's Bases * * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) + * @param string $user_id The unique `user_id` in the form ...@auth.local. This is not the email address of the user. (required) * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listTrashBases'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listUsersBases'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return object */ - public function listTrashBases($org_id, $page = null, $per_page = null, string $contentType = self::contentTypes['listTrashBases'][0]) + public function listUsersBases($org_id, $user_id, $page = null, $per_page = null, string $contentType = self::contentTypes['listUsersBases'][0]) { - list($response) = $this->listTrashBasesWithHttpInfo($org_id, $page, $per_page, $contentType); + list($response) = $this->listUsersBasesWithHttpInfo($org_id, $user_id, $page, $per_page, $contentType); return $response; } /** - * Operation listTrashBasesWithHttpInfo + * Operation listUsersBasesWithHttpInfo * - * List Trash Bases + * List User's Bases * * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) + * @param string $user_id The unique `user_id` in the form ...@auth.local. This is not the email address of the user. (required) * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listTrashBases'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listUsersBases'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of object, HTTP status code, HTTP response headers (array of strings) */ - public function listTrashBasesWithHttpInfo($org_id, $page = null, $per_page = null, string $contentType = self::contentTypes['listTrashBases'][0]) + public function listUsersBasesWithHttpInfo($org_id, $user_id, $page = null, $per_page = null, string $contentType = self::contentTypes['listUsersBases'][0]) { - $request = $this->listTrashBasesRequest($org_id, $page, $per_page, $contentType); + $request = $this->listUsersBasesRequest($org_id, $user_id, $page, $per_page, $contentType); try { $options = $this->createHttpClientOption(); @@ -1733,21 +2985,22 @@ public function listTrashBasesWithHttpInfo($org_id, $page = null, $per_page = nu } /** - * Operation listTrashBasesAsync + * Operation listUsersBasesAsync * - * List Trash Bases + * List User's Bases * * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) + * @param string $user_id The unique `user_id` in the form ...@auth.local. This is not the email address of the user. (required) * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listTrashBases'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listUsersBases'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function listTrashBasesAsync($org_id, $page = null, $per_page = null, string $contentType = self::contentTypes['listTrashBases'][0]) + public function listUsersBasesAsync($org_id, $user_id, $page = null, $per_page = null, string $contentType = self::contentTypes['listUsersBases'][0]) { - return $this->listTrashBasesAsyncWithHttpInfo($org_id, $page, $per_page, $contentType) + return $this->listUsersBasesAsyncWithHttpInfo($org_id, $user_id, $page, $per_page, $contentType) ->then( function ($response) { return $response[0]; @@ -1756,22 +3009,23 @@ function ($response) { } /** - * Operation listTrashBasesAsyncWithHttpInfo + * Operation listUsersBasesAsyncWithHttpInfo * - * List Trash Bases + * List User's Bases * * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) + * @param string $user_id The unique `user_id` in the form ...@auth.local. This is not the email address of the user. (required) * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listTrashBases'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listUsersBases'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function listTrashBasesAsyncWithHttpInfo($org_id, $page = null, $per_page = null, string $contentType = self::contentTypes['listTrashBases'][0]) + public function listUsersBasesAsyncWithHttpInfo($org_id, $user_id, $page = null, $per_page = null, string $contentType = self::contentTypes['listUsersBases'][0]) { $returnType = 'object'; - $request = $this->listTrashBasesRequest($org_id, $page, $per_page, $contentType); + $request = $this->listUsersBasesRequest($org_id, $user_id, $page, $per_page, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1810,39 +3064,50 @@ function ($exception) { } /** - * Create request for operation 'listTrashBases' + * Create request for operation 'listUsersBases' * * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) + * @param string $user_id The unique `user_id` in the form ...@auth.local. This is not the email address of the user. (required) * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listTrashBases'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listUsersBases'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function listTrashBasesRequest($org_id, $page = null, $per_page = null, string $contentType = self::contentTypes['listTrashBases'][0]) + public function listUsersBasesRequest($org_id, $user_id, $page = null, $per_page = null, string $contentType = self::contentTypes['listUsersBases'][0]) { // verify the required parameter 'org_id' is set if ($org_id === null || (is_array($org_id) && count($org_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $org_id when calling listTrashBases' + 'Missing the required parameter $org_id when calling listUsersBases' ); } if ($org_id < 1) { - throw new \InvalidArgumentException('invalid value for "$org_id" when calling BasesApi.listTrashBases, must be bigger than or equal to 1.'); + throw new \InvalidArgumentException('invalid value for "$org_id" when calling BasesApi.listUsersBases, must be bigger than or equal to 1.'); + } + + // verify the required parameter 'user_id' is set + if ($user_id === null || (is_array($user_id) && count($user_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $user_id when calling listUsersBases' + ); + } + if (!preg_match("/^[a-f0-9]{32}(@auth.local)$/", $user_id)) { + throw new \InvalidArgumentException("invalid value for \"user_id\" when calling BasesApi.listUsersBases, must conform to the pattern /^[a-f0-9]{32}(@auth.local)$/."); } if ($page !== null && $page < 1) { - throw new \InvalidArgumentException('invalid value for "$page" when calling BasesApi.listTrashBases, must be bigger than or equal to 1.'); + throw new \InvalidArgumentException('invalid value for "$page" when calling BasesApi.listUsersBases, must be bigger than or equal to 1.'); } if ($per_page !== null && $per_page < 1) { - throw new \InvalidArgumentException('invalid value for "$per_page" when calling BasesApi.listTrashBases, must be bigger than or equal to 1.'); + throw new \InvalidArgumentException('invalid value for "$per_page" when calling BasesApi.listUsersBases, must be bigger than or equal to 1.'); } - $resourcePath = '/api/v2.1/org/{org_id}/admin/trash-dtables/'; + $resourcePath = '/api/v2.1/org/{org_id}/admin/users/{user_id}/dtables/'; $formParams = []; $queryParams = []; $headerParams = []; @@ -1877,6 +3142,14 @@ public function listTrashBasesRequest($org_id, $page = null, $per_page = null, s $resourcePath ); } + // path params + if ($user_id !== null) { + $resourcePath = str_replace( + '{' . 'user_id' . '}', + ObjectSerializer::toPathValue($user_id), + $resourcePath + ); + } $headers = $this->headerSelector->selectHeaders( @@ -2540,6 +3813,14 @@ protected function createHttpClientOption() } } + if ($this->config->getCertFile()) { + $options[RequestOptions::CERT] = $this->config->getCertFile(); + } + + if ($this->config->getKeyFile()) { + $options[RequestOptions::SSL_KEY] = $this->config->getKeyFile(); + } + return $options; } diff --git a/lib/TeamAdmin/CustomizingApi.php b/lib/TeamAdmin/CustomizingApi.php index 8913e21f..3f4a9f28 100644 --- a/lib/TeamAdmin/CustomizingApi.php +++ b/lib/TeamAdmin/CustomizingApi.php @@ -14,7 +14,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -887,6 +887,14 @@ protected function createHttpClientOption() } } + if ($this->config->getCertFile()) { + $options[RequestOptions::CERT] = $this->config->getCertFile(); + } + + if ($this->config->getKeyFile()) { + $options[RequestOptions::SSL_KEY] = $this->config->getKeyFile(); + } + return $options; } diff --git a/lib/TeamAdmin/EnforceTwofactorRequest.php b/lib/TeamAdmin/EnforceTwofactorRequest.php index 28a036f3..c0c7317d 100644 --- a/lib/TeamAdmin/EnforceTwofactorRequest.php +++ b/lib/TeamAdmin/EnforceTwofactorRequest.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -317,11 +317,11 @@ public function setForce2fa($force_2fa) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -329,12 +329,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -359,11 +359,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/TeamAdmin/GetBase200Response.php b/lib/TeamAdmin/GetBase200Response.php new file mode 100644 index 00000000..c860a978 --- /dev/null +++ b/lib/TeamAdmin/GetBase200Response.php @@ -0,0 +1,952 @@ + + */ +class GetBase200Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'getBase_200_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'id' => 'int', + 'workspace_id' => 'int', + 'uuid' => 'string', + 'name' => 'string', + 'created_at' => 'string', + 'updated_at' => 'string', + 'color' => 'string', + 'text_color' => 'string', + 'icon' => 'string', + 'is_encrypted' => 'bool', + 'in_storage' => 'bool', + 'org_id' => 'int', + 'owner' => 'string', + 'email' => 'string', + 'group_id' => 'int', + 'owner_deleted' => 'bool', + 'rows_count' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'id' => null, + 'workspace_id' => null, + 'uuid' => null, + 'name' => null, + 'created_at' => null, + 'updated_at' => null, + 'color' => null, + 'text_color' => null, + 'icon' => null, + 'is_encrypted' => null, + 'in_storage' => null, + 'org_id' => null, + 'owner' => null, + 'email' => null, + 'group_id' => null, + 'owner_deleted' => null, + 'rows_count' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'id' => false, + 'workspace_id' => false, + 'uuid' => false, + 'name' => false, + 'created_at' => false, + 'updated_at' => false, + 'color' => false, + 'text_color' => false, + 'icon' => false, + 'is_encrypted' => false, + 'in_storage' => false, + 'org_id' => false, + 'owner' => false, + 'email' => false, + 'group_id' => false, + 'owner_deleted' => false, + 'rows_count' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'workspace_id' => 'workspace_id', + 'uuid' => 'uuid', + 'name' => 'name', + 'created_at' => 'created_at', + 'updated_at' => 'updated_at', + 'color' => 'color', + 'text_color' => 'text_color', + 'icon' => 'icon', + 'is_encrypted' => 'is_encrypted', + 'in_storage' => 'in_storage', + 'org_id' => 'org_id', + 'owner' => 'owner', + 'email' => 'email', + 'group_id' => 'group_id', + 'owner_deleted' => 'owner_deleted', + 'rows_count' => 'rows_count' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'workspace_id' => 'setWorkspaceId', + 'uuid' => 'setUuid', + 'name' => 'setName', + 'created_at' => 'setCreatedAt', + 'updated_at' => 'setUpdatedAt', + 'color' => 'setColor', + 'text_color' => 'setTextColor', + 'icon' => 'setIcon', + 'is_encrypted' => 'setIsEncrypted', + 'in_storage' => 'setInStorage', + 'org_id' => 'setOrgId', + 'owner' => 'setOwner', + 'email' => 'setEmail', + 'group_id' => 'setGroupId', + 'owner_deleted' => 'setOwnerDeleted', + 'rows_count' => 'setRowsCount' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'workspace_id' => 'getWorkspaceId', + 'uuid' => 'getUuid', + 'name' => 'getName', + 'created_at' => 'getCreatedAt', + 'updated_at' => 'getUpdatedAt', + 'color' => 'getColor', + 'text_color' => 'getTextColor', + 'icon' => 'getIcon', + 'is_encrypted' => 'getIsEncrypted', + 'in_storage' => 'getInStorage', + 'org_id' => 'getOrgId', + 'owner' => 'getOwner', + 'email' => 'getEmail', + 'group_id' => 'getGroupId', + 'owner_deleted' => 'getOwnerDeleted', + 'rows_count' => 'getRowsCount' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('workspace_id', $data ?? [], null); + $this->setIfExists('uuid', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('created_at', $data ?? [], null); + $this->setIfExists('updated_at', $data ?? [], null); + $this->setIfExists('color', $data ?? [], null); + $this->setIfExists('text_color', $data ?? [], null); + $this->setIfExists('icon', $data ?? [], null); + $this->setIfExists('is_encrypted', $data ?? [], null); + $this->setIfExists('in_storage', $data ?? [], null); + $this->setIfExists('org_id', $data ?? [], null); + $this->setIfExists('owner', $data ?? [], null); + $this->setIfExists('email', $data ?? [], null); + $this->setIfExists('group_id', $data ?? [], null); + $this->setIfExists('owner_deleted', $data ?? [], null); + $this->setIfExists('rows_count', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return int|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int|null $id id + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets workspace_id + * + * @return int|null + */ + public function getWorkspaceId() + { + return $this->container['workspace_id']; + } + + /** + * Sets workspace_id + * + * @param int|null $workspace_id workspace_id + * + * @return self + */ + public function setWorkspaceId($workspace_id) + { + if (is_null($workspace_id)) { + throw new \InvalidArgumentException('non-nullable workspace_id cannot be null'); + } + $this->container['workspace_id'] = $workspace_id; + + return $this; + } + + /** + * Gets uuid + * + * @return string|null + */ + public function getUuid() + { + return $this->container['uuid']; + } + + /** + * Sets uuid + * + * @param string|null $uuid uuid + * + * @return self + */ + public function setUuid($uuid) + { + if (is_null($uuid)) { + throw new \InvalidArgumentException('non-nullable uuid cannot be null'); + } + $this->container['uuid'] = $uuid; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name name + * + * @return self + */ + public function setName($name) + { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets created_at + * + * @return string|null + */ + public function getCreatedAt() + { + return $this->container['created_at']; + } + + /** + * Sets created_at + * + * @param string|null $created_at created_at + * + * @return self + */ + public function setCreatedAt($created_at) + { + if (is_null($created_at)) { + throw new \InvalidArgumentException('non-nullable created_at cannot be null'); + } + $this->container['created_at'] = $created_at; + + return $this; + } + + /** + * Gets updated_at + * + * @return string|null + */ + public function getUpdatedAt() + { + return $this->container['updated_at']; + } + + /** + * Sets updated_at + * + * @param string|null $updated_at updated_at + * + * @return self + */ + public function setUpdatedAt($updated_at) + { + if (is_null($updated_at)) { + throw new \InvalidArgumentException('non-nullable updated_at cannot be null'); + } + $this->container['updated_at'] = $updated_at; + + return $this; + } + + /** + * Gets color + * + * @return string|null + */ + public function getColor() + { + return $this->container['color']; + } + + /** + * Sets color + * + * @param string|null $color color + * + * @return self + */ + public function setColor($color) + { + if (is_null($color)) { + throw new \InvalidArgumentException('non-nullable color cannot be null'); + } + $this->container['color'] = $color; + + return $this; + } + + /** + * Gets text_color + * + * @return string|null + */ + public function getTextColor() + { + return $this->container['text_color']; + } + + /** + * Sets text_color + * + * @param string|null $text_color text_color + * + * @return self + */ + public function setTextColor($text_color) + { + if (is_null($text_color)) { + throw new \InvalidArgumentException('non-nullable text_color cannot be null'); + } + $this->container['text_color'] = $text_color; + + return $this; + } + + /** + * Gets icon + * + * @return string|null + */ + public function getIcon() + { + return $this->container['icon']; + } + + /** + * Sets icon + * + * @param string|null $icon icon + * + * @return self + */ + public function setIcon($icon) + { + if (is_null($icon)) { + throw new \InvalidArgumentException('non-nullable icon cannot be null'); + } + $this->container['icon'] = $icon; + + return $this; + } + + /** + * Gets is_encrypted + * + * @return bool|null + */ + public function getIsEncrypted() + { + return $this->container['is_encrypted']; + } + + /** + * Sets is_encrypted + * + * @param bool|null $is_encrypted is_encrypted + * + * @return self + */ + public function setIsEncrypted($is_encrypted) + { + if (is_null($is_encrypted)) { + throw new \InvalidArgumentException('non-nullable is_encrypted cannot be null'); + } + $this->container['is_encrypted'] = $is_encrypted; + + return $this; + } + + /** + * Gets in_storage + * + * @return bool|null + */ + public function getInStorage() + { + return $this->container['in_storage']; + } + + /** + * Sets in_storage + * + * @param bool|null $in_storage in_storage + * + * @return self + */ + public function setInStorage($in_storage) + { + if (is_null($in_storage)) { + throw new \InvalidArgumentException('non-nullable in_storage cannot be null'); + } + $this->container['in_storage'] = $in_storage; + + return $this; + } + + /** + * Gets org_id + * + * @return int|null + */ + public function getOrgId() + { + return $this->container['org_id']; + } + + /** + * Sets org_id + * + * @param int|null $org_id org_id + * + * @return self + */ + public function setOrgId($org_id) + { + if (is_null($org_id)) { + throw new \InvalidArgumentException('non-nullable org_id cannot be null'); + } + $this->container['org_id'] = $org_id; + + return $this; + } + + /** + * Gets owner + * + * @return string|null + */ + public function getOwner() + { + return $this->container['owner']; + } + + /** + * Sets owner + * + * @param string|null $owner owner + * + * @return self + */ + public function setOwner($owner) + { + if (is_null($owner)) { + throw new \InvalidArgumentException('non-nullable owner cannot be null'); + } + $this->container['owner'] = $owner; + + return $this; + } + + /** + * Gets email + * + * @return string|null + */ + public function getEmail() + { + return $this->container['email']; + } + + /** + * Sets email + * + * @param string|null $email email + * + * @return self + */ + public function setEmail($email) + { + if (is_null($email)) { + throw new \InvalidArgumentException('non-nullable email cannot be null'); + } + $this->container['email'] = $email; + + return $this; + } + + /** + * Gets group_id + * + * @return int|null + */ + public function getGroupId() + { + return $this->container['group_id']; + } + + /** + * Sets group_id + * + * @param int|null $group_id group_id + * + * @return self + */ + public function setGroupId($group_id) + { + if (is_null($group_id)) { + throw new \InvalidArgumentException('non-nullable group_id cannot be null'); + } + $this->container['group_id'] = $group_id; + + return $this; + } + + /** + * Gets owner_deleted + * + * @return bool|null + */ + public function getOwnerDeleted() + { + return $this->container['owner_deleted']; + } + + /** + * Sets owner_deleted + * + * @param bool|null $owner_deleted owner_deleted + * + * @return self + */ + public function setOwnerDeleted($owner_deleted) + { + if (is_null($owner_deleted)) { + throw new \InvalidArgumentException('non-nullable owner_deleted cannot be null'); + } + $this->container['owner_deleted'] = $owner_deleted; + + return $this; + } + + /** + * Gets rows_count + * + * @return int|null + */ + public function getRowsCount() + { + return $this->container['rows_count']; + } + + /** + * Sets rows_count + * + * @param int|null $rows_count rows_count + * + * @return self + */ + public function setRowsCount($rows_count) + { + if (is_null($rows_count)) { + throw new \InvalidArgumentException('non-nullable rows_count cannot be null'); + } + $this->container['rows_count'] = $rows_count; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/TeamAdmin/GetTeamInfo200Response.php b/lib/TeamAdmin/GetTeamInfo200Response.php new file mode 100644 index 00000000..8944ba4b --- /dev/null +++ b/lib/TeamAdmin/GetTeamInfo200Response.php @@ -0,0 +1,884 @@ + + */ +class GetTeamInfo200Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'getTeamInfo_200_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'org_id' => 'int', + 'org_name' => 'string', + 'storage_quota' => 'int', + 'storage_usage' => 'int', + 'member_quota' => 'int', + 'member_usage' => 'int', + 'active_members' => 'int', + 'row_usage' => 'int', + 'row_total' => 'int', + 'role' => 'string', + 'big_data_row_limit' => 'int', + 'big_data_total_rows' => 'int', + 'big_data_total_storage' => 'int', + 'scripts_running_total' => 'int', + 'scripts_running_count' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'org_id' => null, + 'org_name' => null, + 'storage_quota' => null, + 'storage_usage' => null, + 'member_quota' => null, + 'member_usage' => null, + 'active_members' => null, + 'row_usage' => null, + 'row_total' => null, + 'role' => null, + 'big_data_row_limit' => null, + 'big_data_total_rows' => null, + 'big_data_total_storage' => null, + 'scripts_running_total' => null, + 'scripts_running_count' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'org_id' => false, + 'org_name' => false, + 'storage_quota' => false, + 'storage_usage' => false, + 'member_quota' => false, + 'member_usage' => false, + 'active_members' => false, + 'row_usage' => false, + 'row_total' => false, + 'role' => false, + 'big_data_row_limit' => false, + 'big_data_total_rows' => false, + 'big_data_total_storage' => false, + 'scripts_running_total' => false, + 'scripts_running_count' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'org_id' => 'org_id', + 'org_name' => 'org_name', + 'storage_quota' => 'storage_quota', + 'storage_usage' => 'storage_usage', + 'member_quota' => 'member_quota', + 'member_usage' => 'member_usage', + 'active_members' => 'active_members', + 'row_usage' => 'row_usage', + 'row_total' => 'row_total', + 'role' => 'role', + 'big_data_row_limit' => 'big_data_row_limit', + 'big_data_total_rows' => 'big_data_total_rows', + 'big_data_total_storage' => 'big_data_total_storage', + 'scripts_running_total' => 'scripts_running_total', + 'scripts_running_count' => 'scripts_running_count' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'org_id' => 'setOrgId', + 'org_name' => 'setOrgName', + 'storage_quota' => 'setStorageQuota', + 'storage_usage' => 'setStorageUsage', + 'member_quota' => 'setMemberQuota', + 'member_usage' => 'setMemberUsage', + 'active_members' => 'setActiveMembers', + 'row_usage' => 'setRowUsage', + 'row_total' => 'setRowTotal', + 'role' => 'setRole', + 'big_data_row_limit' => 'setBigDataRowLimit', + 'big_data_total_rows' => 'setBigDataTotalRows', + 'big_data_total_storage' => 'setBigDataTotalStorage', + 'scripts_running_total' => 'setScriptsRunningTotal', + 'scripts_running_count' => 'setScriptsRunningCount' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'org_id' => 'getOrgId', + 'org_name' => 'getOrgName', + 'storage_quota' => 'getStorageQuota', + 'storage_usage' => 'getStorageUsage', + 'member_quota' => 'getMemberQuota', + 'member_usage' => 'getMemberUsage', + 'active_members' => 'getActiveMembers', + 'row_usage' => 'getRowUsage', + 'row_total' => 'getRowTotal', + 'role' => 'getRole', + 'big_data_row_limit' => 'getBigDataRowLimit', + 'big_data_total_rows' => 'getBigDataTotalRows', + 'big_data_total_storage' => 'getBigDataTotalStorage', + 'scripts_running_total' => 'getScriptsRunningTotal', + 'scripts_running_count' => 'getScriptsRunningCount' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('org_id', $data ?? [], null); + $this->setIfExists('org_name', $data ?? [], null); + $this->setIfExists('storage_quota', $data ?? [], null); + $this->setIfExists('storage_usage', $data ?? [], null); + $this->setIfExists('member_quota', $data ?? [], null); + $this->setIfExists('member_usage', $data ?? [], null); + $this->setIfExists('active_members', $data ?? [], null); + $this->setIfExists('row_usage', $data ?? [], null); + $this->setIfExists('row_total', $data ?? [], null); + $this->setIfExists('role', $data ?? [], null); + $this->setIfExists('big_data_row_limit', $data ?? [], null); + $this->setIfExists('big_data_total_rows', $data ?? [], null); + $this->setIfExists('big_data_total_storage', $data ?? [], null); + $this->setIfExists('scripts_running_total', $data ?? [], null); + $this->setIfExists('scripts_running_count', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets org_id + * + * @return int|null + */ + public function getOrgId() + { + return $this->container['org_id']; + } + + /** + * Sets org_id + * + * @param int|null $org_id org_id + * + * @return self + */ + public function setOrgId($org_id) + { + if (is_null($org_id)) { + throw new \InvalidArgumentException('non-nullable org_id cannot be null'); + } + $this->container['org_id'] = $org_id; + + return $this; + } + + /** + * Gets org_name + * + * @return string|null + */ + public function getOrgName() + { + return $this->container['org_name']; + } + + /** + * Sets org_name + * + * @param string|null $org_name org_name + * + * @return self + */ + public function setOrgName($org_name) + { + if (is_null($org_name)) { + throw new \InvalidArgumentException('non-nullable org_name cannot be null'); + } + $this->container['org_name'] = $org_name; + + return $this; + } + + /** + * Gets storage_quota + * + * @return int|null + */ + public function getStorageQuota() + { + return $this->container['storage_quota']; + } + + /** + * Sets storage_quota + * + * @param int|null $storage_quota storage_quota + * + * @return self + */ + public function setStorageQuota($storage_quota) + { + if (is_null($storage_quota)) { + throw new \InvalidArgumentException('non-nullable storage_quota cannot be null'); + } + $this->container['storage_quota'] = $storage_quota; + + return $this; + } + + /** + * Gets storage_usage + * + * @return int|null + */ + public function getStorageUsage() + { + return $this->container['storage_usage']; + } + + /** + * Sets storage_usage + * + * @param int|null $storage_usage storage_usage + * + * @return self + */ + public function setStorageUsage($storage_usage) + { + if (is_null($storage_usage)) { + throw new \InvalidArgumentException('non-nullable storage_usage cannot be null'); + } + $this->container['storage_usage'] = $storage_usage; + + return $this; + } + + /** + * Gets member_quota + * + * @return int|null + */ + public function getMemberQuota() + { + return $this->container['member_quota']; + } + + /** + * Sets member_quota + * + * @param int|null $member_quota member_quota + * + * @return self + */ + public function setMemberQuota($member_quota) + { + if (is_null($member_quota)) { + throw new \InvalidArgumentException('non-nullable member_quota cannot be null'); + } + $this->container['member_quota'] = $member_quota; + + return $this; + } + + /** + * Gets member_usage + * + * @return int|null + */ + public function getMemberUsage() + { + return $this->container['member_usage']; + } + + /** + * Sets member_usage + * + * @param int|null $member_usage member_usage + * + * @return self + */ + public function setMemberUsage($member_usage) + { + if (is_null($member_usage)) { + throw new \InvalidArgumentException('non-nullable member_usage cannot be null'); + } + $this->container['member_usage'] = $member_usage; + + return $this; + } + + /** + * Gets active_members + * + * @return int|null + */ + public function getActiveMembers() + { + return $this->container['active_members']; + } + + /** + * Sets active_members + * + * @param int|null $active_members active_members + * + * @return self + */ + public function setActiveMembers($active_members) + { + if (is_null($active_members)) { + throw new \InvalidArgumentException('non-nullable active_members cannot be null'); + } + $this->container['active_members'] = $active_members; + + return $this; + } + + /** + * Gets row_usage + * + * @return int|null + */ + public function getRowUsage() + { + return $this->container['row_usage']; + } + + /** + * Sets row_usage + * + * @param int|null $row_usage row_usage + * + * @return self + */ + public function setRowUsage($row_usage) + { + if (is_null($row_usage)) { + throw new \InvalidArgumentException('non-nullable row_usage cannot be null'); + } + $this->container['row_usage'] = $row_usage; + + return $this; + } + + /** + * Gets row_total + * + * @return int|null + */ + public function getRowTotal() + { + return $this->container['row_total']; + } + + /** + * Sets row_total + * + * @param int|null $row_total row_total + * + * @return self + */ + public function setRowTotal($row_total) + { + if (is_null($row_total)) { + throw new \InvalidArgumentException('non-nullable row_total cannot be null'); + } + $this->container['row_total'] = $row_total; + + return $this; + } + + /** + * Gets role + * + * @return string|null + */ + public function getRole() + { + return $this->container['role']; + } + + /** + * Sets role + * + * @param string|null $role role + * + * @return self + */ + public function setRole($role) + { + if (is_null($role)) { + throw new \InvalidArgumentException('non-nullable role cannot be null'); + } + $this->container['role'] = $role; + + return $this; + } + + /** + * Gets big_data_row_limit + * + * @return int|null + */ + public function getBigDataRowLimit() + { + return $this->container['big_data_row_limit']; + } + + /** + * Sets big_data_row_limit + * + * @param int|null $big_data_row_limit big_data_row_limit + * + * @return self + */ + public function setBigDataRowLimit($big_data_row_limit) + { + if (is_null($big_data_row_limit)) { + throw new \InvalidArgumentException('non-nullable big_data_row_limit cannot be null'); + } + $this->container['big_data_row_limit'] = $big_data_row_limit; + + return $this; + } + + /** + * Gets big_data_total_rows + * + * @return int|null + */ + public function getBigDataTotalRows() + { + return $this->container['big_data_total_rows']; + } + + /** + * Sets big_data_total_rows + * + * @param int|null $big_data_total_rows big_data_total_rows + * + * @return self + */ + public function setBigDataTotalRows($big_data_total_rows) + { + if (is_null($big_data_total_rows)) { + throw new \InvalidArgumentException('non-nullable big_data_total_rows cannot be null'); + } + $this->container['big_data_total_rows'] = $big_data_total_rows; + + return $this; + } + + /** + * Gets big_data_total_storage + * + * @return int|null + */ + public function getBigDataTotalStorage() + { + return $this->container['big_data_total_storage']; + } + + /** + * Sets big_data_total_storage + * + * @param int|null $big_data_total_storage big_data_total_storage + * + * @return self + */ + public function setBigDataTotalStorage($big_data_total_storage) + { + if (is_null($big_data_total_storage)) { + throw new \InvalidArgumentException('non-nullable big_data_total_storage cannot be null'); + } + $this->container['big_data_total_storage'] = $big_data_total_storage; + + return $this; + } + + /** + * Gets scripts_running_total + * + * @return int|null + */ + public function getScriptsRunningTotal() + { + return $this->container['scripts_running_total']; + } + + /** + * Sets scripts_running_total + * + * @param int|null $scripts_running_total scripts_running_total + * + * @return self + */ + public function setScriptsRunningTotal($scripts_running_total) + { + if (is_null($scripts_running_total)) { + throw new \InvalidArgumentException('non-nullable scripts_running_total cannot be null'); + } + $this->container['scripts_running_total'] = $scripts_running_total; + + return $this; + } + + /** + * Gets scripts_running_count + * + * @return int|null + */ + public function getScriptsRunningCount() + { + return $this->container['scripts_running_count']; + } + + /** + * Sets scripts_running_count + * + * @param int|null $scripts_running_count scripts_running_count + * + * @return self + */ + public function setScriptsRunningCount($scripts_running_count) + { + if (is_null($scripts_running_count)) { + throw new \InvalidArgumentException('non-nullable scripts_running_count cannot be null'); + } + $this->container['scripts_running_count'] = $scripts_running_count; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/TeamAdmin/GetTeamSettings200Response.php b/lib/TeamAdmin/GetTeamSettings200Response.php new file mode 100644 index 00000000..e3e341df --- /dev/null +++ b/lib/TeamAdmin/GetTeamSettings200Response.php @@ -0,0 +1,476 @@ + + */ +class GetTeamSettings200Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'getTeamSettings_200_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'enable_force_2fa' => 'bool', + 'enable_new_user_email' => 'bool', + 'enable_external_user_access_invite_link' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'enable_force_2fa' => null, + 'enable_new_user_email' => null, + 'enable_external_user_access_invite_link' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'enable_force_2fa' => false, + 'enable_new_user_email' => false, + 'enable_external_user_access_invite_link' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'enable_force_2fa' => 'enable_force_2fa', + 'enable_new_user_email' => 'enable_new_user_email', + 'enable_external_user_access_invite_link' => 'enable_external_user_access_invite_link' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'enable_force_2fa' => 'setEnableForce2fa', + 'enable_new_user_email' => 'setEnableNewUserEmail', + 'enable_external_user_access_invite_link' => 'setEnableExternalUserAccessInviteLink' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'enable_force_2fa' => 'getEnableForce2fa', + 'enable_new_user_email' => 'getEnableNewUserEmail', + 'enable_external_user_access_invite_link' => 'getEnableExternalUserAccessInviteLink' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('enable_force_2fa', $data ?? [], null); + $this->setIfExists('enable_new_user_email', $data ?? [], null); + $this->setIfExists('enable_external_user_access_invite_link', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets enable_force_2fa + * + * @return bool|null + */ + public function getEnableForce2fa() + { + return $this->container['enable_force_2fa']; + } + + /** + * Sets enable_force_2fa + * + * @param bool|null $enable_force_2fa enable_force_2fa + * + * @return self + */ + public function setEnableForce2fa($enable_force_2fa) + { + if (is_null($enable_force_2fa)) { + throw new \InvalidArgumentException('non-nullable enable_force_2fa cannot be null'); + } + $this->container['enable_force_2fa'] = $enable_force_2fa; + + return $this; + } + + /** + * Gets enable_new_user_email + * + * @return bool|null + */ + public function getEnableNewUserEmail() + { + return $this->container['enable_new_user_email']; + } + + /** + * Sets enable_new_user_email + * + * @param bool|null $enable_new_user_email enable_new_user_email + * + * @return self + */ + public function setEnableNewUserEmail($enable_new_user_email) + { + if (is_null($enable_new_user_email)) { + throw new \InvalidArgumentException('non-nullable enable_new_user_email cannot be null'); + } + $this->container['enable_new_user_email'] = $enable_new_user_email; + + return $this; + } + + /** + * Gets enable_external_user_access_invite_link + * + * @return bool|null + */ + public function getEnableExternalUserAccessInviteLink() + { + return $this->container['enable_external_user_access_invite_link']; + } + + /** + * Sets enable_external_user_access_invite_link + * + * @param bool|null $enable_external_user_access_invite_link enable_external_user_access_invite_link + * + * @return self + */ + public function setEnableExternalUserAccessInviteLink($enable_external_user_access_invite_link) + { + if (is_null($enable_external_user_access_invite_link)) { + throw new \InvalidArgumentException('non-nullable enable_external_user_access_invite_link cannot be null'); + } + $this->container['enable_external_user_access_invite_link'] = $enable_external_user_access_invite_link; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/TeamAdmin/GetUser200Response.php b/lib/TeamAdmin/GetUser200Response.php new file mode 100644 index 00000000..c8fd478f --- /dev/null +++ b/lib/TeamAdmin/GetUser200Response.php @@ -0,0 +1,748 @@ + + */ +class GetUser200Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'getUser_200_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'email' => 'string', + 'name' => 'string', + 'contact_email' => 'string', + 'quota_usage' => 'int', + 'quota_total' => 'int', + 'avatar_url' => 'string', + 'id_in_org' => 'string', + 'has_default_device' => 'bool', + 'is_force_2fa' => 'bool', + 'is_active' => 'bool', + 'is_org_admin' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'email' => null, + 'name' => null, + 'contact_email' => null, + 'quota_usage' => null, + 'quota_total' => null, + 'avatar_url' => null, + 'id_in_org' => null, + 'has_default_device' => null, + 'is_force_2fa' => null, + 'is_active' => null, + 'is_org_admin' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'email' => false, + 'name' => false, + 'contact_email' => false, + 'quota_usage' => false, + 'quota_total' => false, + 'avatar_url' => false, + 'id_in_org' => false, + 'has_default_device' => false, + 'is_force_2fa' => false, + 'is_active' => false, + 'is_org_admin' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'email' => 'email', + 'name' => 'name', + 'contact_email' => 'contact_email', + 'quota_usage' => 'quota_usage', + 'quota_total' => 'quota_total', + 'avatar_url' => 'avatar_url', + 'id_in_org' => 'id_in_org', + 'has_default_device' => 'has_default_device', + 'is_force_2fa' => 'is_force_2fa', + 'is_active' => 'is_active', + 'is_org_admin' => 'is_org_admin' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'email' => 'setEmail', + 'name' => 'setName', + 'contact_email' => 'setContactEmail', + 'quota_usage' => 'setQuotaUsage', + 'quota_total' => 'setQuotaTotal', + 'avatar_url' => 'setAvatarUrl', + 'id_in_org' => 'setIdInOrg', + 'has_default_device' => 'setHasDefaultDevice', + 'is_force_2fa' => 'setIsForce2fa', + 'is_active' => 'setIsActive', + 'is_org_admin' => 'setIsOrgAdmin' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'email' => 'getEmail', + 'name' => 'getName', + 'contact_email' => 'getContactEmail', + 'quota_usage' => 'getQuotaUsage', + 'quota_total' => 'getQuotaTotal', + 'avatar_url' => 'getAvatarUrl', + 'id_in_org' => 'getIdInOrg', + 'has_default_device' => 'getHasDefaultDevice', + 'is_force_2fa' => 'getIsForce2fa', + 'is_active' => 'getIsActive', + 'is_org_admin' => 'getIsOrgAdmin' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('email', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('contact_email', $data ?? [], null); + $this->setIfExists('quota_usage', $data ?? [], null); + $this->setIfExists('quota_total', $data ?? [], null); + $this->setIfExists('avatar_url', $data ?? [], null); + $this->setIfExists('id_in_org', $data ?? [], null); + $this->setIfExists('has_default_device', $data ?? [], null); + $this->setIfExists('is_force_2fa', $data ?? [], null); + $this->setIfExists('is_active', $data ?? [], null); + $this->setIfExists('is_org_admin', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets email + * + * @return string|null + */ + public function getEmail() + { + return $this->container['email']; + } + + /** + * Sets email + * + * @param string|null $email email + * + * @return self + */ + public function setEmail($email) + { + if (is_null($email)) { + throw new \InvalidArgumentException('non-nullable email cannot be null'); + } + $this->container['email'] = $email; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name name + * + * @return self + */ + public function setName($name) + { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets contact_email + * + * @return string|null + */ + public function getContactEmail() + { + return $this->container['contact_email']; + } + + /** + * Sets contact_email + * + * @param string|null $contact_email contact_email + * + * @return self + */ + public function setContactEmail($contact_email) + { + if (is_null($contact_email)) { + throw new \InvalidArgumentException('non-nullable contact_email cannot be null'); + } + $this->container['contact_email'] = $contact_email; + + return $this; + } + + /** + * Gets quota_usage + * + * @return int|null + */ + public function getQuotaUsage() + { + return $this->container['quota_usage']; + } + + /** + * Sets quota_usage + * + * @param int|null $quota_usage quota_usage + * + * @return self + */ + public function setQuotaUsage($quota_usage) + { + if (is_null($quota_usage)) { + throw new \InvalidArgumentException('non-nullable quota_usage cannot be null'); + } + $this->container['quota_usage'] = $quota_usage; + + return $this; + } + + /** + * Gets quota_total + * + * @return int|null + */ + public function getQuotaTotal() + { + return $this->container['quota_total']; + } + + /** + * Sets quota_total + * + * @param int|null $quota_total quota_total + * + * @return self + */ + public function setQuotaTotal($quota_total) + { + if (is_null($quota_total)) { + throw new \InvalidArgumentException('non-nullable quota_total cannot be null'); + } + $this->container['quota_total'] = $quota_total; + + return $this; + } + + /** + * Gets avatar_url + * + * @return string|null + */ + public function getAvatarUrl() + { + return $this->container['avatar_url']; + } + + /** + * Sets avatar_url + * + * @param string|null $avatar_url avatar_url + * + * @return self + */ + public function setAvatarUrl($avatar_url) + { + if (is_null($avatar_url)) { + throw new \InvalidArgumentException('non-nullable avatar_url cannot be null'); + } + $this->container['avatar_url'] = $avatar_url; + + return $this; + } + + /** + * Gets id_in_org + * + * @return string|null + */ + public function getIdInOrg() + { + return $this->container['id_in_org']; + } + + /** + * Sets id_in_org + * + * @param string|null $id_in_org id_in_org + * + * @return self + */ + public function setIdInOrg($id_in_org) + { + if (is_null($id_in_org)) { + throw new \InvalidArgumentException('non-nullable id_in_org cannot be null'); + } + $this->container['id_in_org'] = $id_in_org; + + return $this; + } + + /** + * Gets has_default_device + * + * @return bool|null + */ + public function getHasDefaultDevice() + { + return $this->container['has_default_device']; + } + + /** + * Sets has_default_device + * + * @param bool|null $has_default_device has_default_device + * + * @return self + */ + public function setHasDefaultDevice($has_default_device) + { + if (is_null($has_default_device)) { + throw new \InvalidArgumentException('non-nullable has_default_device cannot be null'); + } + $this->container['has_default_device'] = $has_default_device; + + return $this; + } + + /** + * Gets is_force_2fa + * + * @return bool|null + */ + public function getIsForce2fa() + { + return $this->container['is_force_2fa']; + } + + /** + * Sets is_force_2fa + * + * @param bool|null $is_force_2fa is_force_2fa + * + * @return self + */ + public function setIsForce2fa($is_force_2fa) + { + if (is_null($is_force_2fa)) { + throw new \InvalidArgumentException('non-nullable is_force_2fa cannot be null'); + } + $this->container['is_force_2fa'] = $is_force_2fa; + + return $this; + } + + /** + * Gets is_active + * + * @return bool|null + */ + public function getIsActive() + { + return $this->container['is_active']; + } + + /** + * Sets is_active + * + * @param bool|null $is_active is_active + * + * @return self + */ + public function setIsActive($is_active) + { + if (is_null($is_active)) { + throw new \InvalidArgumentException('non-nullable is_active cannot be null'); + } + $this->container['is_active'] = $is_active; + + return $this; + } + + /** + * Gets is_org_admin + * + * @return bool|null + */ + public function getIsOrgAdmin() + { + return $this->container['is_org_admin']; + } + + /** + * Sets is_org_admin + * + * @param bool|null $is_org_admin is_org_admin + * + * @return self + */ + public function setIsOrgAdmin($is_org_admin) + { + if (is_null($is_org_admin)) { + throw new \InvalidArgumentException('non-nullable is_org_admin cannot be null'); + } + $this->container['is_org_admin'] = $is_org_admin; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/TeamAdmin/GroupsApi.php b/lib/TeamAdmin/GroupsApi.php index 938d2741..994241b1 100644 --- a/lib/TeamAdmin/GroupsApi.php +++ b/lib/TeamAdmin/GroupsApi.php @@ -14,7 +14,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -166,7 +166,7 @@ public function getConfig() * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return object + * @return \SeaTable\Client\TeamAdmin\AddGroup200Response */ public function addGroup($org_id, $group_name = null, $group_owner = null, string $contentType = self::contentTypes['addGroup'][0]) { @@ -186,7 +186,7 @@ public function addGroup($org_id, $group_name = null, $group_owner = null, strin * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) + * @return array of \SeaTable\Client\TeamAdmin\AddGroup200Response, HTTP status code, HTTP response headers (array of strings) */ public function addGroupWithHttpInfo($org_id, $group_name = null, $group_owner = null, string $contentType = self::contentTypes['addGroup'][0]) { @@ -218,7 +218,7 @@ public function addGroupWithHttpInfo($org_id, $group_name = null, $group_owner = switch($statusCode) { case 200: return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\TeamAdmin\AddGroup200Response', $request, $response, ); @@ -240,7 +240,7 @@ public function addGroupWithHttpInfo($org_id, $group_name = null, $group_owner = } return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\TeamAdmin\AddGroup200Response', $request, $response, ); @@ -249,7 +249,7 @@ public function addGroupWithHttpInfo($org_id, $group_name = null, $group_owner = case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - 'object', + '\SeaTable\Client\TeamAdmin\AddGroup200Response', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -299,7 +299,7 @@ function ($response) { */ public function addGroupAsyncWithHttpInfo($org_id, $group_name = null, $group_owner = null, string $contentType = self::contentTypes['addGroup'][0]) { - $returnType = 'object'; + $returnType = '\SeaTable\Client\TeamAdmin\AddGroup200Response'; $request = $this->addGroupRequest($org_id, $group_name, $group_owner, $contentType); return $this->client @@ -1075,7 +1075,7 @@ public function deleteGroupRequest($org_id, $group_id, string $contentType = sel * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return object + * @return \SeaTable\Client\TeamAdmin\AddGroup200Response */ public function getGroup($org_id, $group_id, string $contentType = self::contentTypes['getGroup'][0]) { @@ -1094,7 +1094,7 @@ public function getGroup($org_id, $group_id, string $contentType = self::content * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) + * @return array of \SeaTable\Client\TeamAdmin\AddGroup200Response, HTTP status code, HTTP response headers (array of strings) */ public function getGroupWithHttpInfo($org_id, $group_id, string $contentType = self::contentTypes['getGroup'][0]) { @@ -1126,7 +1126,7 @@ public function getGroupWithHttpInfo($org_id, $group_id, string $contentType = s switch($statusCode) { case 200: return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\TeamAdmin\AddGroup200Response', $request, $response, ); @@ -1148,7 +1148,7 @@ public function getGroupWithHttpInfo($org_id, $group_id, string $contentType = s } return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\TeamAdmin\AddGroup200Response', $request, $response, ); @@ -1157,7 +1157,7 @@ public function getGroupWithHttpInfo($org_id, $group_id, string $contentType = s case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - 'object', + '\SeaTable\Client\TeamAdmin\AddGroup200Response', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1205,7 +1205,7 @@ function ($response) { */ public function getGroupAsyncWithHttpInfo($org_id, $group_id, string $contentType = self::contentTypes['getGroup'][0]) { - $returnType = 'object'; + $returnType = '\SeaTable\Client\TeamAdmin\AddGroup200Response'; $request = $this->getGroupRequest($org_id, $group_id, $contentType); return $this->client @@ -1671,7 +1671,7 @@ public function listGroupBasesRequest($org_id, $group_id, string $contentType = * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return object + * @return \SeaTable\Client\TeamAdmin\ListGroupMembers200Response */ public function listGroupMembers($org_id, $group_id, string $contentType = self::contentTypes['listGroupMembers'][0]) { @@ -1690,7 +1690,7 @@ public function listGroupMembers($org_id, $group_id, string $contentType = self: * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) + * @return array of \SeaTable\Client\TeamAdmin\ListGroupMembers200Response, HTTP status code, HTTP response headers (array of strings) */ public function listGroupMembersWithHttpInfo($org_id, $group_id, string $contentType = self::contentTypes['listGroupMembers'][0]) { @@ -1722,7 +1722,7 @@ public function listGroupMembersWithHttpInfo($org_id, $group_id, string $content switch($statusCode) { case 200: return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\TeamAdmin\ListGroupMembers200Response', $request, $response, ); @@ -1744,7 +1744,7 @@ public function listGroupMembersWithHttpInfo($org_id, $group_id, string $content } return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\TeamAdmin\ListGroupMembers200Response', $request, $response, ); @@ -1753,7 +1753,7 @@ public function listGroupMembersWithHttpInfo($org_id, $group_id, string $content case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - 'object', + '\SeaTable\Client\TeamAdmin\ListGroupMembers200Response', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1801,7 +1801,7 @@ function ($response) { */ public function listGroupMembersAsyncWithHttpInfo($org_id, $group_id, string $contentType = self::contentTypes['listGroupMembers'][0]) { - $returnType = 'object'; + $returnType = '\SeaTable\Client\TeamAdmin\ListGroupMembers200Response'; $request = $this->listGroupMembersRequest($org_id, $group_id, $contentType); return $this->client @@ -1970,7 +1970,7 @@ public function listGroupMembersRequest($org_id, $group_id, string $contentType * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return object + * @return \SeaTable\Client\TeamAdmin\ListGroups200Response */ public function listGroups($org_id, $page = null, $per_page = null, string $contentType = self::contentTypes['listGroups'][0]) { @@ -1990,7 +1990,7 @@ public function listGroups($org_id, $page = null, $per_page = null, string $cont * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) + * @return array of \SeaTable\Client\TeamAdmin\ListGroups200Response, HTTP status code, HTTP response headers (array of strings) */ public function listGroupsWithHttpInfo($org_id, $page = null, $per_page = null, string $contentType = self::contentTypes['listGroups'][0]) { @@ -2022,7 +2022,7 @@ public function listGroupsWithHttpInfo($org_id, $page = null, $per_page = null, switch($statusCode) { case 200: return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\TeamAdmin\ListGroups200Response', $request, $response, ); @@ -2044,7 +2044,7 @@ public function listGroupsWithHttpInfo($org_id, $page = null, $per_page = null, } return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\TeamAdmin\ListGroups200Response', $request, $response, ); @@ -2053,7 +2053,7 @@ public function listGroupsWithHttpInfo($org_id, $page = null, $per_page = null, case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - 'object', + '\SeaTable\Client\TeamAdmin\ListGroups200Response', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2103,7 +2103,7 @@ function ($response) { */ public function listGroupsAsyncWithHttpInfo($org_id, $page = null, $per_page = null, string $contentType = self::contentTypes['listGroups'][0]) { - $returnType = 'object'; + $returnType = '\SeaTable\Client\TeamAdmin\ListGroups200Response'; $request = $this->listGroupsRequest($org_id, $page, $per_page, $contentType); return $this->client @@ -2884,7 +2884,7 @@ public function removeGroupMembersRequest($org_id, $group_id, $user_id, string $ * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return object + * @return \SeaTable\Client\TeamAdmin\UpdateGroup200Response */ public function updateGroup($org_id, $group_id, $update_group_request = null, string $contentType = self::contentTypes['updateGroup'][0]) { @@ -2904,7 +2904,7 @@ public function updateGroup($org_id, $group_id, $update_group_request = null, st * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) + * @return array of \SeaTable\Client\TeamAdmin\UpdateGroup200Response, HTTP status code, HTTP response headers (array of strings) */ public function updateGroupWithHttpInfo($org_id, $group_id, $update_group_request = null, string $contentType = self::contentTypes['updateGroup'][0]) { @@ -2936,7 +2936,7 @@ public function updateGroupWithHttpInfo($org_id, $group_id, $update_group_reques switch($statusCode) { case 200: return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\TeamAdmin\UpdateGroup200Response', $request, $response, ); @@ -2958,7 +2958,7 @@ public function updateGroupWithHttpInfo($org_id, $group_id, $update_group_reques } return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\TeamAdmin\UpdateGroup200Response', $request, $response, ); @@ -2967,7 +2967,7 @@ public function updateGroupWithHttpInfo($org_id, $group_id, $update_group_reques case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - 'object', + '\SeaTable\Client\TeamAdmin\UpdateGroup200Response', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -3017,7 +3017,7 @@ function ($response) { */ public function updateGroupAsyncWithHttpInfo($org_id, $group_id, $update_group_request = null, string $contentType = self::contentTypes['updateGroup'][0]) { - $returnType = 'object'; + $returnType = '\SeaTable\Client\TeamAdmin\UpdateGroup200Response'; $request = $this->updateGroupRequest($org_id, $group_id, $update_group_request, $contentType); return $this->client @@ -3533,6 +3533,14 @@ protected function createHttpClientOption() } } + if ($this->config->getCertFile()) { + $options[RequestOptions::CERT] = $this->config->getCertFile(); + } + + if ($this->config->getKeyFile()) { + $options[RequestOptions::SSL_KEY] = $this->config->getKeyFile(); + } + return $options; } diff --git a/lib/TeamAdmin/InfoSettingsApi.php b/lib/TeamAdmin/InfoSettingsApi.php index 83679605..865356e0 100644 --- a/lib/TeamAdmin/InfoSettingsApi.php +++ b/lib/TeamAdmin/InfoSettingsApi.php @@ -14,7 +14,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -73,6 +73,9 @@ class InfoSettingsApi /** @var string[] $contentTypes **/ public const contentTypes = [ + 'deleteTeam' => [ + 'application/json', + ], 'getTeamInfo' => [ 'application/json', ], @@ -133,6 +136,258 @@ public function getConfig() return $this->config; } + /** + * Operation deleteTeam + * + * Delete Team + * + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteTeam'] to see the possible values for this operation + * + * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return object + */ + public function deleteTeam(string $contentType = self::contentTypes['deleteTeam'][0]) + { + list($response) = $this->deleteTeamWithHttpInfo($contentType); + return $response; + } + + /** + * Operation deleteTeamWithHttpInfo + * + * Delete Team + * + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteTeam'] to see the possible values for this operation + * + * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of object, HTTP status code, HTTP response headers (array of strings) + */ + public function deleteTeamWithHttpInfo(string $contentType = self::contentTypes['deleteTeam'][0]) + { + $request = $this->deleteTeamRequest($contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + 'object', + $request, + $response, + ); + } + + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + 'object', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + 'object', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + + throw $e; + } + } + + /** + * Operation deleteTeamAsync + * + * Delete Team + * + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteTeam'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteTeamAsync(string $contentType = self::contentTypes['deleteTeam'][0]) + { + return $this->deleteTeamAsyncWithHttpInfo($contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation deleteTeamAsyncWithHttpInfo + * + * Delete Team + * + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteTeam'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteTeamAsyncWithHttpInfo(string $contentType = self::contentTypes['deleteTeam'][0]) + { + $returnType = 'object'; + $request = $this->deleteTeamRequest($contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'deleteTeam' + * + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteTeam'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function deleteTeamRequest(string $contentType = self::contentTypes['deleteTeam'][0]) + { + + + $resourcePath = '/api/v2.1/org/admin/'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'DELETE', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + /** * Operation getTeamInfo * @@ -142,7 +397,7 @@ public function getConfig() * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return object + * @return \SeaTable\Client\TeamAdmin\GetTeamInfo200Response */ public function getTeamInfo(string $contentType = self::contentTypes['getTeamInfo'][0]) { @@ -159,7 +414,7 @@ public function getTeamInfo(string $contentType = self::contentTypes['getTeamInf * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) + * @return array of \SeaTable\Client\TeamAdmin\GetTeamInfo200Response, HTTP status code, HTTP response headers (array of strings) */ public function getTeamInfoWithHttpInfo(string $contentType = self::contentTypes['getTeamInfo'][0]) { @@ -191,7 +446,7 @@ public function getTeamInfoWithHttpInfo(string $contentType = self::contentTypes switch($statusCode) { case 200: return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\TeamAdmin\GetTeamInfo200Response', $request, $response, ); @@ -213,7 +468,7 @@ public function getTeamInfoWithHttpInfo(string $contentType = self::contentTypes } return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\TeamAdmin\GetTeamInfo200Response', $request, $response, ); @@ -222,7 +477,7 @@ public function getTeamInfoWithHttpInfo(string $contentType = self::contentTypes case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - 'object', + '\SeaTable\Client\TeamAdmin\GetTeamInfo200Response', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -266,7 +521,7 @@ function ($response) { */ public function getTeamInfoAsyncWithHttpInfo(string $contentType = self::contentTypes['getTeamInfo'][0]) { - $returnType = 'object'; + $returnType = '\SeaTable\Client\TeamAdmin\GetTeamInfo200Response'; $request = $this->getTeamInfoRequest($contentType); return $this->client @@ -394,7 +649,7 @@ public function getTeamInfoRequest(string $contentType = self::contentTypes['get * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return object + * @return \SeaTable\Client\TeamAdmin\GetTeamSettings200Response */ public function getTeamSettings(string $contentType = self::contentTypes['getTeamSettings'][0]) { @@ -411,7 +666,7 @@ public function getTeamSettings(string $contentType = self::contentTypes['getTea * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) + * @return array of \SeaTable\Client\TeamAdmin\GetTeamSettings200Response, HTTP status code, HTTP response headers (array of strings) */ public function getTeamSettingsWithHttpInfo(string $contentType = self::contentTypes['getTeamSettings'][0]) { @@ -443,7 +698,7 @@ public function getTeamSettingsWithHttpInfo(string $contentType = self::contentT switch($statusCode) { case 200: return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\TeamAdmin\GetTeamSettings200Response', $request, $response, ); @@ -465,7 +720,7 @@ public function getTeamSettingsWithHttpInfo(string $contentType = self::contentT } return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\TeamAdmin\GetTeamSettings200Response', $request, $response, ); @@ -474,7 +729,7 @@ public function getTeamSettingsWithHttpInfo(string $contentType = self::contentT case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - 'object', + '\SeaTable\Client\TeamAdmin\GetTeamSettings200Response', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -518,7 +773,7 @@ function ($response) { */ public function getTeamSettingsAsyncWithHttpInfo(string $contentType = self::contentTypes['getTeamSettings'][0]) { - $returnType = 'object'; + $returnType = '\SeaTable\Client\TeamAdmin\GetTeamSettings200Response'; $request = $this->getTeamSettingsRequest($contentType); return $this->client @@ -919,7 +1174,7 @@ public function updateTeamRequest($new_org_name = null, string $contentType = se * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return object + * @return \SeaTable\Client\TeamAdmin\GetTeamSettings200Response */ public function updateTeamSettings($enable_force_2fa = null, $enable_force_sso_login = null, $enable_new_user_email = null, $enable_external_user_access_invite_link = null, $enable_member_modify_name = null, string $contentType = self::contentTypes['updateTeamSettings'][0]) { @@ -941,7 +1196,7 @@ public function updateTeamSettings($enable_force_2fa = null, $enable_force_sso_l * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) + * @return array of \SeaTable\Client\TeamAdmin\GetTeamSettings200Response, HTTP status code, HTTP response headers (array of strings) */ public function updateTeamSettingsWithHttpInfo($enable_force_2fa = null, $enable_force_sso_login = null, $enable_new_user_email = null, $enable_external_user_access_invite_link = null, $enable_member_modify_name = null, string $contentType = self::contentTypes['updateTeamSettings'][0]) { @@ -973,7 +1228,7 @@ public function updateTeamSettingsWithHttpInfo($enable_force_2fa = null, $enable switch($statusCode) { case 200: return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\TeamAdmin\GetTeamSettings200Response', $request, $response, ); @@ -995,7 +1250,7 @@ public function updateTeamSettingsWithHttpInfo($enable_force_2fa = null, $enable } return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\TeamAdmin\GetTeamSettings200Response', $request, $response, ); @@ -1004,7 +1259,7 @@ public function updateTeamSettingsWithHttpInfo($enable_force_2fa = null, $enable case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - 'object', + '\SeaTable\Client\TeamAdmin\GetTeamSettings200Response', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1058,7 +1313,7 @@ function ($response) { */ public function updateTeamSettingsAsyncWithHttpInfo($enable_force_2fa = null, $enable_force_sso_login = null, $enable_new_user_email = null, $enable_external_user_access_invite_link = null, $enable_member_modify_name = null, string $contentType = self::contentTypes['updateTeamSettings'][0]) { - $returnType = 'object'; + $returnType = '\SeaTable\Client\TeamAdmin\GetTeamSettings200Response'; $request = $this->updateTeamSettingsRequest($enable_force_2fa, $enable_force_sso_login, $enable_new_user_email, $enable_external_user_access_invite_link, $enable_member_modify_name, $contentType); return $this->client @@ -1217,6 +1472,14 @@ protected function createHttpClientOption() } } + if ($this->config->getCertFile()) { + $options[RequestOptions::CERT] = $this->config->getCertFile(); + } + + if ($this->config->getKeyFile()) { + $options[RequestOptions::SSL_KEY] = $this->config->getKeyFile(); + } + return $options; } diff --git a/lib/TeamAdmin/ListGroupMembers200Response.php b/lib/TeamAdmin/ListGroupMembers200Response.php new file mode 100644 index 00000000..218e7d75 --- /dev/null +++ b/lib/TeamAdmin/ListGroupMembers200Response.php @@ -0,0 +1,476 @@ + + */ +class ListGroupMembers200Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'listGroupMembers_200_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'group_id' => 'int', + 'group_name' => 'string', + 'members' => 'object[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'group_id' => null, + 'group_name' => null, + 'members' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'group_id' => false, + 'group_name' => false, + 'members' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'group_id' => 'group_id', + 'group_name' => 'group_name', + 'members' => 'members' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'group_id' => 'setGroupId', + 'group_name' => 'setGroupName', + 'members' => 'setMembers' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'group_id' => 'getGroupId', + 'group_name' => 'getGroupName', + 'members' => 'getMembers' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('group_id', $data ?? [], null); + $this->setIfExists('group_name', $data ?? [], null); + $this->setIfExists('members', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets group_id + * + * @return int|null + */ + public function getGroupId() + { + return $this->container['group_id']; + } + + /** + * Sets group_id + * + * @param int|null $group_id group_id + * + * @return self + */ + public function setGroupId($group_id) + { + if (is_null($group_id)) { + throw new \InvalidArgumentException('non-nullable group_id cannot be null'); + } + $this->container['group_id'] = $group_id; + + return $this; + } + + /** + * Gets group_name + * + * @return string|null + */ + public function getGroupName() + { + return $this->container['group_name']; + } + + /** + * Sets group_name + * + * @param string|null $group_name group_name + * + * @return self + */ + public function setGroupName($group_name) + { + if (is_null($group_name)) { + throw new \InvalidArgumentException('non-nullable group_name cannot be null'); + } + $this->container['group_name'] = $group_name; + + return $this; + } + + /** + * Gets members + * + * @return object[]|null + */ + public function getMembers() + { + return $this->container['members']; + } + + /** + * Sets members + * + * @param object[]|null $members members + * + * @return self + */ + public function setMembers($members) + { + if (is_null($members)) { + throw new \InvalidArgumentException('non-nullable members cannot be null'); + } + $this->container['members'] = $members; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/TeamAdmin/ListGroups200Response.php b/lib/TeamAdmin/ListGroups200Response.php new file mode 100644 index 00000000..547c261e --- /dev/null +++ b/lib/TeamAdmin/ListGroups200Response.php @@ -0,0 +1,510 @@ + + */ +class ListGroups200Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'listGroups_200_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'groups' => 'object[]', + 'page' => 'int', + 'per_page' => 'int', + 'page_next' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'groups' => null, + 'page' => null, + 'per_page' => null, + 'page_next' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'groups' => false, + 'page' => false, + 'per_page' => false, + 'page_next' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'groups' => 'groups', + 'page' => 'page', + 'per_page' => 'per_page', + 'page_next' => 'page_next' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'groups' => 'setGroups', + 'page' => 'setPage', + 'per_page' => 'setPerPage', + 'page_next' => 'setPageNext' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'groups' => 'getGroups', + 'page' => 'getPage', + 'per_page' => 'getPerPage', + 'page_next' => 'getPageNext' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('groups', $data ?? [], null); + $this->setIfExists('page', $data ?? [], null); + $this->setIfExists('per_page', $data ?? [], null); + $this->setIfExists('page_next', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets groups + * + * @return object[]|null + */ + public function getGroups() + { + return $this->container['groups']; + } + + /** + * Sets groups + * + * @param object[]|null $groups groups + * + * @return self + */ + public function setGroups($groups) + { + if (is_null($groups)) { + throw new \InvalidArgumentException('non-nullable groups cannot be null'); + } + $this->container['groups'] = $groups; + + return $this; + } + + /** + * Gets page + * + * @return int|null + */ + public function getPage() + { + return $this->container['page']; + } + + /** + * Sets page + * + * @param int|null $page page + * + * @return self + */ + public function setPage($page) + { + if (is_null($page)) { + throw new \InvalidArgumentException('non-nullable page cannot be null'); + } + $this->container['page'] = $page; + + return $this; + } + + /** + * Gets per_page + * + * @return int|null + */ + public function getPerPage() + { + return $this->container['per_page']; + } + + /** + * Sets per_page + * + * @param int|null $per_page per_page + * + * @return self + */ + public function setPerPage($per_page) + { + if (is_null($per_page)) { + throw new \InvalidArgumentException('non-nullable per_page cannot be null'); + } + $this->container['per_page'] = $per_page; + + return $this; + } + + /** + * Gets page_next + * + * @return bool|null + */ + public function getPageNext() + { + return $this->container['page_next']; + } + + /** + * Sets page_next + * + * @param bool|null $page_next page_next + * + * @return self + */ + public function setPageNext($page_next) + { + if (is_null($page_next)) { + throw new \InvalidArgumentException('non-nullable page_next cannot be null'); + } + $this->container['page_next'] = $page_next; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/TeamAdmin/ListShares200Response.php b/lib/TeamAdmin/ListShares200Response.php new file mode 100644 index 00000000..46ac1915 --- /dev/null +++ b/lib/TeamAdmin/ListShares200Response.php @@ -0,0 +1,510 @@ + + */ +class ListShares200Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'listShares_200_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'dtable_user_shares' => 'object[]', + 'dtable_group_shares' => 'object[]', + 'view_user_shares' => 'object[]', + 'view_group_shares' => 'object[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'dtable_user_shares' => null, + 'dtable_group_shares' => null, + 'view_user_shares' => null, + 'view_group_shares' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'dtable_user_shares' => false, + 'dtable_group_shares' => false, + 'view_user_shares' => false, + 'view_group_shares' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'dtable_user_shares' => 'dtable_user_shares', + 'dtable_group_shares' => 'dtable_group_shares', + 'view_user_shares' => 'view_user_shares', + 'view_group_shares' => 'view_group_shares' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'dtable_user_shares' => 'setDtableUserShares', + 'dtable_group_shares' => 'setDtableGroupShares', + 'view_user_shares' => 'setViewUserShares', + 'view_group_shares' => 'setViewGroupShares' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'dtable_user_shares' => 'getDtableUserShares', + 'dtable_group_shares' => 'getDtableGroupShares', + 'view_user_shares' => 'getViewUserShares', + 'view_group_shares' => 'getViewGroupShares' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('dtable_user_shares', $data ?? [], null); + $this->setIfExists('dtable_group_shares', $data ?? [], null); + $this->setIfExists('view_user_shares', $data ?? [], null); + $this->setIfExists('view_group_shares', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets dtable_user_shares + * + * @return object[]|null + */ + public function getDtableUserShares() + { + return $this->container['dtable_user_shares']; + } + + /** + * Sets dtable_user_shares + * + * @param object[]|null $dtable_user_shares dtable_user_shares + * + * @return self + */ + public function setDtableUserShares($dtable_user_shares) + { + if (is_null($dtable_user_shares)) { + throw new \InvalidArgumentException('non-nullable dtable_user_shares cannot be null'); + } + $this->container['dtable_user_shares'] = $dtable_user_shares; + + return $this; + } + + /** + * Gets dtable_group_shares + * + * @return object[]|null + */ + public function getDtableGroupShares() + { + return $this->container['dtable_group_shares']; + } + + /** + * Sets dtable_group_shares + * + * @param object[]|null $dtable_group_shares dtable_group_shares + * + * @return self + */ + public function setDtableGroupShares($dtable_group_shares) + { + if (is_null($dtable_group_shares)) { + throw new \InvalidArgumentException('non-nullable dtable_group_shares cannot be null'); + } + $this->container['dtable_group_shares'] = $dtable_group_shares; + + return $this; + } + + /** + * Gets view_user_shares + * + * @return object[]|null + */ + public function getViewUserShares() + { + return $this->container['view_user_shares']; + } + + /** + * Sets view_user_shares + * + * @param object[]|null $view_user_shares view_user_shares + * + * @return self + */ + public function setViewUserShares($view_user_shares) + { + if (is_null($view_user_shares)) { + throw new \InvalidArgumentException('non-nullable view_user_shares cannot be null'); + } + $this->container['view_user_shares'] = $view_user_shares; + + return $this; + } + + /** + * Gets view_group_shares + * + * @return object[]|null + */ + public function getViewGroupShares() + { + return $this->container['view_group_shares']; + } + + /** + * Sets view_group_shares + * + * @param object[]|null $view_group_shares view_group_shares + * + * @return self + */ + public function setViewGroupShares($view_group_shares) + { + if (is_null($view_group_shares)) { + throw new \InvalidArgumentException('non-nullable view_group_shares cannot be null'); + } + $this->container['view_group_shares'] = $view_group_shares; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/TeamAdmin/ModelInterface.php b/lib/TeamAdmin/ModelInterface.php index 6bd430e9..66ce62f0 100644 --- a/lib/TeamAdmin/ModelInterface.php +++ b/lib/TeamAdmin/ModelInterface.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ diff --git a/lib/TeamAdmin/SAMLApi.php b/lib/TeamAdmin/SAMLApi.php index 732beea9..c1ad9fdc 100644 --- a/lib/TeamAdmin/SAMLApi.php +++ b/lib/TeamAdmin/SAMLApi.php @@ -14,7 +14,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -1195,6 +1195,14 @@ protected function createHttpClientOption() } } + if ($this->config->getCertFile()) { + $options[RequestOptions::CERT] = $this->config->getCertFile(); + } + + if ($this->config->getKeyFile()) { + $options[RequestOptions::SSL_KEY] = $this->config->getKeyFile(); + } + return $options; } diff --git a/lib/TeamAdmin/SharingLinksApi.php b/lib/TeamAdmin/SharingLinksApi.php index eb1ade32..4c4c85ee 100644 --- a/lib/TeamAdmin/SharingLinksApi.php +++ b/lib/TeamAdmin/SharingLinksApi.php @@ -14,7 +14,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -88,6 +88,9 @@ class SharingLinksApi 'listInviteLinks' => [ 'application/json', ], + 'listShares' => [ + 'application/json', + ], 'listViewExternalLinks' => [ 'application/json', ], @@ -148,7 +151,7 @@ public function getConfig() * Delete External Link * * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) - * @param string $external_link_token external_link_token (required) + * @param string $external_link_token The token of the external link. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteExternalLink'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -167,7 +170,7 @@ public function deleteExternalLink($org_id, $external_link_token, string $conten * Delete External Link * * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) - * @param string $external_link_token (required) + * @param string $external_link_token The token of the external link. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteExternalLink'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -253,7 +256,7 @@ public function deleteExternalLinkWithHttpInfo($org_id, $external_link_token, st * Delete External Link * * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) - * @param string $external_link_token (required) + * @param string $external_link_token The token of the external link. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteExternalLink'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -275,7 +278,7 @@ function ($response) { * Delete External Link * * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) - * @param string $external_link_token (required) + * @param string $external_link_token The token of the external link. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteExternalLink'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -326,7 +329,7 @@ function ($exception) { * Create request for operation 'deleteExternalLink' * * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) - * @param string $external_link_token (required) + * @param string $external_link_token The token of the external link. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteExternalLink'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -351,10 +354,7 @@ public function deleteExternalLinkRequest($org_id, $external_link_token, string 'Missing the required parameter $external_link_token when calling deleteExternalLink' ); } - if (!preg_match("/^[0-9a-f]{20}$/", $external_link_token)) { - throw new \InvalidArgumentException("invalid value for \"external_link_token\" when calling SharingLinksApi.deleteExternalLink, must conform to the pattern /^[0-9a-f]{20}$/."); - } - + $resourcePath = '/api/v2.1/org/{org_id}/admin/external-links/{external_link_token}/'; $formParams = []; @@ -446,7 +446,7 @@ public function deleteExternalLinkRequest($org_id, $external_link_token, string * Delete Invite Link * * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) - * @param string $invite_link_token invite_link_token (required) + * @param string $invite_link_token The token of the invite link. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteInviteLink'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -465,7 +465,7 @@ public function deleteInviteLink($org_id, $invite_link_token, string $contentTyp * Delete Invite Link * * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) - * @param string $invite_link_token (required) + * @param string $invite_link_token The token of the invite link. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteInviteLink'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -551,7 +551,7 @@ public function deleteInviteLinkWithHttpInfo($org_id, $invite_link_token, string * Delete Invite Link * * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) - * @param string $invite_link_token (required) + * @param string $invite_link_token The token of the invite link. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteInviteLink'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -573,7 +573,7 @@ function ($response) { * Delete Invite Link * * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) - * @param string $invite_link_token (required) + * @param string $invite_link_token The token of the invite link. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteInviteLink'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -624,7 +624,7 @@ function ($exception) { * Create request for operation 'deleteInviteLink' * * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) - * @param string $invite_link_token (required) + * @param string $invite_link_token The token of the invite link. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteInviteLink'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -744,7 +744,7 @@ public function deleteInviteLinkRequest($org_id, $invite_link_token, string $con * Delete View External Link * * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) - * @param string $view_external_link_token view_external_link_token (required) + * @param string $view_external_link_token The token of the view external link. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteViewExternalLink'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -763,7 +763,7 @@ public function deleteViewExternalLink($org_id, $view_external_link_token, strin * Delete View External Link * * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) - * @param string $view_external_link_token (required) + * @param string $view_external_link_token The token of the view external link. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteViewExternalLink'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -849,7 +849,7 @@ public function deleteViewExternalLinkWithHttpInfo($org_id, $view_external_link_ * Delete View External Link * * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) - * @param string $view_external_link_token (required) + * @param string $view_external_link_token The token of the view external link. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteViewExternalLink'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -871,7 +871,7 @@ function ($response) { * Delete View External Link * * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) - * @param string $view_external_link_token (required) + * @param string $view_external_link_token The token of the view external link. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteViewExternalLink'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -922,7 +922,7 @@ function ($exception) { * Create request for operation 'deleteViewExternalLink' * * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) - * @param string $view_external_link_token (required) + * @param string $view_external_link_token The token of the view external link. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteViewExternalLink'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -947,10 +947,7 @@ public function deleteViewExternalLinkRequest($org_id, $view_external_link_token 'Missing the required parameter $view_external_link_token when calling deleteViewExternalLink' ); } - if (!preg_match("/^[0-9a-f]{20}$/", $view_external_link_token)) { - throw new \InvalidArgumentException("invalid value for \"view_external_link_token\" when calling SharingLinksApi.deleteViewExternalLink, must conform to the pattern /^[0-9a-f]{20}$/."); - } - + $resourcePath = '/api/v2.1/org/{org_id}/admin/view-external-links/{view_external_link_token}/'; $formParams = []; @@ -1555,6 +1552,281 @@ public function listInviteLinksRequest($org_id, $page = null, $per_page = null, ) ?? []); + // path params + if ($org_id !== null) { + $resourcePath = str_replace( + '{' . 'org_id' . '}', + ObjectSerializer::toPathValue($org_id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation listShares + * + * List Shares + * + * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listShares'] to see the possible values for this operation + * + * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \SeaTable\Client\TeamAdmin\ListShares200Response + */ + public function listShares($org_id, string $contentType = self::contentTypes['listShares'][0]) + { + list($response) = $this->listSharesWithHttpInfo($org_id, $contentType); + return $response; + } + + /** + * Operation listSharesWithHttpInfo + * + * List Shares + * + * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listShares'] to see the possible values for this operation + * + * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \SeaTable\Client\TeamAdmin\ListShares200Response, HTTP status code, HTTP response headers (array of strings) + */ + public function listSharesWithHttpInfo($org_id, string $contentType = self::contentTypes['listShares'][0]) + { + $request = $this->listSharesRequest($org_id, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\SeaTable\Client\TeamAdmin\ListShares200Response', + $request, + $response, + ); + } + + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\SeaTable\Client\TeamAdmin\ListShares200Response', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\SeaTable\Client\TeamAdmin\ListShares200Response', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + + throw $e; + } + } + + /** + * Operation listSharesAsync + * + * List Shares + * + * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listShares'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function listSharesAsync($org_id, string $contentType = self::contentTypes['listShares'][0]) + { + return $this->listSharesAsyncWithHttpInfo($org_id, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation listSharesAsyncWithHttpInfo + * + * List Shares + * + * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listShares'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function listSharesAsyncWithHttpInfo($org_id, string $contentType = self::contentTypes['listShares'][0]) + { + $returnType = '\SeaTable\Client\TeamAdmin\ListShares200Response'; + $request = $this->listSharesRequest($org_id, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'listShares' + * + * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listShares'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function listSharesRequest($org_id, string $contentType = self::contentTypes['listShares'][0]) + { + + // verify the required parameter 'org_id' is set + if ($org_id === null || (is_array($org_id) && count($org_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $org_id when calling listShares' + ); + } + if ($org_id < 1) { + throw new \InvalidArgumentException('invalid value for "$org_id" when calling SharingLinksApi.listShares, must be bigger than or equal to 1.'); + } + + + $resourcePath = '/api/v2.1/org/{org_id}/admin/shares/'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params if ($org_id !== null) { $resourcePath = str_replace( @@ -1903,13 +2175,13 @@ public function listViewExternalLinksRequest($org_id, string $contentType = self * Update Invite Link * * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) - * @param string $invite_link_token invite_link_token (required) + * @param string $invite_link_token The token of the invite link. (required) * @param \SeaTable\Client\TeamAdmin\UpdateInviteLinkRequest|null $update_invite_link_request update_invite_link_request (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateInviteLink'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return object + * @return \SeaTable\Client\TeamAdmin\UpdateInviteLink200Response */ public function updateInviteLink($org_id, $invite_link_token, $update_invite_link_request = null, string $contentType = self::contentTypes['updateInviteLink'][0]) { @@ -1923,13 +2195,13 @@ public function updateInviteLink($org_id, $invite_link_token, $update_invite_lin * Update Invite Link * * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) - * @param string $invite_link_token (required) + * @param string $invite_link_token The token of the invite link. (required) * @param \SeaTable\Client\TeamAdmin\UpdateInviteLinkRequest|null $update_invite_link_request (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateInviteLink'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) + * @return array of \SeaTable\Client\TeamAdmin\UpdateInviteLink200Response, HTTP status code, HTTP response headers (array of strings) */ public function updateInviteLinkWithHttpInfo($org_id, $invite_link_token, $update_invite_link_request = null, string $contentType = self::contentTypes['updateInviteLink'][0]) { @@ -1961,7 +2233,7 @@ public function updateInviteLinkWithHttpInfo($org_id, $invite_link_token, $updat switch($statusCode) { case 200: return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\TeamAdmin\UpdateInviteLink200Response', $request, $response, ); @@ -1983,7 +2255,7 @@ public function updateInviteLinkWithHttpInfo($org_id, $invite_link_token, $updat } return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\TeamAdmin\UpdateInviteLink200Response', $request, $response, ); @@ -1992,7 +2264,7 @@ public function updateInviteLinkWithHttpInfo($org_id, $invite_link_token, $updat case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - 'object', + '\SeaTable\Client\TeamAdmin\UpdateInviteLink200Response', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2010,7 +2282,7 @@ public function updateInviteLinkWithHttpInfo($org_id, $invite_link_token, $updat * Update Invite Link * * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) - * @param string $invite_link_token (required) + * @param string $invite_link_token The token of the invite link. (required) * @param \SeaTable\Client\TeamAdmin\UpdateInviteLinkRequest|null $update_invite_link_request (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateInviteLink'] to see the possible values for this operation * @@ -2033,7 +2305,7 @@ function ($response) { * Update Invite Link * * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) - * @param string $invite_link_token (required) + * @param string $invite_link_token The token of the invite link. (required) * @param \SeaTable\Client\TeamAdmin\UpdateInviteLinkRequest|null $update_invite_link_request (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateInviteLink'] to see the possible values for this operation * @@ -2042,7 +2314,7 @@ function ($response) { */ public function updateInviteLinkAsyncWithHttpInfo($org_id, $invite_link_token, $update_invite_link_request = null, string $contentType = self::contentTypes['updateInviteLink'][0]) { - $returnType = 'object'; + $returnType = '\SeaTable\Client\TeamAdmin\UpdateInviteLink200Response'; $request = $this->updateInviteLinkRequest($org_id, $invite_link_token, $update_invite_link_request, $contentType); return $this->client @@ -2085,7 +2357,7 @@ function ($exception) { * Create request for operation 'updateInviteLink' * * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) - * @param string $invite_link_token (required) + * @param string $invite_link_token The token of the invite link. (required) * @param \SeaTable\Client\TeamAdmin\UpdateInviteLinkRequest|null $update_invite_link_request (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateInviteLink'] to see the possible values for this operation * @@ -2224,6 +2496,14 @@ protected function createHttpClientOption() } } + if ($this->config->getCertFile()) { + $options[RequestOptions::CERT] = $this->config->getCertFile(); + } + + if ($this->config->getKeyFile()) { + $options[RequestOptions::SSL_KEY] = $this->config->getKeyFile(); + } + return $options; } diff --git a/lib/TeamAdmin/StatisticsApi.php b/lib/TeamAdmin/StatisticsApi.php new file mode 100644 index 00000000..1f3239a3 --- /dev/null +++ b/lib/TeamAdmin/StatisticsApi.php @@ -0,0 +1,2649 @@ + [ + 'application/json', + ], + 'getAutomationLogStatisticsByBase' => [ + 'application/json', + ], + 'getAutomationLogStatisticsByDay' => [ + 'application/json', + ], + 'getLoginLogStatisticsByDay' => [ + 'application/json', + ], + 'getPythonRunStatisticsByBase' => [ + 'application/json', + ], + 'getPythonRunStatisticsByDay' => [ + 'application/json', + ], + 'getUserOrBaseAIStatistics' => [ + 'application/json', + ], + ]; + + /** + * @param ClientInterface $client + * @param Configuration $config + * @param HeaderSelector $selector + * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec + */ + public function __construct( + ?ClientInterface $client = null, + ?Configuration $config = null, + ?HeaderSelector $selector = null, + int $hostIndex = 0 + ) { + $this->client = $client ?: new Client(); + $this->config = $config ?: Configuration::getDefaultConfiguration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + $this->hostIndex = $hostIndex; + } + + /** + * Set the host index + * + * @param int $hostIndex Host index (required) + */ + public function setHostIndex($hostIndex): void + { + $this->hostIndex = $hostIndex; + } + + /** + * Get the host index + * + * @return int Host index + */ + public function getHostIndex() + { + return $this->hostIndex; + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->config; + } + + /** + * Operation getAdminLogStatisticsByDay + * + * Admin Logs (by Day) + * + * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) + * @param \DateTime|null $start Start date in ISO format. (optional) + * @param \DateTime|null $end End date in ISO format. (optional) + * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) + * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAdminLogStatisticsByDay'] to see the possible values for this operation + * + * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return object + */ + public function getAdminLogStatisticsByDay($org_id, $start = null, $end = null, $page = null, $per_page = null, string $contentType = self::contentTypes['getAdminLogStatisticsByDay'][0]) + { + list($response) = $this->getAdminLogStatisticsByDayWithHttpInfo($org_id, $start, $end, $page, $per_page, $contentType); + return $response; + } + + /** + * Operation getAdminLogStatisticsByDayWithHttpInfo + * + * Admin Logs (by Day) + * + * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) + * @param \DateTime|null $start Start date in ISO format. (optional) + * @param \DateTime|null $end End date in ISO format. (optional) + * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) + * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAdminLogStatisticsByDay'] to see the possible values for this operation + * + * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of object, HTTP status code, HTTP response headers (array of strings) + */ + public function getAdminLogStatisticsByDayWithHttpInfo($org_id, $start = null, $end = null, $page = null, $per_page = null, string $contentType = self::contentTypes['getAdminLogStatisticsByDay'][0]) + { + $request = $this->getAdminLogStatisticsByDayRequest($org_id, $start, $end, $page, $per_page, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + 'object', + $request, + $response, + ); + } + + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + 'object', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + 'object', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + + throw $e; + } + } + + /** + * Operation getAdminLogStatisticsByDayAsync + * + * Admin Logs (by Day) + * + * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) + * @param \DateTime|null $start Start date in ISO format. (optional) + * @param \DateTime|null $end End date in ISO format. (optional) + * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) + * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAdminLogStatisticsByDay'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getAdminLogStatisticsByDayAsync($org_id, $start = null, $end = null, $page = null, $per_page = null, string $contentType = self::contentTypes['getAdminLogStatisticsByDay'][0]) + { + return $this->getAdminLogStatisticsByDayAsyncWithHttpInfo($org_id, $start, $end, $page, $per_page, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getAdminLogStatisticsByDayAsyncWithHttpInfo + * + * Admin Logs (by Day) + * + * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) + * @param \DateTime|null $start Start date in ISO format. (optional) + * @param \DateTime|null $end End date in ISO format. (optional) + * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) + * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAdminLogStatisticsByDay'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getAdminLogStatisticsByDayAsyncWithHttpInfo($org_id, $start = null, $end = null, $page = null, $per_page = null, string $contentType = self::contentTypes['getAdminLogStatisticsByDay'][0]) + { + $returnType = 'object'; + $request = $this->getAdminLogStatisticsByDayRequest($org_id, $start, $end, $page, $per_page, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getAdminLogStatisticsByDay' + * + * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) + * @param \DateTime|null $start Start date in ISO format. (optional) + * @param \DateTime|null $end End date in ISO format. (optional) + * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) + * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAdminLogStatisticsByDay'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getAdminLogStatisticsByDayRequest($org_id, $start = null, $end = null, $page = null, $per_page = null, string $contentType = self::contentTypes['getAdminLogStatisticsByDay'][0]) + { + + // verify the required parameter 'org_id' is set + if ($org_id === null || (is_array($org_id) && count($org_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $org_id when calling getAdminLogStatisticsByDay' + ); + } + if ($org_id < 1) { + throw new \InvalidArgumentException('invalid value for "$org_id" when calling StatisticsApi.getAdminLogStatisticsByDay, must be bigger than or equal to 1.'); + } + + + + if ($page !== null && $page < 1) { + throw new \InvalidArgumentException('invalid value for "$page" when calling StatisticsApi.getAdminLogStatisticsByDay, must be bigger than or equal to 1.'); + } + + if ($per_page !== null && $per_page < 1) { + throw new \InvalidArgumentException('invalid value for "$per_page" when calling StatisticsApi.getAdminLogStatisticsByDay, must be bigger than or equal to 1.'); + } + + + $resourcePath = '/api/v2.1/org/{org_id}/admin/statistics/admin-logs/by-day/'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $start, + 'start', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $end, + 'end', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $page, + 'page', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $per_page, + 'per_page', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + + + // path params + if ($org_id !== null) { + $resourcePath = str_replace( + '{' . 'org_id' . '}', + ObjectSerializer::toPathValue($org_id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getAutomationLogStatisticsByBase + * + * Automation Logs (by Base) + * + * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) + * @param \DateTime|null $start Start date in ISO format. (optional) + * @param \DateTime|null $end End date in ISO format. (optional) + * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) + * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAutomationLogStatisticsByBase'] to see the possible values for this operation + * + * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return object + */ + public function getAutomationLogStatisticsByBase($org_id, $start = null, $end = null, $page = null, $per_page = null, string $contentType = self::contentTypes['getAutomationLogStatisticsByBase'][0]) + { + list($response) = $this->getAutomationLogStatisticsByBaseWithHttpInfo($org_id, $start, $end, $page, $per_page, $contentType); + return $response; + } + + /** + * Operation getAutomationLogStatisticsByBaseWithHttpInfo + * + * Automation Logs (by Base) + * + * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) + * @param \DateTime|null $start Start date in ISO format. (optional) + * @param \DateTime|null $end End date in ISO format. (optional) + * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) + * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAutomationLogStatisticsByBase'] to see the possible values for this operation + * + * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of object, HTTP status code, HTTP response headers (array of strings) + */ + public function getAutomationLogStatisticsByBaseWithHttpInfo($org_id, $start = null, $end = null, $page = null, $per_page = null, string $contentType = self::contentTypes['getAutomationLogStatisticsByBase'][0]) + { + $request = $this->getAutomationLogStatisticsByBaseRequest($org_id, $start, $end, $page, $per_page, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + 'object', + $request, + $response, + ); + } + + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + 'object', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + 'object', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + + throw $e; + } + } + + /** + * Operation getAutomationLogStatisticsByBaseAsync + * + * Automation Logs (by Base) + * + * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) + * @param \DateTime|null $start Start date in ISO format. (optional) + * @param \DateTime|null $end End date in ISO format. (optional) + * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) + * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAutomationLogStatisticsByBase'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getAutomationLogStatisticsByBaseAsync($org_id, $start = null, $end = null, $page = null, $per_page = null, string $contentType = self::contentTypes['getAutomationLogStatisticsByBase'][0]) + { + return $this->getAutomationLogStatisticsByBaseAsyncWithHttpInfo($org_id, $start, $end, $page, $per_page, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getAutomationLogStatisticsByBaseAsyncWithHttpInfo + * + * Automation Logs (by Base) + * + * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) + * @param \DateTime|null $start Start date in ISO format. (optional) + * @param \DateTime|null $end End date in ISO format. (optional) + * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) + * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAutomationLogStatisticsByBase'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getAutomationLogStatisticsByBaseAsyncWithHttpInfo($org_id, $start = null, $end = null, $page = null, $per_page = null, string $contentType = self::contentTypes['getAutomationLogStatisticsByBase'][0]) + { + $returnType = 'object'; + $request = $this->getAutomationLogStatisticsByBaseRequest($org_id, $start, $end, $page, $per_page, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getAutomationLogStatisticsByBase' + * + * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) + * @param \DateTime|null $start Start date in ISO format. (optional) + * @param \DateTime|null $end End date in ISO format. (optional) + * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) + * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAutomationLogStatisticsByBase'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getAutomationLogStatisticsByBaseRequest($org_id, $start = null, $end = null, $page = null, $per_page = null, string $contentType = self::contentTypes['getAutomationLogStatisticsByBase'][0]) + { + + // verify the required parameter 'org_id' is set + if ($org_id === null || (is_array($org_id) && count($org_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $org_id when calling getAutomationLogStatisticsByBase' + ); + } + if ($org_id < 1) { + throw new \InvalidArgumentException('invalid value for "$org_id" when calling StatisticsApi.getAutomationLogStatisticsByBase, must be bigger than or equal to 1.'); + } + + + + if ($page !== null && $page < 1) { + throw new \InvalidArgumentException('invalid value for "$page" when calling StatisticsApi.getAutomationLogStatisticsByBase, must be bigger than or equal to 1.'); + } + + if ($per_page !== null && $per_page < 1) { + throw new \InvalidArgumentException('invalid value for "$per_page" when calling StatisticsApi.getAutomationLogStatisticsByBase, must be bigger than or equal to 1.'); + } + + + $resourcePath = '/api/v2.1/org/{org_id}/admin/statistics/automation-logs/by-base/'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $start, + 'start', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $end, + 'end', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $page, + 'page', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $per_page, + 'per_page', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + + + // path params + if ($org_id !== null) { + $resourcePath = str_replace( + '{' . 'org_id' . '}', + ObjectSerializer::toPathValue($org_id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getAutomationLogStatisticsByDay + * + * Automation Logs (by Day) + * + * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) + * @param string|null $dtable_uuid The unique identifier of a base. (optional) + * @param \DateTime|null $start Start date in ISO format. (optional) + * @param \DateTime|null $end End date in ISO format. (optional) + * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) + * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAutomationLogStatisticsByDay'] to see the possible values for this operation + * + * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return object + */ + public function getAutomationLogStatisticsByDay($org_id, $dtable_uuid = null, $start = null, $end = null, $page = null, $per_page = null, string $contentType = self::contentTypes['getAutomationLogStatisticsByDay'][0]) + { + list($response) = $this->getAutomationLogStatisticsByDayWithHttpInfo($org_id, $dtable_uuid, $start, $end, $page, $per_page, $contentType); + return $response; + } + + /** + * Operation getAutomationLogStatisticsByDayWithHttpInfo + * + * Automation Logs (by Day) + * + * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) + * @param string|null $dtable_uuid The unique identifier of a base. (optional) + * @param \DateTime|null $start Start date in ISO format. (optional) + * @param \DateTime|null $end End date in ISO format. (optional) + * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) + * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAutomationLogStatisticsByDay'] to see the possible values for this operation + * + * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of object, HTTP status code, HTTP response headers (array of strings) + */ + public function getAutomationLogStatisticsByDayWithHttpInfo($org_id, $dtable_uuid = null, $start = null, $end = null, $page = null, $per_page = null, string $contentType = self::contentTypes['getAutomationLogStatisticsByDay'][0]) + { + $request = $this->getAutomationLogStatisticsByDayRequest($org_id, $dtable_uuid, $start, $end, $page, $per_page, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + 'object', + $request, + $response, + ); + } + + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + 'object', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + 'object', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + + throw $e; + } + } + + /** + * Operation getAutomationLogStatisticsByDayAsync + * + * Automation Logs (by Day) + * + * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) + * @param string|null $dtable_uuid The unique identifier of a base. (optional) + * @param \DateTime|null $start Start date in ISO format. (optional) + * @param \DateTime|null $end End date in ISO format. (optional) + * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) + * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAutomationLogStatisticsByDay'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getAutomationLogStatisticsByDayAsync($org_id, $dtable_uuid = null, $start = null, $end = null, $page = null, $per_page = null, string $contentType = self::contentTypes['getAutomationLogStatisticsByDay'][0]) + { + return $this->getAutomationLogStatisticsByDayAsyncWithHttpInfo($org_id, $dtable_uuid, $start, $end, $page, $per_page, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getAutomationLogStatisticsByDayAsyncWithHttpInfo + * + * Automation Logs (by Day) + * + * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) + * @param string|null $dtable_uuid The unique identifier of a base. (optional) + * @param \DateTime|null $start Start date in ISO format. (optional) + * @param \DateTime|null $end End date in ISO format. (optional) + * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) + * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAutomationLogStatisticsByDay'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getAutomationLogStatisticsByDayAsyncWithHttpInfo($org_id, $dtable_uuid = null, $start = null, $end = null, $page = null, $per_page = null, string $contentType = self::contentTypes['getAutomationLogStatisticsByDay'][0]) + { + $returnType = 'object'; + $request = $this->getAutomationLogStatisticsByDayRequest($org_id, $dtable_uuid, $start, $end, $page, $per_page, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getAutomationLogStatisticsByDay' + * + * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) + * @param string|null $dtable_uuid The unique identifier of a base. (optional) + * @param \DateTime|null $start Start date in ISO format. (optional) + * @param \DateTime|null $end End date in ISO format. (optional) + * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) + * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAutomationLogStatisticsByDay'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getAutomationLogStatisticsByDayRequest($org_id, $dtable_uuid = null, $start = null, $end = null, $page = null, $per_page = null, string $contentType = self::contentTypes['getAutomationLogStatisticsByDay'][0]) + { + + // verify the required parameter 'org_id' is set + if ($org_id === null || (is_array($org_id) && count($org_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $org_id when calling getAutomationLogStatisticsByDay' + ); + } + if ($org_id < 1) { + throw new \InvalidArgumentException('invalid value for "$org_id" when calling StatisticsApi.getAutomationLogStatisticsByDay, must be bigger than or equal to 1.'); + } + + if ($dtable_uuid !== null && !preg_match("/^[0-9a-fA-F]{8}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{12}$/", $dtable_uuid)) { + throw new \InvalidArgumentException("invalid value for \"dtable_uuid\" when calling StatisticsApi.getAutomationLogStatisticsByDay, must conform to the pattern /^[0-9a-fA-F]{8}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{12}$/."); + } + + + + if ($page !== null && $page < 1) { + throw new \InvalidArgumentException('invalid value for "$page" when calling StatisticsApi.getAutomationLogStatisticsByDay, must be bigger than or equal to 1.'); + } + + if ($per_page !== null && $per_page < 1) { + throw new \InvalidArgumentException('invalid value for "$per_page" when calling StatisticsApi.getAutomationLogStatisticsByDay, must be bigger than or equal to 1.'); + } + + + $resourcePath = '/api/v2.1/org/{org_id}/admin/statistics/automation-logs/by-day/'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $dtable_uuid, + 'dtable_uuid', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $start, + 'start', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $end, + 'end', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $page, + 'page', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $per_page, + 'per_page', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + + + // path params + if ($org_id !== null) { + $resourcePath = str_replace( + '{' . 'org_id' . '}', + ObjectSerializer::toPathValue($org_id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getLoginLogStatisticsByDay + * + * Login Logs (by Day) + * + * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) + * @param \DateTime|null $start Start date in ISO format. (optional) + * @param \DateTime|null $end End date in ISO format. (optional) + * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) + * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getLoginLogStatisticsByDay'] to see the possible values for this operation + * + * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return object + */ + public function getLoginLogStatisticsByDay($org_id, $start = null, $end = null, $page = null, $per_page = null, string $contentType = self::contentTypes['getLoginLogStatisticsByDay'][0]) + { + list($response) = $this->getLoginLogStatisticsByDayWithHttpInfo($org_id, $start, $end, $page, $per_page, $contentType); + return $response; + } + + /** + * Operation getLoginLogStatisticsByDayWithHttpInfo + * + * Login Logs (by Day) + * + * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) + * @param \DateTime|null $start Start date in ISO format. (optional) + * @param \DateTime|null $end End date in ISO format. (optional) + * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) + * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getLoginLogStatisticsByDay'] to see the possible values for this operation + * + * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of object, HTTP status code, HTTP response headers (array of strings) + */ + public function getLoginLogStatisticsByDayWithHttpInfo($org_id, $start = null, $end = null, $page = null, $per_page = null, string $contentType = self::contentTypes['getLoginLogStatisticsByDay'][0]) + { + $request = $this->getLoginLogStatisticsByDayRequest($org_id, $start, $end, $page, $per_page, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + 'object', + $request, + $response, + ); + } + + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + 'object', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + 'object', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + + throw $e; + } + } + + /** + * Operation getLoginLogStatisticsByDayAsync + * + * Login Logs (by Day) + * + * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) + * @param \DateTime|null $start Start date in ISO format. (optional) + * @param \DateTime|null $end End date in ISO format. (optional) + * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) + * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getLoginLogStatisticsByDay'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getLoginLogStatisticsByDayAsync($org_id, $start = null, $end = null, $page = null, $per_page = null, string $contentType = self::contentTypes['getLoginLogStatisticsByDay'][0]) + { + return $this->getLoginLogStatisticsByDayAsyncWithHttpInfo($org_id, $start, $end, $page, $per_page, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getLoginLogStatisticsByDayAsyncWithHttpInfo + * + * Login Logs (by Day) + * + * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) + * @param \DateTime|null $start Start date in ISO format. (optional) + * @param \DateTime|null $end End date in ISO format. (optional) + * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) + * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getLoginLogStatisticsByDay'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getLoginLogStatisticsByDayAsyncWithHttpInfo($org_id, $start = null, $end = null, $page = null, $per_page = null, string $contentType = self::contentTypes['getLoginLogStatisticsByDay'][0]) + { + $returnType = 'object'; + $request = $this->getLoginLogStatisticsByDayRequest($org_id, $start, $end, $page, $per_page, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getLoginLogStatisticsByDay' + * + * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) + * @param \DateTime|null $start Start date in ISO format. (optional) + * @param \DateTime|null $end End date in ISO format. (optional) + * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) + * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getLoginLogStatisticsByDay'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getLoginLogStatisticsByDayRequest($org_id, $start = null, $end = null, $page = null, $per_page = null, string $contentType = self::contentTypes['getLoginLogStatisticsByDay'][0]) + { + + // verify the required parameter 'org_id' is set + if ($org_id === null || (is_array($org_id) && count($org_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $org_id when calling getLoginLogStatisticsByDay' + ); + } + if ($org_id < 1) { + throw new \InvalidArgumentException('invalid value for "$org_id" when calling StatisticsApi.getLoginLogStatisticsByDay, must be bigger than or equal to 1.'); + } + + + + if ($page !== null && $page < 1) { + throw new \InvalidArgumentException('invalid value for "$page" when calling StatisticsApi.getLoginLogStatisticsByDay, must be bigger than or equal to 1.'); + } + + if ($per_page !== null && $per_page < 1) { + throw new \InvalidArgumentException('invalid value for "$per_page" when calling StatisticsApi.getLoginLogStatisticsByDay, must be bigger than or equal to 1.'); + } + + + $resourcePath = '/api/v2.1/org/{org_id}/admin/statistics/login-logs/by-day/'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $start, + 'start', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $end, + 'end', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $page, + 'page', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $per_page, + 'per_page', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + + + // path params + if ($org_id !== null) { + $resourcePath = str_replace( + '{' . 'org_id' . '}', + ObjectSerializer::toPathValue($org_id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getPythonRunStatisticsByBase + * + * Python Runs (by Base) + * + * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) + * @param \DateTime|null $start Start date in ISO format. (optional) + * @param \DateTime|null $end End date in ISO format. (optional) + * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) + * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPythonRunStatisticsByBase'] to see the possible values for this operation + * + * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return object + */ + public function getPythonRunStatisticsByBase($org_id, $start = null, $end = null, $page = null, $per_page = null, string $contentType = self::contentTypes['getPythonRunStatisticsByBase'][0]) + { + list($response) = $this->getPythonRunStatisticsByBaseWithHttpInfo($org_id, $start, $end, $page, $per_page, $contentType); + return $response; + } + + /** + * Operation getPythonRunStatisticsByBaseWithHttpInfo + * + * Python Runs (by Base) + * + * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) + * @param \DateTime|null $start Start date in ISO format. (optional) + * @param \DateTime|null $end End date in ISO format. (optional) + * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) + * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPythonRunStatisticsByBase'] to see the possible values for this operation + * + * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of object, HTTP status code, HTTP response headers (array of strings) + */ + public function getPythonRunStatisticsByBaseWithHttpInfo($org_id, $start = null, $end = null, $page = null, $per_page = null, string $contentType = self::contentTypes['getPythonRunStatisticsByBase'][0]) + { + $request = $this->getPythonRunStatisticsByBaseRequest($org_id, $start, $end, $page, $per_page, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + 'object', + $request, + $response, + ); + } + + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + 'object', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + 'object', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + + throw $e; + } + } + + /** + * Operation getPythonRunStatisticsByBaseAsync + * + * Python Runs (by Base) + * + * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) + * @param \DateTime|null $start Start date in ISO format. (optional) + * @param \DateTime|null $end End date in ISO format. (optional) + * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) + * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPythonRunStatisticsByBase'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getPythonRunStatisticsByBaseAsync($org_id, $start = null, $end = null, $page = null, $per_page = null, string $contentType = self::contentTypes['getPythonRunStatisticsByBase'][0]) + { + return $this->getPythonRunStatisticsByBaseAsyncWithHttpInfo($org_id, $start, $end, $page, $per_page, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getPythonRunStatisticsByBaseAsyncWithHttpInfo + * + * Python Runs (by Base) + * + * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) + * @param \DateTime|null $start Start date in ISO format. (optional) + * @param \DateTime|null $end End date in ISO format. (optional) + * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) + * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPythonRunStatisticsByBase'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getPythonRunStatisticsByBaseAsyncWithHttpInfo($org_id, $start = null, $end = null, $page = null, $per_page = null, string $contentType = self::contentTypes['getPythonRunStatisticsByBase'][0]) + { + $returnType = 'object'; + $request = $this->getPythonRunStatisticsByBaseRequest($org_id, $start, $end, $page, $per_page, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getPythonRunStatisticsByBase' + * + * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) + * @param \DateTime|null $start Start date in ISO format. (optional) + * @param \DateTime|null $end End date in ISO format. (optional) + * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) + * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPythonRunStatisticsByBase'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getPythonRunStatisticsByBaseRequest($org_id, $start = null, $end = null, $page = null, $per_page = null, string $contentType = self::contentTypes['getPythonRunStatisticsByBase'][0]) + { + + // verify the required parameter 'org_id' is set + if ($org_id === null || (is_array($org_id) && count($org_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $org_id when calling getPythonRunStatisticsByBase' + ); + } + if ($org_id < 1) { + throw new \InvalidArgumentException('invalid value for "$org_id" when calling StatisticsApi.getPythonRunStatisticsByBase, must be bigger than or equal to 1.'); + } + + + + if ($page !== null && $page < 1) { + throw new \InvalidArgumentException('invalid value for "$page" when calling StatisticsApi.getPythonRunStatisticsByBase, must be bigger than or equal to 1.'); + } + + if ($per_page !== null && $per_page < 1) { + throw new \InvalidArgumentException('invalid value for "$per_page" when calling StatisticsApi.getPythonRunStatisticsByBase, must be bigger than or equal to 1.'); + } + + + $resourcePath = '/api/v2.1/org/{org_id}/admin/statistics/python-runs/by-base/'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $start, + 'start', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $end, + 'end', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $page, + 'page', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $per_page, + 'per_page', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + + + // path params + if ($org_id !== null) { + $resourcePath = str_replace( + '{' . 'org_id' . '}', + ObjectSerializer::toPathValue($org_id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getPythonRunStatisticsByDay + * + * Python Runs (by Day) + * + * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) + * @param string|null $dtable_uuid The unique identifier of a base. (optional) + * @param \DateTime|null $start Start date in ISO format. (optional) + * @param \DateTime|null $end End date in ISO format. (optional) + * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) + * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPythonRunStatisticsByDay'] to see the possible values for this operation + * + * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return object + */ + public function getPythonRunStatisticsByDay($org_id, $dtable_uuid = null, $start = null, $end = null, $page = null, $per_page = null, string $contentType = self::contentTypes['getPythonRunStatisticsByDay'][0]) + { + list($response) = $this->getPythonRunStatisticsByDayWithHttpInfo($org_id, $dtable_uuid, $start, $end, $page, $per_page, $contentType); + return $response; + } + + /** + * Operation getPythonRunStatisticsByDayWithHttpInfo + * + * Python Runs (by Day) + * + * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) + * @param string|null $dtable_uuid The unique identifier of a base. (optional) + * @param \DateTime|null $start Start date in ISO format. (optional) + * @param \DateTime|null $end End date in ISO format. (optional) + * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) + * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPythonRunStatisticsByDay'] to see the possible values for this operation + * + * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of object, HTTP status code, HTTP response headers (array of strings) + */ + public function getPythonRunStatisticsByDayWithHttpInfo($org_id, $dtable_uuid = null, $start = null, $end = null, $page = null, $per_page = null, string $contentType = self::contentTypes['getPythonRunStatisticsByDay'][0]) + { + $request = $this->getPythonRunStatisticsByDayRequest($org_id, $dtable_uuid, $start, $end, $page, $per_page, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + 'object', + $request, + $response, + ); + } + + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + 'object', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + 'object', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + + throw $e; + } + } + + /** + * Operation getPythonRunStatisticsByDayAsync + * + * Python Runs (by Day) + * + * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) + * @param string|null $dtable_uuid The unique identifier of a base. (optional) + * @param \DateTime|null $start Start date in ISO format. (optional) + * @param \DateTime|null $end End date in ISO format. (optional) + * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) + * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPythonRunStatisticsByDay'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getPythonRunStatisticsByDayAsync($org_id, $dtable_uuid = null, $start = null, $end = null, $page = null, $per_page = null, string $contentType = self::contentTypes['getPythonRunStatisticsByDay'][0]) + { + return $this->getPythonRunStatisticsByDayAsyncWithHttpInfo($org_id, $dtable_uuid, $start, $end, $page, $per_page, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getPythonRunStatisticsByDayAsyncWithHttpInfo + * + * Python Runs (by Day) + * + * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) + * @param string|null $dtable_uuid The unique identifier of a base. (optional) + * @param \DateTime|null $start Start date in ISO format. (optional) + * @param \DateTime|null $end End date in ISO format. (optional) + * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) + * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPythonRunStatisticsByDay'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getPythonRunStatisticsByDayAsyncWithHttpInfo($org_id, $dtable_uuid = null, $start = null, $end = null, $page = null, $per_page = null, string $contentType = self::contentTypes['getPythonRunStatisticsByDay'][0]) + { + $returnType = 'object'; + $request = $this->getPythonRunStatisticsByDayRequest($org_id, $dtable_uuid, $start, $end, $page, $per_page, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getPythonRunStatisticsByDay' + * + * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) + * @param string|null $dtable_uuid The unique identifier of a base. (optional) + * @param \DateTime|null $start Start date in ISO format. (optional) + * @param \DateTime|null $end End date in ISO format. (optional) + * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) + * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPythonRunStatisticsByDay'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getPythonRunStatisticsByDayRequest($org_id, $dtable_uuid = null, $start = null, $end = null, $page = null, $per_page = null, string $contentType = self::contentTypes['getPythonRunStatisticsByDay'][0]) + { + + // verify the required parameter 'org_id' is set + if ($org_id === null || (is_array($org_id) && count($org_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $org_id when calling getPythonRunStatisticsByDay' + ); + } + if ($org_id < 1) { + throw new \InvalidArgumentException('invalid value for "$org_id" when calling StatisticsApi.getPythonRunStatisticsByDay, must be bigger than or equal to 1.'); + } + + if ($dtable_uuid !== null && !preg_match("/^[0-9a-fA-F]{8}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{12}$/", $dtable_uuid)) { + throw new \InvalidArgumentException("invalid value for \"dtable_uuid\" when calling StatisticsApi.getPythonRunStatisticsByDay, must conform to the pattern /^[0-9a-fA-F]{8}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{12}$/."); + } + + + + if ($page !== null && $page < 1) { + throw new \InvalidArgumentException('invalid value for "$page" when calling StatisticsApi.getPythonRunStatisticsByDay, must be bigger than or equal to 1.'); + } + + if ($per_page !== null && $per_page < 1) { + throw new \InvalidArgumentException('invalid value for "$per_page" when calling StatisticsApi.getPythonRunStatisticsByDay, must be bigger than or equal to 1.'); + } + + + $resourcePath = '/api/v2.1/org/{org_id}/admin/statistics/python-runs/by-day/'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $dtable_uuid, + 'dtable_uuid', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $start, + 'start', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $end, + 'end', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $page, + 'page', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $per_page, + 'per_page', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + + + // path params + if ($org_id !== null) { + $resourcePath = str_replace( + '{' . 'org_id' . '}', + ObjectSerializer::toPathValue($org_id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getUserOrBaseAIStatistics + * + * Get AI Statistics by User/Base + * + * @param string $group_by Query by owner or Base (required) + * @param string $date A date string in YYYY-MM-DD format (required) + * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) + * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) + * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getUserOrBaseAIStatistics'] to see the possible values for this operation + * + * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return object + */ + public function getUserOrBaseAIStatistics($group_by, $date, $org_id, $page = null, $per_page = null, string $contentType = self::contentTypes['getUserOrBaseAIStatistics'][0]) + { + list($response) = $this->getUserOrBaseAIStatisticsWithHttpInfo($group_by, $date, $org_id, $page, $per_page, $contentType); + return $response; + } + + /** + * Operation getUserOrBaseAIStatisticsWithHttpInfo + * + * Get AI Statistics by User/Base + * + * @param string $group_by Query by owner or Base (required) + * @param string $date A date string in YYYY-MM-DD format (required) + * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) + * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) + * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getUserOrBaseAIStatistics'] to see the possible values for this operation + * + * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of object, HTTP status code, HTTP response headers (array of strings) + */ + public function getUserOrBaseAIStatisticsWithHttpInfo($group_by, $date, $org_id, $page = null, $per_page = null, string $contentType = self::contentTypes['getUserOrBaseAIStatistics'][0]) + { + $request = $this->getUserOrBaseAIStatisticsRequest($group_by, $date, $org_id, $page, $per_page, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + 'object', + $request, + $response, + ); + } + + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + 'object', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + 'object', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + + throw $e; + } + } + + /** + * Operation getUserOrBaseAIStatisticsAsync + * + * Get AI Statistics by User/Base + * + * @param string $group_by Query by owner or Base (required) + * @param string $date A date string in YYYY-MM-DD format (required) + * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) + * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) + * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getUserOrBaseAIStatistics'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getUserOrBaseAIStatisticsAsync($group_by, $date, $org_id, $page = null, $per_page = null, string $contentType = self::contentTypes['getUserOrBaseAIStatistics'][0]) + { + return $this->getUserOrBaseAIStatisticsAsyncWithHttpInfo($group_by, $date, $org_id, $page, $per_page, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getUserOrBaseAIStatisticsAsyncWithHttpInfo + * + * Get AI Statistics by User/Base + * + * @param string $group_by Query by owner or Base (required) + * @param string $date A date string in YYYY-MM-DD format (required) + * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) + * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) + * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getUserOrBaseAIStatistics'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getUserOrBaseAIStatisticsAsyncWithHttpInfo($group_by, $date, $org_id, $page = null, $per_page = null, string $contentType = self::contentTypes['getUserOrBaseAIStatistics'][0]) + { + $returnType = 'object'; + $request = $this->getUserOrBaseAIStatisticsRequest($group_by, $date, $org_id, $page, $per_page, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getUserOrBaseAIStatistics' + * + * @param string $group_by Query by owner or Base (required) + * @param string $date A date string in YYYY-MM-DD format (required) + * @param int $org_id The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin. (required) + * @param int|null $page The page number you want to start showing the entries. If no value is provided, 1 will be used. (optional) + * @param int|null $per_page The number of results that should be returned. If no value is provided, 25 results will be returned. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getUserOrBaseAIStatistics'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getUserOrBaseAIStatisticsRequest($group_by, $date, $org_id, $page = null, $per_page = null, string $contentType = self::contentTypes['getUserOrBaseAIStatistics'][0]) + { + + // verify the required parameter 'group_by' is set + if ($group_by === null || (is_array($group_by) && count($group_by) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $group_by when calling getUserOrBaseAIStatistics' + ); + } + + // verify the required parameter 'date' is set + if ($date === null || (is_array($date) && count($date) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $date when calling getUserOrBaseAIStatistics' + ); + } + + // verify the required parameter 'org_id' is set + if ($org_id === null || (is_array($org_id) && count($org_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $org_id when calling getUserOrBaseAIStatistics' + ); + } + if ($org_id < 1) { + throw new \InvalidArgumentException('invalid value for "$org_id" when calling StatisticsApi.getUserOrBaseAIStatistics, must be bigger than or equal to 1.'); + } + + if ($page !== null && $page < 1) { + throw new \InvalidArgumentException('invalid value for "$page" when calling StatisticsApi.getUserOrBaseAIStatistics, must be bigger than or equal to 1.'); + } + + if ($per_page !== null && $per_page < 1) { + throw new \InvalidArgumentException('invalid value for "$per_page" when calling StatisticsApi.getUserOrBaseAIStatistics, must be bigger than or equal to 1.'); + } + + + $resourcePath = '/api/v2.1/org/{org_id}/admin/statistics/ai/'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $group_by, + 'group_by', // param base name + 'string', // openApiType + 'form', // style + true, // explode + true // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $date, + 'date', // param base name + 'string', // openApiType + 'form', // style + true, // explode + true // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $page, + 'page', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $per_page, + 'per_page', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + + + // path params + if ($org_id !== null) { + $resourcePath = str_replace( + '{' . 'org_id' . '}', + ObjectSerializer::toPathValue($org_id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Create http client option + * + * @throws \RuntimeException on file opening failure + * @return array of http client options + */ + protected function createHttpClientOption() + { + $options = []; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if (!$options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + } + } + + if ($this->config->getCertFile()) { + $options[RequestOptions::CERT] = $this->config->getCertFile(); + } + + if ($this->config->getKeyFile()) { + $options[RequestOptions::SSL_KEY] = $this->config->getKeyFile(); + } + + return $options; + } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response + ): array { + if ($dataType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } +} diff --git a/lib/TeamAdmin/TeamAdminPermission.php b/lib/TeamAdmin/TeamAdminPermission.php index 53bf43da..616b4fe0 100644 --- a/lib/TeamAdmin/TeamAdminPermission.php +++ b/lib/TeamAdmin/TeamAdminPermission.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ diff --git a/lib/TeamAdmin/UpdateGroup200Response.php b/lib/TeamAdmin/UpdateGroup200Response.php new file mode 100644 index 00000000..4d77182d --- /dev/null +++ b/lib/TeamAdmin/UpdateGroup200Response.php @@ -0,0 +1,612 @@ + + */ +class UpdateGroup200Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'updateGroup_200_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'id' => 'int', + 'group_name' => 'string', + 'ctime' => 'string', + 'creator_email' => 'string', + 'creator_name' => 'string', + 'creator_contact_email' => 'string', + 'size' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'id' => null, + 'group_name' => null, + 'ctime' => null, + 'creator_email' => null, + 'creator_name' => null, + 'creator_contact_email' => null, + 'size' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'id' => false, + 'group_name' => false, + 'ctime' => false, + 'creator_email' => false, + 'creator_name' => false, + 'creator_contact_email' => false, + 'size' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'group_name' => 'group_name', + 'ctime' => 'ctime', + 'creator_email' => 'creator_email', + 'creator_name' => 'creator_name', + 'creator_contact_email' => 'creator_contact_email', + 'size' => 'size' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'group_name' => 'setGroupName', + 'ctime' => 'setCtime', + 'creator_email' => 'setCreatorEmail', + 'creator_name' => 'setCreatorName', + 'creator_contact_email' => 'setCreatorContactEmail', + 'size' => 'setSize' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'group_name' => 'getGroupName', + 'ctime' => 'getCtime', + 'creator_email' => 'getCreatorEmail', + 'creator_name' => 'getCreatorName', + 'creator_contact_email' => 'getCreatorContactEmail', + 'size' => 'getSize' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('group_name', $data ?? [], null); + $this->setIfExists('ctime', $data ?? [], null); + $this->setIfExists('creator_email', $data ?? [], null); + $this->setIfExists('creator_name', $data ?? [], null); + $this->setIfExists('creator_contact_email', $data ?? [], null); + $this->setIfExists('size', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return int|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int|null $id id + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets group_name + * + * @return string|null + */ + public function getGroupName() + { + return $this->container['group_name']; + } + + /** + * Sets group_name + * + * @param string|null $group_name group_name + * + * @return self + */ + public function setGroupName($group_name) + { + if (is_null($group_name)) { + throw new \InvalidArgumentException('non-nullable group_name cannot be null'); + } + $this->container['group_name'] = $group_name; + + return $this; + } + + /** + * Gets ctime + * + * @return string|null + */ + public function getCtime() + { + return $this->container['ctime']; + } + + /** + * Sets ctime + * + * @param string|null $ctime ctime + * + * @return self + */ + public function setCtime($ctime) + { + if (is_null($ctime)) { + throw new \InvalidArgumentException('non-nullable ctime cannot be null'); + } + $this->container['ctime'] = $ctime; + + return $this; + } + + /** + * Gets creator_email + * + * @return string|null + */ + public function getCreatorEmail() + { + return $this->container['creator_email']; + } + + /** + * Sets creator_email + * + * @param string|null $creator_email creator_email + * + * @return self + */ + public function setCreatorEmail($creator_email) + { + if (is_null($creator_email)) { + throw new \InvalidArgumentException('non-nullable creator_email cannot be null'); + } + $this->container['creator_email'] = $creator_email; + + return $this; + } + + /** + * Gets creator_name + * + * @return string|null + */ + public function getCreatorName() + { + return $this->container['creator_name']; + } + + /** + * Sets creator_name + * + * @param string|null $creator_name creator_name + * + * @return self + */ + public function setCreatorName($creator_name) + { + if (is_null($creator_name)) { + throw new \InvalidArgumentException('non-nullable creator_name cannot be null'); + } + $this->container['creator_name'] = $creator_name; + + return $this; + } + + /** + * Gets creator_contact_email + * + * @return string|null + */ + public function getCreatorContactEmail() + { + return $this->container['creator_contact_email']; + } + + /** + * Sets creator_contact_email + * + * @param string|null $creator_contact_email creator_contact_email + * + * @return self + */ + public function setCreatorContactEmail($creator_contact_email) + { + if (is_null($creator_contact_email)) { + throw new \InvalidArgumentException('non-nullable creator_contact_email cannot be null'); + } + $this->container['creator_contact_email'] = $creator_contact_email; + + return $this; + } + + /** + * Gets size + * + * @return int|null + */ + public function getSize() + { + return $this->container['size']; + } + + /** + * Sets size + * + * @param int|null $size size + * + * @return self + */ + public function setSize($size) + { + if (is_null($size)) { + throw new \InvalidArgumentException('non-nullable size cannot be null'); + } + $this->container['size'] = $size; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/TeamAdmin/UpdateGroupMemberRoleRequest.php b/lib/TeamAdmin/UpdateGroupMemberRoleRequest.php index 805c8a2f..5a4f9bac 100644 --- a/lib/TeamAdmin/UpdateGroupMemberRoleRequest.php +++ b/lib/TeamAdmin/UpdateGroupMemberRoleRequest.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -320,11 +320,11 @@ public function setIsAdmin($is_admin) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -332,12 +332,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -362,11 +362,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/TeamAdmin/UpdateGroupRequest.php b/lib/TeamAdmin/UpdateGroupRequest.php index 55808f39..8a7f1209 100644 --- a/lib/TeamAdmin/UpdateGroupRequest.php +++ b/lib/TeamAdmin/UpdateGroupRequest.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -351,11 +351,11 @@ public function setNewGroupName($new_group_name) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -363,12 +363,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -393,11 +393,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/TeamAdmin/UpdateInviteLink200Response.php b/lib/TeamAdmin/UpdateInviteLink200Response.php new file mode 100644 index 00000000..359a6e25 --- /dev/null +++ b/lib/TeamAdmin/UpdateInviteLink200Response.php @@ -0,0 +1,680 @@ + + */ +class UpdateInviteLink200Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'updateInviteLink_200_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'username' => 'string', + 'permission' => 'string', + 'token' => 'string', + 'link' => 'string', + 'dtable' => 'string', + 'dtable_id' => 'int', + 'workspace_id' => 'int', + 'expire_date' => 'string', + 'ctime' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'username' => null, + 'permission' => null, + 'token' => null, + 'link' => null, + 'dtable' => null, + 'dtable_id' => null, + 'workspace_id' => null, + 'expire_date' => null, + 'ctime' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'username' => false, + 'permission' => false, + 'token' => false, + 'link' => false, + 'dtable' => false, + 'dtable_id' => false, + 'workspace_id' => false, + 'expire_date' => false, + 'ctime' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'username' => 'username', + 'permission' => 'permission', + 'token' => 'token', + 'link' => 'link', + 'dtable' => 'dtable', + 'dtable_id' => 'dtable_id', + 'workspace_id' => 'workspace_id', + 'expire_date' => 'expire_date', + 'ctime' => 'ctime' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'username' => 'setUsername', + 'permission' => 'setPermission', + 'token' => 'setToken', + 'link' => 'setLink', + 'dtable' => 'setDtable', + 'dtable_id' => 'setDtableId', + 'workspace_id' => 'setWorkspaceId', + 'expire_date' => 'setExpireDate', + 'ctime' => 'setCtime' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'username' => 'getUsername', + 'permission' => 'getPermission', + 'token' => 'getToken', + 'link' => 'getLink', + 'dtable' => 'getDtable', + 'dtable_id' => 'getDtableId', + 'workspace_id' => 'getWorkspaceId', + 'expire_date' => 'getExpireDate', + 'ctime' => 'getCtime' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('username', $data ?? [], null); + $this->setIfExists('permission', $data ?? [], null); + $this->setIfExists('token', $data ?? [], null); + $this->setIfExists('link', $data ?? [], null); + $this->setIfExists('dtable', $data ?? [], null); + $this->setIfExists('dtable_id', $data ?? [], null); + $this->setIfExists('workspace_id', $data ?? [], null); + $this->setIfExists('expire_date', $data ?? [], null); + $this->setIfExists('ctime', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets username + * + * @return string|null + */ + public function getUsername() + { + return $this->container['username']; + } + + /** + * Sets username + * + * @param string|null $username username + * + * @return self + */ + public function setUsername($username) + { + if (is_null($username)) { + throw new \InvalidArgumentException('non-nullable username cannot be null'); + } + $this->container['username'] = $username; + + return $this; + } + + /** + * Gets permission + * + * @return string|null + */ + public function getPermission() + { + return $this->container['permission']; + } + + /** + * Sets permission + * + * @param string|null $permission permission + * + * @return self + */ + public function setPermission($permission) + { + if (is_null($permission)) { + throw new \InvalidArgumentException('non-nullable permission cannot be null'); + } + $this->container['permission'] = $permission; + + return $this; + } + + /** + * Gets token + * + * @return string|null + */ + public function getToken() + { + return $this->container['token']; + } + + /** + * Sets token + * + * @param string|null $token token + * + * @return self + */ + public function setToken($token) + { + if (is_null($token)) { + throw new \InvalidArgumentException('non-nullable token cannot be null'); + } + $this->container['token'] = $token; + + return $this; + } + + /** + * Gets link + * + * @return string|null + */ + public function getLink() + { + return $this->container['link']; + } + + /** + * Sets link + * + * @param string|null $link link + * + * @return self + */ + public function setLink($link) + { + if (is_null($link)) { + throw new \InvalidArgumentException('non-nullable link cannot be null'); + } + $this->container['link'] = $link; + + return $this; + } + + /** + * Gets dtable + * + * @return string|null + */ + public function getDtable() + { + return $this->container['dtable']; + } + + /** + * Sets dtable + * + * @param string|null $dtable dtable + * + * @return self + */ + public function setDtable($dtable) + { + if (is_null($dtable)) { + throw new \InvalidArgumentException('non-nullable dtable cannot be null'); + } + $this->container['dtable'] = $dtable; + + return $this; + } + + /** + * Gets dtable_id + * + * @return int|null + */ + public function getDtableId() + { + return $this->container['dtable_id']; + } + + /** + * Sets dtable_id + * + * @param int|null $dtable_id dtable_id + * + * @return self + */ + public function setDtableId($dtable_id) + { + if (is_null($dtable_id)) { + throw new \InvalidArgumentException('non-nullable dtable_id cannot be null'); + } + $this->container['dtable_id'] = $dtable_id; + + return $this; + } + + /** + * Gets workspace_id + * + * @return int|null + */ + public function getWorkspaceId() + { + return $this->container['workspace_id']; + } + + /** + * Sets workspace_id + * + * @param int|null $workspace_id workspace_id + * + * @return self + */ + public function setWorkspaceId($workspace_id) + { + if (is_null($workspace_id)) { + throw new \InvalidArgumentException('non-nullable workspace_id cannot be null'); + } + $this->container['workspace_id'] = $workspace_id; + + return $this; + } + + /** + * Gets expire_date + * + * @return string|null + */ + public function getExpireDate() + { + return $this->container['expire_date']; + } + + /** + * Sets expire_date + * + * @param string|null $expire_date expire_date + * + * @return self + */ + public function setExpireDate($expire_date) + { + if (is_null($expire_date)) { + throw new \InvalidArgumentException('non-nullable expire_date cannot be null'); + } + $this->container['expire_date'] = $expire_date; + + return $this; + } + + /** + * Gets ctime + * + * @return string|null + */ + public function getCtime() + { + return $this->container['ctime']; + } + + /** + * Sets ctime + * + * @param string|null $ctime ctime + * + * @return self + */ + public function setCtime($ctime) + { + if (is_null($ctime)) { + throw new \InvalidArgumentException('non-nullable ctime cannot be null'); + } + $this->container['ctime'] = $ctime; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/TeamAdmin/UpdateInviteLinkRequest.php b/lib/TeamAdmin/UpdateInviteLinkRequest.php index ee37bf6d..b0a7e7fb 100644 --- a/lib/TeamAdmin/UpdateInviteLinkRequest.php +++ b/lib/TeamAdmin/UpdateInviteLinkRequest.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -385,11 +385,11 @@ public function setExpireDays($expire_days) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -397,12 +397,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -427,11 +427,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/TeamAdmin/UpdateUser200Response.php b/lib/TeamAdmin/UpdateUser200Response.php new file mode 100644 index 00000000..f9b953f8 --- /dev/null +++ b/lib/TeamAdmin/UpdateUser200Response.php @@ -0,0 +1,782 @@ + + */ +class UpdateUser200Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'updateUser_200_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'email' => 'string', + 'name' => 'string', + 'contact_email' => 'string', + 'quota_usage' => 'int', + 'quota_total' => 'int', + 'is_active' => 'bool', + 'id' => 'int', + 'ctime' => 'string', + 'id_in_org' => 'string', + 'last_login' => 'string', + 'self_usage' => 'int', + 'quota' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'email' => null, + 'name' => null, + 'contact_email' => null, + 'quota_usage' => null, + 'quota_total' => null, + 'is_active' => null, + 'id' => null, + 'ctime' => null, + 'id_in_org' => null, + 'last_login' => null, + 'self_usage' => null, + 'quota' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'email' => false, + 'name' => false, + 'contact_email' => false, + 'quota_usage' => false, + 'quota_total' => false, + 'is_active' => false, + 'id' => false, + 'ctime' => false, + 'id_in_org' => false, + 'last_login' => false, + 'self_usage' => false, + 'quota' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'email' => 'email', + 'name' => 'name', + 'contact_email' => 'contact_email', + 'quota_usage' => 'quota_usage', + 'quota_total' => 'quota_total', + 'is_active' => 'is_active', + 'id' => 'id', + 'ctime' => 'ctime', + 'id_in_org' => 'id_in_org', + 'last_login' => 'last_login', + 'self_usage' => 'self_usage', + 'quota' => 'quota' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'email' => 'setEmail', + 'name' => 'setName', + 'contact_email' => 'setContactEmail', + 'quota_usage' => 'setQuotaUsage', + 'quota_total' => 'setQuotaTotal', + 'is_active' => 'setIsActive', + 'id' => 'setId', + 'ctime' => 'setCtime', + 'id_in_org' => 'setIdInOrg', + 'last_login' => 'setLastLogin', + 'self_usage' => 'setSelfUsage', + 'quota' => 'setQuota' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'email' => 'getEmail', + 'name' => 'getName', + 'contact_email' => 'getContactEmail', + 'quota_usage' => 'getQuotaUsage', + 'quota_total' => 'getQuotaTotal', + 'is_active' => 'getIsActive', + 'id' => 'getId', + 'ctime' => 'getCtime', + 'id_in_org' => 'getIdInOrg', + 'last_login' => 'getLastLogin', + 'self_usage' => 'getSelfUsage', + 'quota' => 'getQuota' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('email', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('contact_email', $data ?? [], null); + $this->setIfExists('quota_usage', $data ?? [], null); + $this->setIfExists('quota_total', $data ?? [], null); + $this->setIfExists('is_active', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('ctime', $data ?? [], null); + $this->setIfExists('id_in_org', $data ?? [], null); + $this->setIfExists('last_login', $data ?? [], null); + $this->setIfExists('self_usage', $data ?? [], null); + $this->setIfExists('quota', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets email + * + * @return string|null + */ + public function getEmail() + { + return $this->container['email']; + } + + /** + * Sets email + * + * @param string|null $email email + * + * @return self + */ + public function setEmail($email) + { + if (is_null($email)) { + throw new \InvalidArgumentException('non-nullable email cannot be null'); + } + $this->container['email'] = $email; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name name + * + * @return self + */ + public function setName($name) + { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets contact_email + * + * @return string|null + */ + public function getContactEmail() + { + return $this->container['contact_email']; + } + + /** + * Sets contact_email + * + * @param string|null $contact_email contact_email + * + * @return self + */ + public function setContactEmail($contact_email) + { + if (is_null($contact_email)) { + throw new \InvalidArgumentException('non-nullable contact_email cannot be null'); + } + $this->container['contact_email'] = $contact_email; + + return $this; + } + + /** + * Gets quota_usage + * + * @return int|null + */ + public function getQuotaUsage() + { + return $this->container['quota_usage']; + } + + /** + * Sets quota_usage + * + * @param int|null $quota_usage quota_usage + * + * @return self + */ + public function setQuotaUsage($quota_usage) + { + if (is_null($quota_usage)) { + throw new \InvalidArgumentException('non-nullable quota_usage cannot be null'); + } + $this->container['quota_usage'] = $quota_usage; + + return $this; + } + + /** + * Gets quota_total + * + * @return int|null + */ + public function getQuotaTotal() + { + return $this->container['quota_total']; + } + + /** + * Sets quota_total + * + * @param int|null $quota_total quota_total + * + * @return self + */ + public function setQuotaTotal($quota_total) + { + if (is_null($quota_total)) { + throw new \InvalidArgumentException('non-nullable quota_total cannot be null'); + } + $this->container['quota_total'] = $quota_total; + + return $this; + } + + /** + * Gets is_active + * + * @return bool|null + */ + public function getIsActive() + { + return $this->container['is_active']; + } + + /** + * Sets is_active + * + * @param bool|null $is_active is_active + * + * @return self + */ + public function setIsActive($is_active) + { + if (is_null($is_active)) { + throw new \InvalidArgumentException('non-nullable is_active cannot be null'); + } + $this->container['is_active'] = $is_active; + + return $this; + } + + /** + * Gets id + * + * @return int|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int|null $id id + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets ctime + * + * @return string|null + */ + public function getCtime() + { + return $this->container['ctime']; + } + + /** + * Sets ctime + * + * @param string|null $ctime ctime + * + * @return self + */ + public function setCtime($ctime) + { + if (is_null($ctime)) { + throw new \InvalidArgumentException('non-nullable ctime cannot be null'); + } + $this->container['ctime'] = $ctime; + + return $this; + } + + /** + * Gets id_in_org + * + * @return string|null + */ + public function getIdInOrg() + { + return $this->container['id_in_org']; + } + + /** + * Sets id_in_org + * + * @param string|null $id_in_org id_in_org + * + * @return self + */ + public function setIdInOrg($id_in_org) + { + if (is_null($id_in_org)) { + throw new \InvalidArgumentException('non-nullable id_in_org cannot be null'); + } + $this->container['id_in_org'] = $id_in_org; + + return $this; + } + + /** + * Gets last_login + * + * @return string|null + */ + public function getLastLogin() + { + return $this->container['last_login']; + } + + /** + * Sets last_login + * + * @param string|null $last_login last_login + * + * @return self + */ + public function setLastLogin($last_login) + { + if (is_null($last_login)) { + throw new \InvalidArgumentException('non-nullable last_login cannot be null'); + } + $this->container['last_login'] = $last_login; + + return $this; + } + + /** + * Gets self_usage + * + * @return int|null + */ + public function getSelfUsage() + { + return $this->container['self_usage']; + } + + /** + * Sets self_usage + * + * @param int|null $self_usage self_usage + * + * @return self + */ + public function setSelfUsage($self_usage) + { + if (is_null($self_usage)) { + throw new \InvalidArgumentException('non-nullable self_usage cannot be null'); + } + $this->container['self_usage'] = $self_usage; + + return $this; + } + + /** + * Gets quota + * + * @return int|null + */ + public function getQuota() + { + return $this->container['quota']; + } + + /** + * Sets quota + * + * @param int|null $quota quota + * + * @return self + */ + public function setQuota($quota) + { + if (is_null($quota)) { + throw new \InvalidArgumentException('non-nullable quota cannot be null'); + } + $this->container['quota'] = $quota; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/TeamAdmin/UsersApi.php b/lib/TeamAdmin/UsersApi.php index a900748d..0be291c8 100644 --- a/lib/TeamAdmin/UsersApi.php +++ b/lib/TeamAdmin/UsersApi.php @@ -14,7 +14,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -159,7 +159,7 @@ public function getConfig() * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return object + * @return \SeaTable\Client\TeamAdmin\AddUser200Response */ public function addUser($org_id, $email = null, $name = null, $password = null, $with_workspace = null, string $contentType = self::contentTypes['addUser'][0]) { @@ -181,7 +181,7 @@ public function addUser($org_id, $email = null, $name = null, $password = null, * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) + * @return array of \SeaTable\Client\TeamAdmin\AddUser200Response, HTTP status code, HTTP response headers (array of strings) */ public function addUserWithHttpInfo($org_id, $email = null, $name = null, $password = null, $with_workspace = null, string $contentType = self::contentTypes['addUser'][0]) { @@ -213,7 +213,7 @@ public function addUserWithHttpInfo($org_id, $email = null, $name = null, $passw switch($statusCode) { case 200: return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\TeamAdmin\AddUser200Response', $request, $response, ); @@ -235,7 +235,7 @@ public function addUserWithHttpInfo($org_id, $email = null, $name = null, $passw } return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\TeamAdmin\AddUser200Response', $request, $response, ); @@ -244,7 +244,7 @@ public function addUserWithHttpInfo($org_id, $email = null, $name = null, $passw case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - 'object', + '\SeaTable\Client\TeamAdmin\AddUser200Response', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -298,7 +298,7 @@ function ($response) { */ public function addUserAsyncWithHttpInfo($org_id, $email = null, $name = null, $password = null, $with_workspace = null, string $contentType = self::contentTypes['addUser'][0]) { - $returnType = 'object'; + $returnType = '\SeaTable\Client\TeamAdmin\AddUser200Response'; $request = $this->addUserRequest($org_id, $email, $name, $password, $with_workspace, $contentType); return $this->client @@ -1375,7 +1375,7 @@ public function enforceTwofactorRequest($org_id, $user_id, $enforce_twofactor_re * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return object + * @return \SeaTable\Client\TeamAdmin\GetUser200Response */ public function getUser($org_id, $user_id, string $contentType = self::contentTypes['getUser'][0]) { @@ -1394,7 +1394,7 @@ public function getUser($org_id, $user_id, string $contentType = self::contentTy * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) + * @return array of \SeaTable\Client\TeamAdmin\GetUser200Response, HTTP status code, HTTP response headers (array of strings) */ public function getUserWithHttpInfo($org_id, $user_id, string $contentType = self::contentTypes['getUser'][0]) { @@ -1426,7 +1426,7 @@ public function getUserWithHttpInfo($org_id, $user_id, string $contentType = sel switch($statusCode) { case 200: return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\TeamAdmin\GetUser200Response', $request, $response, ); @@ -1448,7 +1448,7 @@ public function getUserWithHttpInfo($org_id, $user_id, string $contentType = sel } return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\TeamAdmin\GetUser200Response', $request, $response, ); @@ -1457,7 +1457,7 @@ public function getUserWithHttpInfo($org_id, $user_id, string $contentType = sel case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - 'object', + '\SeaTable\Client\TeamAdmin\GetUser200Response', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1505,7 +1505,7 @@ function ($response) { */ public function getUserAsyncWithHttpInfo($org_id, $user_id, string $contentType = self::contentTypes['getUser'][0]) { - $returnType = 'object'; + $returnType = '\SeaTable\Client\TeamAdmin\GetUser200Response'; $request = $this->getUserRequest($org_id, $user_id, $contentType); return $this->client @@ -2288,7 +2288,7 @@ public function resetUserPasswordRequest($org_id, $user_id, string $contentType * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return object + * @return \SeaTable\Client\TeamAdmin\UpdateUser200Response */ public function updateUser($org_id, $user_id, $name = null, $contact_email = null, $is_staff = null, $is_active = null, $quota_total = null, $id_in_org = null, string $contentType = self::contentTypes['updateUser'][0]) { @@ -2313,7 +2313,7 @@ public function updateUser($org_id, $user_id, $name = null, $contact_email = nul * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) + * @return array of \SeaTable\Client\TeamAdmin\UpdateUser200Response, HTTP status code, HTTP response headers (array of strings) */ public function updateUserWithHttpInfo($org_id, $user_id, $name = null, $contact_email = null, $is_staff = null, $is_active = null, $quota_total = null, $id_in_org = null, string $contentType = self::contentTypes['updateUser'][0]) { @@ -2345,7 +2345,7 @@ public function updateUserWithHttpInfo($org_id, $user_id, $name = null, $contact switch($statusCode) { case 200: return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\TeamAdmin\UpdateUser200Response', $request, $response, ); @@ -2367,7 +2367,7 @@ public function updateUserWithHttpInfo($org_id, $user_id, $name = null, $contact } return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\TeamAdmin\UpdateUser200Response', $request, $response, ); @@ -2376,7 +2376,7 @@ public function updateUserWithHttpInfo($org_id, $user_id, $name = null, $contact case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - 'object', + '\SeaTable\Client\TeamAdmin\UpdateUser200Response', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2436,7 +2436,7 @@ function ($response) { */ public function updateUserAsyncWithHttpInfo($org_id, $user_id, $name = null, $contact_email = null, $is_staff = null, $is_active = null, $quota_total = null, $id_in_org = null, string $contentType = self::contentTypes['updateUser'][0]) { - $returnType = 'object'; + $returnType = '\SeaTable\Client\TeamAdmin\UpdateUser200Response'; $request = $this->updateUserRequest($org_id, $user_id, $name, $contact_email, $is_staff, $is_active, $quota_total, $id_in_org, $contentType); return $this->client @@ -2636,6 +2636,14 @@ protected function createHttpClientOption() } } + if ($this->config->getCertFile()) { + $options[RequestOptions::CERT] = $this->config->getCertFile(); + } + + if ($this->config->getKeyFile()) { + $options[RequestOptions::SSL_KEY] = $this->config->getKeyFile(); + } + return $options; } diff --git a/lib/User/Action.php b/lib/User/Action.php index 4b854f84..60f10bfc 100644 --- a/lib/User/Action.php +++ b/lib/User/Action.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -351,11 +351,11 @@ public function setUsers($users) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -363,12 +363,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -393,11 +393,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/ActionAddRecord.php b/lib/User/ActionAddRecord.php index e865a402..c62fe1df 100644 --- a/lib/User/ActionAddRecord.php +++ b/lib/User/ActionAddRecord.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -417,11 +417,11 @@ public function setId($_id) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -429,12 +429,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -459,11 +459,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/ActionAddRecordToOtherTable.php b/lib/User/ActionAddRecordToOtherTable.php index 5a6c17eb..0200c8a7 100644 --- a/lib/User/ActionAddRecordToOtherTable.php +++ b/lib/User/ActionAddRecordToOtherTable.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -451,11 +451,11 @@ public function setRow($row) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -463,12 +463,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -493,11 +493,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/ActionAddRecordToOtherTableRow.php b/lib/User/ActionAddRecordToOtherTableRow.php index 071b2c97..4a04b8dc 100644 --- a/lib/User/ActionAddRecordToOtherTableRow.php +++ b/lib/User/ActionAddRecordToOtherTableRow.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -289,11 +289,11 @@ public function valid() /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -301,12 +301,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -331,11 +331,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/ActionCalculateAccumulatedValue.php b/lib/User/ActionCalculateAccumulatedValue.php index c9a4b210..73b87490 100644 --- a/lib/User/ActionCalculateAccumulatedValue.php +++ b/lib/User/ActionCalculateAccumulatedValue.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -451,11 +451,11 @@ public function setCalculateColumn($calculate_column) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -463,12 +463,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -493,11 +493,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/ActionCalculateDelta.php b/lib/User/ActionCalculateDelta.php index 64d129fc..d0ec2c60 100644 --- a/lib/User/ActionCalculateDelta.php +++ b/lib/User/ActionCalculateDelta.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -451,11 +451,11 @@ public function setCalculateColumn($calculate_column) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -463,12 +463,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -493,11 +493,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/ActionCalculatePercentage.php b/lib/User/ActionCalculatePercentage.php index fc41d827..ffb3041c 100644 --- a/lib/User/ActionCalculatePercentage.php +++ b/lib/User/ActionCalculatePercentage.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -451,11 +451,11 @@ public function setCalculateColumn($calculate_column) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -463,12 +463,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -493,11 +493,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/ActionCalculateRank.php b/lib/User/ActionCalculateRank.php index b3965f01..8a529f0e 100644 --- a/lib/User/ActionCalculateRank.php +++ b/lib/User/ActionCalculateRank.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -451,11 +451,11 @@ public function setCalculateColumn($calculate_column) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -463,12 +463,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -493,11 +493,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/ActionExtractUserName.php b/lib/User/ActionExtractUserName.php index b6701181..1b613417 100644 --- a/lib/User/ActionExtractUserName.php +++ b/lib/User/ActionExtractUserName.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -451,11 +451,11 @@ public function setResultColumnKey($result_column_key) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -463,12 +463,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -493,11 +493,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/ActionLinkRecord.php b/lib/User/ActionLinkRecord.php index c36f9de6..add9b1f8 100644 --- a/lib/User/ActionLinkRecord.php +++ b/lib/User/ActionLinkRecord.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -485,11 +485,11 @@ public function setMatchConditions($match_conditions) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -497,12 +497,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -527,11 +527,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/ActionLinkRecordMatchConditionsInner.php b/lib/User/ActionLinkRecordMatchConditionsInner.php index 55ceac0c..a73240db 100644 --- a/lib/User/ActionLinkRecordMatchConditionsInner.php +++ b/lib/User/ActionLinkRecordMatchConditionsInner.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -351,11 +351,11 @@ public function setOtherColumnKey($other_column_key) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -363,12 +363,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -393,11 +393,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/ActionLockRecord.php b/lib/User/ActionLockRecord.php index b80c6f61..f3d88206 100644 --- a/lib/User/ActionLockRecord.php +++ b/lib/User/ActionLockRecord.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -449,11 +449,11 @@ public function setId($_id) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -461,12 +461,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -491,11 +491,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/ActionLookupAndCopy.php b/lib/User/ActionLookupAndCopy.php index c2814cdf..4c503a78 100644 --- a/lib/User/ActionLookupAndCopy.php +++ b/lib/User/ActionLookupAndCopy.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -485,11 +485,11 @@ public function setFillColumnConditions($fill_column_conditions) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -497,12 +497,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -527,11 +527,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/ActionLookupAndCopyEqualColumnConditionsInner.php b/lib/User/ActionLookupAndCopyEqualColumnConditionsInner.php index d9c40d00..3c5e937b 100644 --- a/lib/User/ActionLookupAndCopyEqualColumnConditionsInner.php +++ b/lib/User/ActionLookupAndCopyEqualColumnConditionsInner.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -351,11 +351,11 @@ public function setCopyToColumnKey($copy_to_column_key) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -363,12 +363,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -393,11 +393,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/ActionLookupAndCopyTableCondition.php b/lib/User/ActionLookupAndCopyTableCondition.php index 1b89fc14..46292d9e 100644 --- a/lib/User/ActionLookupAndCopyTableCondition.php +++ b/lib/User/ActionLookupAndCopyTableCondition.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -351,11 +351,11 @@ public function setCopyToTableId($copy_to_table_id) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -363,12 +363,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -393,11 +393,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/ActionNotify.php b/lib/User/ActionNotify.php index 2790f3bc..d882c94e 100644 --- a/lib/User/ActionNotify.php +++ b/lib/User/ActionNotify.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -485,11 +485,11 @@ public function setUsersColumnKey($users_column_key) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -497,12 +497,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -527,11 +527,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/ActionRecordsMeetSpecificConditionsAfterModificationInner.php b/lib/User/ActionRecordsMeetSpecificConditionsAfterModificationInner.php index efe27b5c..195b9146 100644 --- a/lib/User/ActionRecordsMeetSpecificConditionsAfterModificationInner.php +++ b/lib/User/ActionRecordsMeetSpecificConditionsAfterModificationInner.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -1075,11 +1075,11 @@ public function setRepoId($repo_id) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -1087,12 +1087,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -1117,11 +1117,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/ActionRunPeriodicallyInner.php b/lib/User/ActionRunPeriodicallyInner.php index 96535003..fa9be065 100644 --- a/lib/User/ActionRunPeriodicallyInner.php +++ b/lib/User/ActionRunPeriodicallyInner.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -1185,11 +1185,11 @@ public function setFillColumnConditions($fill_column_conditions) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -1197,12 +1197,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -1227,11 +1227,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/ActionRunPeriodicallyOnRecordsInner.php b/lib/User/ActionRunPeriodicallyOnRecordsInner.php index 389fed13..7d027349 100644 --- a/lib/User/ActionRunPeriodicallyOnRecordsInner.php +++ b/lib/User/ActionRunPeriodicallyOnRecordsInner.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -691,11 +691,11 @@ public function setIsLocked($is_locked) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -703,12 +703,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -733,11 +733,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/ActionRunPythonScript.php b/lib/User/ActionRunPythonScript.php index 27bb8d6d..1363c65b 100644 --- a/lib/User/ActionRunPythonScript.php +++ b/lib/User/ActionRunPythonScript.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -553,11 +553,11 @@ public function setRepoId($repo_id) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -565,12 +565,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -595,11 +595,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/ActionSendEmail.php b/lib/User/ActionSendEmail.php index a3d08e0a..2d4b0213 100644 --- a/lib/User/ActionSendEmail.php +++ b/lib/User/ActionSendEmail.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -553,11 +553,11 @@ public function setId($_id) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -565,12 +565,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -595,11 +595,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/ActionUpdateRecord.php b/lib/User/ActionUpdateRecord.php index e839ead9..6307ba7b 100644 --- a/lib/User/ActionUpdateRecord.php +++ b/lib/User/ActionUpdateRecord.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -417,11 +417,11 @@ public function setId($_id) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -429,12 +429,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -459,11 +459,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/ActivitiesLogsApi.php b/lib/User/ActivitiesLogsApi.php index 197fe006..2a19db93 100644 --- a/lib/User/ActivitiesLogsApi.php +++ b/lib/User/ActivitiesLogsApi.php @@ -14,7 +14,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -135,9 +135,9 @@ public function getConfig() * * Get Base Activities * - * @param int|null $page page (optional) - * @param int|null $per_page per_page (optional) - * @param string|null $to_tz to_tz (optional) + * @param int|null $page Page number of results to return. Default is 1. (optional) + * @param int|null $per_page Number of results per page. (optional) + * @param string|null $to_tz Timezone offset for date/time conversion. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getBaseActivities'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -155,9 +155,9 @@ public function getBaseActivities($page = null, $per_page = null, $to_tz = null, * * Get Base Activities * - * @param int|null $page (optional) - * @param int|null $per_page (optional) - * @param string|null $to_tz (optional) + * @param int|null $page Page number of results to return. Default is 1. (optional) + * @param int|null $per_page Number of results per page. (optional) + * @param string|null $to_tz Timezone offset for date/time conversion. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getBaseActivities'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -242,9 +242,9 @@ public function getBaseActivitiesWithHttpInfo($page = null, $per_page = null, $t * * Get Base Activities * - * @param int|null $page (optional) - * @param int|null $per_page (optional) - * @param string|null $to_tz (optional) + * @param int|null $page Page number of results to return. Default is 1. (optional) + * @param int|null $per_page Number of results per page. (optional) + * @param string|null $to_tz Timezone offset for date/time conversion. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getBaseActivities'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -265,9 +265,9 @@ function ($response) { * * Get Base Activities * - * @param int|null $page (optional) - * @param int|null $per_page (optional) - * @param string|null $to_tz (optional) + * @param int|null $page Page number of results to return. Default is 1. (optional) + * @param int|null $per_page Number of results per page. (optional) + * @param string|null $to_tz Timezone offset for date/time conversion. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getBaseActivities'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -317,9 +317,9 @@ function ($exception) { /** * Create request for operation 'getBaseActivities' * - * @param int|null $page (optional) - * @param int|null $per_page (optional) - * @param string|null $to_tz (optional) + * @param int|null $page Page number of results to return. Default is 1. (optional) + * @param int|null $per_page Number of results per page. (optional) + * @param string|null $to_tz Timezone offset for date/time conversion. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getBaseActivities'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -442,9 +442,9 @@ public function getBaseActivitiesRequest($page = null, $per_page = null, $to_tz * Get Base Activity Details * * @param string $dtable_uuid The unique identifier of a base. Sometimes also called dtable_uuid. (required) - * @param string $op_date op_date (required) - * @param int|null $page page (optional) - * @param int|null $per_page per_page (optional) + * @param string $op_date Filter by operation date. (required) + * @param int|null $page Page number of results to return. Default is 1. (optional) + * @param int|null $per_page Number of results per page. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getBaseActivityDetails'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -463,9 +463,9 @@ public function getBaseActivityDetails($dtable_uuid, $op_date, $page = null, $pe * Get Base Activity Details * * @param string $dtable_uuid The unique identifier of a base. Sometimes also called dtable_uuid. (required) - * @param string $op_date (required) - * @param int|null $page (optional) - * @param int|null $per_page (optional) + * @param string $op_date Filter by operation date. (required) + * @param int|null $page Page number of results to return. Default is 1. (optional) + * @param int|null $per_page Number of results per page. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getBaseActivityDetails'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -551,9 +551,9 @@ public function getBaseActivityDetailsWithHttpInfo($dtable_uuid, $op_date, $page * Get Base Activity Details * * @param string $dtable_uuid The unique identifier of a base. Sometimes also called dtable_uuid. (required) - * @param string $op_date (required) - * @param int|null $page (optional) - * @param int|null $per_page (optional) + * @param string $op_date Filter by operation date. (required) + * @param int|null $page Page number of results to return. Default is 1. (optional) + * @param int|null $per_page Number of results per page. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getBaseActivityDetails'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -575,9 +575,9 @@ function ($response) { * Get Base Activity Details * * @param string $dtable_uuid The unique identifier of a base. Sometimes also called dtable_uuid. (required) - * @param string $op_date (required) - * @param int|null $page (optional) - * @param int|null $per_page (optional) + * @param string $op_date Filter by operation date. (required) + * @param int|null $page Page number of results to return. Default is 1. (optional) + * @param int|null $per_page Number of results per page. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getBaseActivityDetails'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -628,9 +628,9 @@ function ($exception) { * Create request for operation 'getBaseActivityDetails' * * @param string $dtable_uuid The unique identifier of a base. Sometimes also called dtable_uuid. (required) - * @param string $op_date (required) - * @param int|null $page (optional) - * @param int|null $per_page (optional) + * @param string $op_date Filter by operation date. (required) + * @param int|null $page Page number of results to return. Default is 1. (optional) + * @param int|null $per_page Number of results per page. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getBaseActivityDetails'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -778,8 +778,8 @@ public function getBaseActivityDetailsRequest($dtable_uuid, $op_date, $page = nu * Get Big Data Operation Logs * * @param string $base_uuid The unique identifier of a base. Sometimes also called dtable_uuid. (required) - * @param int|null $page page (optional) - * @param int|null $per_page per_page (optional) + * @param int|null $page Page number of results to return. Default is 1. (optional) + * @param int|null $per_page Number of results per page. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getBigDataOperationLogs'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -798,8 +798,8 @@ public function getBigDataOperationLogs($base_uuid, $page = null, $per_page = nu * Get Big Data Operation Logs * * @param string $base_uuid The unique identifier of a base. Sometimes also called dtable_uuid. (required) - * @param int|null $page (optional) - * @param int|null $per_page (optional) + * @param int|null $page Page number of results to return. Default is 1. (optional) + * @param int|null $per_page Number of results per page. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getBigDataOperationLogs'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -885,8 +885,8 @@ public function getBigDataOperationLogsWithHttpInfo($base_uuid, $page = null, $p * Get Big Data Operation Logs * * @param string $base_uuid The unique identifier of a base. Sometimes also called dtable_uuid. (required) - * @param int|null $page (optional) - * @param int|null $per_page (optional) + * @param int|null $page Page number of results to return. Default is 1. (optional) + * @param int|null $per_page Number of results per page. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getBigDataOperationLogs'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -908,8 +908,8 @@ function ($response) { * Get Big Data Operation Logs * * @param string $base_uuid The unique identifier of a base. Sometimes also called dtable_uuid. (required) - * @param int|null $page (optional) - * @param int|null $per_page (optional) + * @param int|null $page Page number of results to return. Default is 1. (optional) + * @param int|null $per_page Number of results per page. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getBigDataOperationLogs'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -960,8 +960,8 @@ function ($exception) { * Create request for operation 'getBigDataOperationLogs' * * @param string $base_uuid The unique identifier of a base. Sometimes also called dtable_uuid. (required) - * @param int|null $page (optional) - * @param int|null $per_page (optional) + * @param int|null $page Page number of results to return. Default is 1. (optional) + * @param int|null $per_page Number of results per page. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getBigDataOperationLogs'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1099,6 +1099,14 @@ protected function createHttpClientOption() } } + if ($this->config->getCertFile()) { + $options[RequestOptions::CERT] = $this->config->getCertFile(); + } + + if ($this->config->getKeyFile()) { + $options[RequestOptions::SSL_KEY] = $this->config->getKeyFile(); + } + return $options; } diff --git a/lib/User/AddEmailAccountRequest.php b/lib/User/AddEmailAccountRequest.php index d2afba0e..a1f4abbb 100644 --- a/lib/User/AddEmailAccountRequest.php +++ b/lib/User/AddEmailAccountRequest.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -385,11 +385,11 @@ public function setDetail($detail) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -397,12 +397,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -427,11 +427,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/AddGroupMember201Response.php b/lib/User/AddGroupMember201Response.php new file mode 100644 index 00000000..f3d0b967 --- /dev/null +++ b/lib/User/AddGroupMember201Response.php @@ -0,0 +1,612 @@ + + */ +class AddGroupMember201Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'addGroupMember_201_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'group_id' => 'int', + 'name' => 'string', + 'email' => 'string', + 'contact_email' => 'string', + 'login_id' => 'string', + 'is_admin' => 'bool', + 'role' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'group_id' => null, + 'name' => null, + 'email' => null, + 'contact_email' => null, + 'login_id' => null, + 'is_admin' => null, + 'role' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'group_id' => false, + 'name' => false, + 'email' => false, + 'contact_email' => false, + 'login_id' => false, + 'is_admin' => false, + 'role' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'group_id' => 'group_id', + 'name' => 'name', + 'email' => 'email', + 'contact_email' => 'contact_email', + 'login_id' => 'login_id', + 'is_admin' => 'is_admin', + 'role' => 'role' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'group_id' => 'setGroupId', + 'name' => 'setName', + 'email' => 'setEmail', + 'contact_email' => 'setContactEmail', + 'login_id' => 'setLoginId', + 'is_admin' => 'setIsAdmin', + 'role' => 'setRole' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'group_id' => 'getGroupId', + 'name' => 'getName', + 'email' => 'getEmail', + 'contact_email' => 'getContactEmail', + 'login_id' => 'getLoginId', + 'is_admin' => 'getIsAdmin', + 'role' => 'getRole' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('group_id', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('email', $data ?? [], null); + $this->setIfExists('contact_email', $data ?? [], null); + $this->setIfExists('login_id', $data ?? [], null); + $this->setIfExists('is_admin', $data ?? [], null); + $this->setIfExists('role', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets group_id + * + * @return int|null + */ + public function getGroupId() + { + return $this->container['group_id']; + } + + /** + * Sets group_id + * + * @param int|null $group_id group_id + * + * @return self + */ + public function setGroupId($group_id) + { + if (is_null($group_id)) { + throw new \InvalidArgumentException('non-nullable group_id cannot be null'); + } + $this->container['group_id'] = $group_id; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name name + * + * @return self + */ + public function setName($name) + { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets email + * + * @return string|null + */ + public function getEmail() + { + return $this->container['email']; + } + + /** + * Sets email + * + * @param string|null $email email + * + * @return self + */ + public function setEmail($email) + { + if (is_null($email)) { + throw new \InvalidArgumentException('non-nullable email cannot be null'); + } + $this->container['email'] = $email; + + return $this; + } + + /** + * Gets contact_email + * + * @return string|null + */ + public function getContactEmail() + { + return $this->container['contact_email']; + } + + /** + * Sets contact_email + * + * @param string|null $contact_email contact_email + * + * @return self + */ + public function setContactEmail($contact_email) + { + if (is_null($contact_email)) { + throw new \InvalidArgumentException('non-nullable contact_email cannot be null'); + } + $this->container['contact_email'] = $contact_email; + + return $this; + } + + /** + * Gets login_id + * + * @return string|null + */ + public function getLoginId() + { + return $this->container['login_id']; + } + + /** + * Sets login_id + * + * @param string|null $login_id login_id + * + * @return self + */ + public function setLoginId($login_id) + { + if (is_null($login_id)) { + throw new \InvalidArgumentException('non-nullable login_id cannot be null'); + } + $this->container['login_id'] = $login_id; + + return $this; + } + + /** + * Gets is_admin + * + * @return bool|null + */ + public function getIsAdmin() + { + return $this->container['is_admin']; + } + + /** + * Sets is_admin + * + * @param bool|null $is_admin is_admin + * + * @return self + */ + public function setIsAdmin($is_admin) + { + if (is_null($is_admin)) { + throw new \InvalidArgumentException('non-nullable is_admin cannot be null'); + } + $this->container['is_admin'] = $is_admin; + + return $this; + } + + /** + * Gets role + * + * @return string|null + */ + public function getRole() + { + return $this->container['role']; + } + + /** + * Sets role + * + * @param string|null $role role + * + * @return self + */ + public function setRole($role) + { + if (is_null($role)) { + throw new \InvalidArgumentException('non-nullable role cannot be null'); + } + $this->container['role'] = $role; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/User/AddGroupMemberRequest.php b/lib/User/AddGroupMemberRequest.php index 72824798..93d9cdad 100644 --- a/lib/User/AddGroupMemberRequest.php +++ b/lib/User/AddGroupMemberRequest.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -317,11 +317,11 @@ public function setEmail($email) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -329,12 +329,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -359,11 +359,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/AddNotificationRule200Response.php b/lib/User/AddNotificationRule200Response.php new file mode 100644 index 00000000..33bad787 --- /dev/null +++ b/lib/User/AddNotificationRule200Response.php @@ -0,0 +1,612 @@ + + */ +class AddNotificationRule200Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'addNotificationRule_200_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'id' => 'int', + 'run_condition' => 'string', + 'trigger' => 'object', + 'action' => 'object', + 'creator' => 'string', + 'ctime' => 'string', + 'last_trigger_time' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'id' => null, + 'run_condition' => null, + 'trigger' => null, + 'action' => null, + 'creator' => null, + 'ctime' => null, + 'last_trigger_time' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'id' => false, + 'run_condition' => false, + 'trigger' => false, + 'action' => false, + 'creator' => false, + 'ctime' => false, + 'last_trigger_time' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'run_condition' => 'run_condition', + 'trigger' => 'trigger', + 'action' => 'action', + 'creator' => 'creator', + 'ctime' => 'ctime', + 'last_trigger_time' => 'last_trigger_time' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'run_condition' => 'setRunCondition', + 'trigger' => 'setTrigger', + 'action' => 'setAction', + 'creator' => 'setCreator', + 'ctime' => 'setCtime', + 'last_trigger_time' => 'setLastTriggerTime' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'run_condition' => 'getRunCondition', + 'trigger' => 'getTrigger', + 'action' => 'getAction', + 'creator' => 'getCreator', + 'ctime' => 'getCtime', + 'last_trigger_time' => 'getLastTriggerTime' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('run_condition', $data ?? [], null); + $this->setIfExists('trigger', $data ?? [], null); + $this->setIfExists('action', $data ?? [], null); + $this->setIfExists('creator', $data ?? [], null); + $this->setIfExists('ctime', $data ?? [], null); + $this->setIfExists('last_trigger_time', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return int|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int|null $id id + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets run_condition + * + * @return string|null + */ + public function getRunCondition() + { + return $this->container['run_condition']; + } + + /** + * Sets run_condition + * + * @param string|null $run_condition run_condition + * + * @return self + */ + public function setRunCondition($run_condition) + { + if (is_null($run_condition)) { + throw new \InvalidArgumentException('non-nullable run_condition cannot be null'); + } + $this->container['run_condition'] = $run_condition; + + return $this; + } + + /** + * Gets trigger + * + * @return object|null + */ + public function getTrigger() + { + return $this->container['trigger']; + } + + /** + * Sets trigger + * + * @param object|null $trigger trigger + * + * @return self + */ + public function setTrigger($trigger) + { + if (is_null($trigger)) { + throw new \InvalidArgumentException('non-nullable trigger cannot be null'); + } + $this->container['trigger'] = $trigger; + + return $this; + } + + /** + * Gets action + * + * @return object|null + */ + public function getAction() + { + return $this->container['action']; + } + + /** + * Sets action + * + * @param object|null $action action + * + * @return self + */ + public function setAction($action) + { + if (is_null($action)) { + throw new \InvalidArgumentException('non-nullable action cannot be null'); + } + $this->container['action'] = $action; + + return $this; + } + + /** + * Gets creator + * + * @return string|null + */ + public function getCreator() + { + return $this->container['creator']; + } + + /** + * Sets creator + * + * @param string|null $creator creator + * + * @return self + */ + public function setCreator($creator) + { + if (is_null($creator)) { + throw new \InvalidArgumentException('non-nullable creator cannot be null'); + } + $this->container['creator'] = $creator; + + return $this; + } + + /** + * Gets ctime + * + * @return string|null + */ + public function getCtime() + { + return $this->container['ctime']; + } + + /** + * Sets ctime + * + * @param string|null $ctime ctime + * + * @return self + */ + public function setCtime($ctime) + { + if (is_null($ctime)) { + throw new \InvalidArgumentException('non-nullable ctime cannot be null'); + } + $this->container['ctime'] = $ctime; + + return $this; + } + + /** + * Gets last_trigger_time + * + * @return string|null + */ + public function getLastTriggerTime() + { + return $this->container['last_trigger_time']; + } + + /** + * Sets last_trigger_time + * + * @param string|null $last_trigger_time last_trigger_time + * + * @return self + */ + public function setLastTriggerTime($last_trigger_time) + { + if (is_null($last_trigger_time)) { + throw new \InvalidArgumentException('non-nullable last_trigger_time cannot be null'); + } + $this->container['last_trigger_time'] = $last_trigger_time; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/User/AddNotificationRuleRequest.php b/lib/User/AddNotificationRuleRequest.php index 89027f7f..081adefb 100644 --- a/lib/User/AddNotificationRuleRequest.php +++ b/lib/User/AddNotificationRuleRequest.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -428,11 +428,11 @@ public function setAction($action) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -440,12 +440,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -470,11 +470,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/AddNotificationRuleRequestAction.php b/lib/User/AddNotificationRuleRequestAction.php index bfa0c7ee..680f6c9a 100644 --- a/lib/User/AddNotificationRuleRequestAction.php +++ b/lib/User/AddNotificationRuleRequestAction.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -454,11 +454,11 @@ public function setDefaultMsg($default_msg) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -466,12 +466,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -496,11 +496,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/AddNotificationRuleRequestTrigger.php b/lib/User/AddNotificationRuleRequestTrigger.php index 2331d833..050fb2fd 100644 --- a/lib/User/AddNotificationRuleRequestTrigger.php +++ b/lib/User/AddNotificationRuleRequestTrigger.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -769,11 +769,11 @@ public function setFilterConjunction($filter_conjunction) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -781,12 +781,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -811,11 +811,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/AddPassword.php b/lib/User/AddPassword.php index 8914c712..f945f2c2 100644 --- a/lib/User/AddPassword.php +++ b/lib/User/AddPassword.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -417,11 +417,11 @@ public function setPassword($password) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -429,12 +429,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -459,11 +459,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/AddRecordToOtherTableRowDate.php b/lib/User/AddRecordToOtherTableRowDate.php index 36f3b948..c3a0aa5d 100644 --- a/lib/User/AddRecordToOtherTableRowDate.php +++ b/lib/User/AddRecordToOtherTableRowDate.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -289,11 +289,11 @@ public function valid() /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -301,12 +301,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -331,11 +331,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/AddRecordToOtherTableRowDateTime.php b/lib/User/AddRecordToOtherTableRowDateTime.php index 3fa5409f..a67cc850 100644 --- a/lib/User/AddRecordToOtherTableRowDateTime.php +++ b/lib/User/AddRecordToOtherTableRowDateTime.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -289,11 +289,11 @@ public function valid() /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -301,12 +301,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -331,11 +331,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/AppsApi.php b/lib/User/AppsApi.php index 6b75ed2e..30741daa 100644 --- a/lib/User/AppsApi.php +++ b/lib/User/AppsApi.php @@ -14,7 +14,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -141,7 +141,7 @@ public function getConfig() * * Change App Status * - * @param string $app_token app_token (required) + * @param string $app_token The token of the universal app. (required) * @param \SeaTable\Client\User\IsInactive|null $is_inactive is_inactive (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['changeAppStatus'] to see the possible values for this operation * @@ -159,7 +159,7 @@ public function changeAppStatus($app_token, $is_inactive = null, string $content * * Change App Status * - * @param string $app_token (required) + * @param string $app_token The token of the universal app. (required) * @param \SeaTable\Client\User\IsInactive|null $is_inactive (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['changeAppStatus'] to see the possible values for this operation * @@ -209,7 +209,7 @@ public function changeAppStatusWithHttpInfo($app_token, $is_inactive = null, str * * Change App Status * - * @param string $app_token (required) + * @param string $app_token The token of the universal app. (required) * @param \SeaTable\Client\User\IsInactive|null $is_inactive (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['changeAppStatus'] to see the possible values for this operation * @@ -231,7 +231,7 @@ function ($response) { * * Change App Status * - * @param string $app_token (required) + * @param string $app_token The token of the universal app. (required) * @param \SeaTable\Client\User\IsInactive|null $is_inactive (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['changeAppStatus'] to see the possible values for this operation * @@ -269,7 +269,7 @@ function ($exception) { /** * Create request for operation 'changeAppStatus' * - * @param string $app_token (required) + * @param string $app_token The token of the universal app. (required) * @param \SeaTable\Client\User\IsInactive|null $is_inactive (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['changeAppStatus'] to see the possible values for this operation * @@ -379,7 +379,7 @@ public function changeAppStatusRequest($app_token, $is_inactive = null, string $ * * Import Users to App * - * @param string $app_token app_token (required) + * @param string $app_token The token of the universal app. (required) * @param \SeaTable\Client\User\ImportUsersToAppRequest|null $import_users_to_app_request import_users_to_app_request (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['importUsersToApp'] to see the possible values for this operation * @@ -397,7 +397,7 @@ public function importUsersToApp($app_token, $import_users_to_app_request = null * * Import Users to App * - * @param string $app_token (required) + * @param string $app_token The token of the universal app. (required) * @param \SeaTable\Client\User\ImportUsersToAppRequest|null $import_users_to_app_request (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['importUsersToApp'] to see the possible values for this operation * @@ -447,7 +447,7 @@ public function importUsersToAppWithHttpInfo($app_token, $import_users_to_app_re * * Import Users to App * - * @param string $app_token (required) + * @param string $app_token The token of the universal app. (required) * @param \SeaTable\Client\User\ImportUsersToAppRequest|null $import_users_to_app_request (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['importUsersToApp'] to see the possible values for this operation * @@ -469,7 +469,7 @@ function ($response) { * * Import Users to App * - * @param string $app_token (required) + * @param string $app_token The token of the universal app. (required) * @param \SeaTable\Client\User\ImportUsersToAppRequest|null $import_users_to_app_request (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['importUsersToApp'] to see the possible values for this operation * @@ -507,7 +507,7 @@ function ($exception) { /** * Create request for operation 'importUsersToApp' * - * @param string $app_token (required) + * @param string $app_token The token of the universal app. (required) * @param \SeaTable\Client\User\ImportUsersToAppRequest|null $import_users_to_app_request (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['importUsersToApp'] to see the possible values for this operation * @@ -617,7 +617,7 @@ public function importUsersToAppRequest($app_token, $import_users_to_app_request * * List App Invite Links * - * @param string $app_token app_token (required) + * @param string $app_token The token of the universal app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listAppInviteLinks'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -634,7 +634,7 @@ public function listAppInviteLinks($app_token, string $contentType = self::conte * * List App Invite Links * - * @param string $app_token (required) + * @param string $app_token The token of the universal app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listAppInviteLinks'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -683,7 +683,7 @@ public function listAppInviteLinksWithHttpInfo($app_token, string $contentType = * * List App Invite Links * - * @param string $app_token (required) + * @param string $app_token The token of the universal app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listAppInviteLinks'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -704,7 +704,7 @@ function ($response) { * * List App Invite Links * - * @param string $app_token (required) + * @param string $app_token The token of the universal app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listAppInviteLinks'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -741,7 +741,7 @@ function ($exception) { /** * Create request for operation 'listAppInviteLinks' * - * @param string $app_token (required) + * @param string $app_token The token of the universal app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listAppInviteLinks'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1094,7 +1094,7 @@ public function listAppsRequest(string $contentType = self::contentTypes['listAp * * List Universal App Users * - * @param string $app_token app_token (required) + * @param string $app_token The token of the universal app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listUniversalAppUsers'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -1111,7 +1111,7 @@ public function listUniversalAppUsers($app_token, string $contentType = self::co * * List Universal App Users * - * @param string $app_token (required) + * @param string $app_token The token of the universal app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listUniversalAppUsers'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -1160,7 +1160,7 @@ public function listUniversalAppUsersWithHttpInfo($app_token, string $contentTyp * * List Universal App Users * - * @param string $app_token (required) + * @param string $app_token The token of the universal app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listUniversalAppUsers'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1181,7 +1181,7 @@ function ($response) { * * List Universal App Users * - * @param string $app_token (required) + * @param string $app_token The token of the universal app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listUniversalAppUsers'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1218,7 +1218,7 @@ function ($exception) { /** * Create request for operation 'listUniversalAppUsers' * - * @param string $app_token (required) + * @param string $app_token The token of the universal app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listUniversalAppUsers'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1330,6 +1330,14 @@ protected function createHttpClientOption() } } + if ($this->config->getCertFile()) { + $options[RequestOptions::CERT] = $this->config->getCertFile(); + } + + if ($this->config->getKeyFile()) { + $options[RequestOptions::SSL_KEY] = $this->config->getKeyFile(); + } + return $options; } diff --git a/lib/User/AttachmentApi.php b/lib/User/AttachmentApi.php index 86eb7bec..e59ab277 100644 --- a/lib/User/AttachmentApi.php +++ b/lib/User/AttachmentApi.php @@ -14,7 +14,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -149,7 +149,7 @@ public function getConfig() * * @param int $workspace_id id of your workspace. (required) * @param string $base_name name of your base. (required) - * @param string|null $path path (optional) + * @param string|null $path The file path relative to the asset directory. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['checkIfAssetExists'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -169,7 +169,7 @@ public function checkIfAssetExists($workspace_id, $base_name, $path = null, stri * * @param int $workspace_id id of your workspace. (required) * @param string $base_name name of your base. (required) - * @param string|null $path (optional) + * @param string|null $path The file path relative to the asset directory. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['checkIfAssetExists'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -256,7 +256,7 @@ public function checkIfAssetExistsWithHttpInfo($workspace_id, $base_name, $path * * @param int $workspace_id id of your workspace. (required) * @param string $base_name name of your base. (required) - * @param string|null $path (optional) + * @param string|null $path The file path relative to the asset directory. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['checkIfAssetExists'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -279,7 +279,7 @@ function ($response) { * * @param int $workspace_id id of your workspace. (required) * @param string $base_name name of your base. (required) - * @param string|null $path (optional) + * @param string|null $path The file path relative to the asset directory. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['checkIfAssetExists'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -331,7 +331,7 @@ function ($exception) { * * @param int $workspace_id id of your workspace. (required) * @param string $base_name name of your base. (required) - * @param string|null $path (optional) + * @param string|null $path The file path relative to the asset directory. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['checkIfAssetExists'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -458,7 +458,7 @@ public function checkIfAssetExistsRequest($workspace_id, $base_name, $path = nul * Delete Base Asset * * @param string $base_uuid The unique identifier of a base. Sometimes also called dtable_uuid. (required) - * @param string|null $path path (optional) + * @param string|null $path The file path relative to the asset directory. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteBaseAsset'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -477,7 +477,7 @@ public function deleteBaseAsset($base_uuid, $path = null, string $contentType = * Delete Base Asset * * @param string $base_uuid The unique identifier of a base. Sometimes also called dtable_uuid. (required) - * @param string|null $path (optional) + * @param string|null $path The file path relative to the asset directory. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteBaseAsset'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -563,7 +563,7 @@ public function deleteBaseAssetWithHttpInfo($base_uuid, $path = null, string $co * Delete Base Asset * * @param string $base_uuid The unique identifier of a base. Sometimes also called dtable_uuid. (required) - * @param string|null $path (optional) + * @param string|null $path The file path relative to the asset directory. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteBaseAsset'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -585,7 +585,7 @@ function ($response) { * Delete Base Asset * * @param string $base_uuid The unique identifier of a base. Sometimes also called dtable_uuid. (required) - * @param string|null $path (optional) + * @param string|null $path The file path relative to the asset directory. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteBaseAsset'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -636,7 +636,7 @@ function ($exception) { * Create request for operation 'deleteBaseAsset' * * @param string $base_uuid The unique identifier of a base. Sometimes also called dtable_uuid. (required) - * @param string|null $path (optional) + * @param string|null $path The file path relative to the asset directory. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteBaseAsset'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1028,7 +1028,7 @@ public function deleteBaseAssetsRequest($base_uuid, string $contentType = self:: * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return object + * @return \SeaTable\Client\User\GetBaseAttachmentUploadLink200Response */ public function getBaseAttachmentUploadLink($workspace_id, $base_name, string $contentType = self::contentTypes['getBaseAttachmentUploadLink'][0]) { @@ -1047,7 +1047,7 @@ public function getBaseAttachmentUploadLink($workspace_id, $base_name, string $c * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) + * @return array of \SeaTable\Client\User\GetBaseAttachmentUploadLink200Response, HTTP status code, HTTP response headers (array of strings) */ public function getBaseAttachmentUploadLinkWithHttpInfo($workspace_id, $base_name, string $contentType = self::contentTypes['getBaseAttachmentUploadLink'][0]) { @@ -1079,7 +1079,7 @@ public function getBaseAttachmentUploadLinkWithHttpInfo($workspace_id, $base_nam switch($statusCode) { case 200: return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\User\GetBaseAttachmentUploadLink200Response', $request, $response, ); @@ -1101,7 +1101,7 @@ public function getBaseAttachmentUploadLinkWithHttpInfo($workspace_id, $base_nam } return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\User\GetBaseAttachmentUploadLink200Response', $request, $response, ); @@ -1110,7 +1110,7 @@ public function getBaseAttachmentUploadLinkWithHttpInfo($workspace_id, $base_nam case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - 'object', + '\SeaTable\Client\User\GetBaseAttachmentUploadLink200Response', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1158,7 +1158,7 @@ function ($response) { */ public function getBaseAttachmentUploadLinkAsyncWithHttpInfo($workspace_id, $base_name, string $contentType = self::contentTypes['getBaseAttachmentUploadLink'][0]) { - $returnType = 'object'; + $returnType = '\SeaTable\Client\User\GetBaseAttachmentUploadLink200Response'; $request = $this->getBaseAttachmentUploadLinkRequest($workspace_id, $base_name, $contentType); return $this->client @@ -1319,7 +1319,7 @@ public function getBaseAttachmentUploadLinkRequest($workspace_id, $base_name, st * List Base Asset Directories And Files * * @param string $base_uuid The unique identifier of a base. Sometimes also called dtable_uuid. (required) - * @param string|null $parent_dir parent_dir (optional) + * @param string|null $parent_dir The parent directory path. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listBaseAssets'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -1338,7 +1338,7 @@ public function listBaseAssets($base_uuid, $parent_dir = null, string $contentTy * List Base Asset Directories And Files * * @param string $base_uuid The unique identifier of a base. Sometimes also called dtable_uuid. (required) - * @param string|null $parent_dir (optional) + * @param string|null $parent_dir The parent directory path. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listBaseAssets'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -1424,7 +1424,7 @@ public function listBaseAssetsWithHttpInfo($base_uuid, $parent_dir = null, strin * List Base Asset Directories And Files * * @param string $base_uuid The unique identifier of a base. Sometimes also called dtable_uuid. (required) - * @param string|null $parent_dir (optional) + * @param string|null $parent_dir The parent directory path. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listBaseAssets'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1446,7 +1446,7 @@ function ($response) { * List Base Asset Directories And Files * * @param string $base_uuid The unique identifier of a base. Sometimes also called dtable_uuid. (required) - * @param string|null $parent_dir (optional) + * @param string|null $parent_dir The parent directory path. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listBaseAssets'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1497,7 +1497,7 @@ function ($exception) { * Create request for operation 'listBaseAssets' * * @param string $base_uuid The unique identifier of a base. Sometimes also called dtable_uuid. (required) - * @param string|null $parent_dir (optional) + * @param string|null $parent_dir The parent directory path. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listBaseAssets'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -2213,6 +2213,14 @@ protected function createHttpClientOption() } } + if ($this->config->getCertFile()) { + $options[RequestOptions::CERT] = $this->config->getCertFile(); + } + + if ($this->config->getKeyFile()) { + $options[RequestOptions::SSL_KEY] = $this->config->getKeyFile(); + } + return $options; } diff --git a/lib/User/AutomationsApi.php b/lib/User/AutomationsApi.php index 63cfb3f8..d3f0c2ed 100644 --- a/lib/User/AutomationsApi.php +++ b/lib/User/AutomationsApi.php @@ -14,7 +14,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -145,7 +145,7 @@ public function getConfig() * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return object + * @return \SeaTable\Client\User\CreateAutomationRule200Response */ public function createAutomationRule($workspace_id, $base_name, $create_automation_rule_request = null, string $contentType = self::contentTypes['createAutomationRule'][0]) { @@ -165,7 +165,7 @@ public function createAutomationRule($workspace_id, $base_name, $create_automati * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) + * @return array of \SeaTable\Client\User\CreateAutomationRule200Response, HTTP status code, HTTP response headers (array of strings) */ public function createAutomationRuleWithHttpInfo($workspace_id, $base_name, $create_automation_rule_request = null, string $contentType = self::contentTypes['createAutomationRule'][0]) { @@ -197,7 +197,7 @@ public function createAutomationRuleWithHttpInfo($workspace_id, $base_name, $cre switch($statusCode) { case 200: return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\User\CreateAutomationRule200Response', $request, $response, ); @@ -219,7 +219,7 @@ public function createAutomationRuleWithHttpInfo($workspace_id, $base_name, $cre } return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\User\CreateAutomationRule200Response', $request, $response, ); @@ -228,7 +228,7 @@ public function createAutomationRuleWithHttpInfo($workspace_id, $base_name, $cre case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - 'object', + '\SeaTable\Client\User\CreateAutomationRule200Response', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -278,7 +278,7 @@ function ($response) { */ public function createAutomationRuleAsyncWithHttpInfo($workspace_id, $base_name, $create_automation_rule_request = null, string $contentType = self::contentTypes['createAutomationRule'][0]) { - $returnType = 'object'; + $returnType = '\SeaTable\Client\User\CreateAutomationRule200Response'; $request = $this->createAutomationRuleRequest($workspace_id, $base_name, $create_automation_rule_request, $contentType); return $this->client @@ -448,7 +448,7 @@ public function createAutomationRuleRequest($workspace_id, $base_name, $create_a * * @param int $workspace_id id of your workspace. (required) * @param string $base_name name of your base. (required) - * @param int $automation_rule_id automation_rule_id (required) + * @param int $automation_rule_id The ID of the automation rule. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteAutomationRule'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -468,7 +468,7 @@ public function deleteAutomationRule($workspace_id, $base_name, $automation_rule * * @param int $workspace_id id of your workspace. (required) * @param string $base_name name of your base. (required) - * @param int $automation_rule_id (required) + * @param int $automation_rule_id The ID of the automation rule. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteAutomationRule'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -555,7 +555,7 @@ public function deleteAutomationRuleWithHttpInfo($workspace_id, $base_name, $aut * * @param int $workspace_id id of your workspace. (required) * @param string $base_name name of your base. (required) - * @param int $automation_rule_id (required) + * @param int $automation_rule_id The ID of the automation rule. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteAutomationRule'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -578,7 +578,7 @@ function ($response) { * * @param int $workspace_id id of your workspace. (required) * @param string $base_name name of your base. (required) - * @param int $automation_rule_id (required) + * @param int $automation_rule_id The ID of the automation rule. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteAutomationRule'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -630,7 +630,7 @@ function ($exception) { * * @param int $workspace_id id of your workspace. (required) * @param string $base_name name of your base. (required) - * @param int $automation_rule_id (required) + * @param int $automation_rule_id The ID of the automation rule. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteAutomationRule'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1061,13 +1061,13 @@ public function listAutomationRulesRequest($workspace_id, $base_name, string $co * * @param int $workspace_id id of your workspace. (required) * @param string $base_name name of your base. (required) - * @param int $automation_rule_id automation_rule_id (required) + * @param int $automation_rule_id The ID of the automation rule. (required) * @param \SeaTable\Client\User\CreateAutomationRuleRequest|null $create_automation_rule_request create_automation_rule_request (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateAutomationRule'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return object + * @return \SeaTable\Client\User\CreateAutomationRule200Response */ public function updateAutomationRule($workspace_id, $base_name, $automation_rule_id, $create_automation_rule_request = null, string $contentType = self::contentTypes['updateAutomationRule'][0]) { @@ -1082,13 +1082,13 @@ public function updateAutomationRule($workspace_id, $base_name, $automation_rule * * @param int $workspace_id id of your workspace. (required) * @param string $base_name name of your base. (required) - * @param int $automation_rule_id (required) + * @param int $automation_rule_id The ID of the automation rule. (required) * @param \SeaTable\Client\User\CreateAutomationRuleRequest|null $create_automation_rule_request (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateAutomationRule'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) + * @return array of \SeaTable\Client\User\CreateAutomationRule200Response, HTTP status code, HTTP response headers (array of strings) */ public function updateAutomationRuleWithHttpInfo($workspace_id, $base_name, $automation_rule_id, $create_automation_rule_request = null, string $contentType = self::contentTypes['updateAutomationRule'][0]) { @@ -1120,7 +1120,7 @@ public function updateAutomationRuleWithHttpInfo($workspace_id, $base_name, $aut switch($statusCode) { case 200: return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\User\CreateAutomationRule200Response', $request, $response, ); @@ -1142,7 +1142,7 @@ public function updateAutomationRuleWithHttpInfo($workspace_id, $base_name, $aut } return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\User\CreateAutomationRule200Response', $request, $response, ); @@ -1151,7 +1151,7 @@ public function updateAutomationRuleWithHttpInfo($workspace_id, $base_name, $aut case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - 'object', + '\SeaTable\Client\User\CreateAutomationRule200Response', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1170,7 +1170,7 @@ public function updateAutomationRuleWithHttpInfo($workspace_id, $base_name, $aut * * @param int $workspace_id id of your workspace. (required) * @param string $base_name name of your base. (required) - * @param int $automation_rule_id (required) + * @param int $automation_rule_id The ID of the automation rule. (required) * @param \SeaTable\Client\User\CreateAutomationRuleRequest|null $create_automation_rule_request (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateAutomationRule'] to see the possible values for this operation * @@ -1194,7 +1194,7 @@ function ($response) { * * @param int $workspace_id id of your workspace. (required) * @param string $base_name name of your base. (required) - * @param int $automation_rule_id (required) + * @param int $automation_rule_id The ID of the automation rule. (required) * @param \SeaTable\Client\User\CreateAutomationRuleRequest|null $create_automation_rule_request (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateAutomationRule'] to see the possible values for this operation * @@ -1203,7 +1203,7 @@ function ($response) { */ public function updateAutomationRuleAsyncWithHttpInfo($workspace_id, $base_name, $automation_rule_id, $create_automation_rule_request = null, string $contentType = self::contentTypes['updateAutomationRule'][0]) { - $returnType = 'object'; + $returnType = '\SeaTable\Client\User\CreateAutomationRule200Response'; $request = $this->updateAutomationRuleRequest($workspace_id, $base_name, $automation_rule_id, $create_automation_rule_request, $contentType); return $this->client @@ -1247,7 +1247,7 @@ function ($exception) { * * @param int $workspace_id id of your workspace. (required) * @param string $base_name name of your base. (required) - * @param int $automation_rule_id (required) + * @param int $automation_rule_id The ID of the automation rule. (required) * @param \SeaTable\Client\User\CreateAutomationRuleRequest|null $create_automation_rule_request (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateAutomationRule'] to see the possible values for this operation * @@ -1401,6 +1401,14 @@ protected function createHttpClientOption() } } + if ($this->config->getCertFile()) { + $options[RequestOptions::CERT] = $this->config->getCertFile(); + } + + if ($this->config->getKeyFile()) { + $options[RequestOptions::SSL_KEY] = $this->config->getKeyFile(); + } + return $options; } diff --git a/lib/User/Base.php b/lib/User/Base.php index 7b3315cb..97273048 100644 --- a/lib/User/Base.php +++ b/lib/User/Base.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -317,11 +317,11 @@ public function setTable($table) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -329,12 +329,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -359,11 +359,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/BasePasswordRequest.php b/lib/User/BasePasswordRequest.php index 1974dabb..404c93fc 100644 --- a/lib/User/BasePasswordRequest.php +++ b/lib/User/BasePasswordRequest.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -451,11 +451,11 @@ public function setNewPassword($new_password) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -463,12 +463,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -493,11 +493,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/BaseTable.php b/lib/User/BaseTable.php index 84f0eef6..1239ee86 100644 --- a/lib/User/BaseTable.php +++ b/lib/User/BaseTable.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -678,11 +678,11 @@ public function setInStorage($in_storage) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -690,12 +690,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -720,11 +720,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/BasesApi.php b/lib/User/BasesApi.php index e1a5ce7a..f10498f3 100644 --- a/lib/User/BasesApi.php +++ b/lib/User/BasesApi.php @@ -14,7 +14,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -1615,7 +1615,7 @@ public function deleteBaseRequest($workspace_id, $name = null, string $contentTy * Delete Folder * * @param int $workspace_id id of your workspace. (required) - * @param string $folder_id folder_id (required) + * @param string $folder_id The ID of the folder. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteFolder'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -1634,7 +1634,7 @@ public function deleteFolder($workspace_id, $folder_id, string $contentType = se * Delete Folder * * @param int $workspace_id id of your workspace. (required) - * @param string $folder_id (required) + * @param string $folder_id The ID of the folder. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteFolder'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -1720,7 +1720,7 @@ public function deleteFolderWithHttpInfo($workspace_id, $folder_id, string $cont * Delete Folder * * @param int $workspace_id id of your workspace. (required) - * @param string $folder_id (required) + * @param string $folder_id The ID of the folder. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteFolder'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1742,7 +1742,7 @@ function ($response) { * Delete Folder * * @param int $workspace_id id of your workspace. (required) - * @param string $folder_id (required) + * @param string $folder_id The ID of the folder. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteFolder'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1793,7 +1793,7 @@ function ($exception) { * Create request for operation 'deleteFolder' * * @param int $workspace_id id of your workspace. (required) - * @param string $folder_id (required) + * @param string $folder_id The ID of the folder. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteFolder'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -2956,7 +2956,7 @@ public function listFavoritesRequest(string $contentType = self::contentTypes['l * * List Group Trashed Bases * - * @param int $group_id group_id (required) + * @param int $group_id The ID of the group. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listGroupTrashedBases'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -2974,7 +2974,7 @@ public function listGroupTrashedBases($group_id, string $contentType = self::con * * List Group Trashed Bases * - * @param int $group_id (required) + * @param int $group_id The ID of the group. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listGroupTrashedBases'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -3059,7 +3059,7 @@ public function listGroupTrashedBasesWithHttpInfo($group_id, string $contentType * * List Group Trashed Bases * - * @param int $group_id (required) + * @param int $group_id The ID of the group. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listGroupTrashedBases'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -3080,7 +3080,7 @@ function ($response) { * * List Group Trashed Bases * - * @param int $group_id (required) + * @param int $group_id The ID of the group. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listGroupTrashedBases'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -3130,7 +3130,7 @@ function ($exception) { /** * Create request for operation 'listGroupTrashedBases' * - * @param int $group_id (required) + * @param int $group_id The ID of the group. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listGroupTrashedBases'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -3231,8 +3231,8 @@ public function listGroupTrashedBasesRequest($group_id, string $contentType = se * * List Trashed Bases * - * @param int|null $page page (optional) - * @param int|null $per_page per_page (optional) + * @param int|null $page Page number of results to return. Default is 1. (optional) + * @param int|null $per_page Number of results per page. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listTrashedBases'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -3250,8 +3250,8 @@ public function listTrashedBases($page = null, $per_page = null, string $content * * List Trashed Bases * - * @param int|null $page (optional) - * @param int|null $per_page (optional) + * @param int|null $page Page number of results to return. Default is 1. (optional) + * @param int|null $per_page Number of results per page. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listTrashedBases'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -3336,8 +3336,8 @@ public function listTrashedBasesWithHttpInfo($page = null, $per_page = null, str * * List Trashed Bases * - * @param int|null $page (optional) - * @param int|null $per_page (optional) + * @param int|null $page Page number of results to return. Default is 1. (optional) + * @param int|null $per_page Number of results per page. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listTrashedBases'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -3358,8 +3358,8 @@ function ($response) { * * List Trashed Bases * - * @param int|null $page (optional) - * @param int|null $per_page (optional) + * @param int|null $page Page number of results to return. Default is 1. (optional) + * @param int|null $per_page Number of results per page. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listTrashedBases'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -3409,8 +3409,8 @@ function ($exception) { /** * Create request for operation 'listTrashedBases' * - * @param int|null $page (optional) - * @param int|null $per_page (optional) + * @param int|null $page Page number of results to return. Default is 1. (optional) + * @param int|null $per_page Number of results per page. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listTrashedBases'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -3831,7 +3831,7 @@ public function moveBaseIntoFolderRequest($workspace_id, $item_type = null, $ite * * Restore Group Trashed Base * - * @param int $group_id group_id (required) + * @param int $group_id The ID of the group. (required) * @param string $base_uuid The unique identifier of a base. Sometimes also called dtable_uuid. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['restoreGroupTrashedBase'] to see the possible values for this operation * @@ -3850,7 +3850,7 @@ public function restoreGroupTrashedBase($group_id, $base_uuid, string $contentTy * * Restore Group Trashed Base * - * @param int $group_id (required) + * @param int $group_id The ID of the group. (required) * @param string $base_uuid The unique identifier of a base. Sometimes also called dtable_uuid. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['restoreGroupTrashedBase'] to see the possible values for this operation * @@ -3936,7 +3936,7 @@ public function restoreGroupTrashedBaseWithHttpInfo($group_id, $base_uuid, strin * * Restore Group Trashed Base * - * @param int $group_id (required) + * @param int $group_id The ID of the group. (required) * @param string $base_uuid The unique identifier of a base. Sometimes also called dtable_uuid. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['restoreGroupTrashedBase'] to see the possible values for this operation * @@ -3958,7 +3958,7 @@ function ($response) { * * Restore Group Trashed Base * - * @param int $group_id (required) + * @param int $group_id The ID of the group. (required) * @param string $base_uuid The unique identifier of a base. Sometimes also called dtable_uuid. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['restoreGroupTrashedBase'] to see the possible values for this operation * @@ -4009,7 +4009,7 @@ function ($exception) { /** * Create request for operation 'restoreGroupTrashedBase' * - * @param int $group_id (required) + * @param int $group_id The ID of the group. (required) * @param string $base_uuid The unique identifier of a base. Sometimes also called dtable_uuid. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['restoreGroupTrashedBase'] to see the possible values for this operation * @@ -4399,10 +4399,10 @@ public function restoreTrashedBaseRequest($trashed_base_id, string $contentType /** * Operation searchBaseOrApps * - * Search base or apps + * Search Base or Apps * * @param string|null $query_str Search string. Substrings are allowed and capitalization does not matter. (optional) - * @param string|null $query_type query_type (optional) + * @param string|null $query_type Filter the search by type. Use `base` to search only bases or `app` to search only apps. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['searchBaseOrApps'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -4418,10 +4418,10 @@ public function searchBaseOrApps($query_str = null, $query_type = null, string $ /** * Operation searchBaseOrAppsWithHttpInfo * - * Search base or apps + * Search Base or Apps * * @param string|null $query_str Search string. Substrings are allowed and capitalization does not matter. (optional) - * @param string|null $query_type (optional) + * @param string|null $query_type Filter the search by type. Use `base` to search only bases or `app` to search only apps. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['searchBaseOrApps'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -4504,10 +4504,10 @@ public function searchBaseOrAppsWithHttpInfo($query_str = null, $query_type = nu /** * Operation searchBaseOrAppsAsync * - * Search base or apps + * Search Base or Apps * * @param string|null $query_str Search string. Substrings are allowed and capitalization does not matter. (optional) - * @param string|null $query_type (optional) + * @param string|null $query_type Filter the search by type. Use `base` to search only bases or `app` to search only apps. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['searchBaseOrApps'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -4526,10 +4526,10 @@ function ($response) { /** * Operation searchBaseOrAppsAsyncWithHttpInfo * - * Search base or apps + * Search Base or Apps * * @param string|null $query_str Search string. Substrings are allowed and capitalization does not matter. (optional) - * @param string|null $query_type (optional) + * @param string|null $query_type Filter the search by type. Use `base` to search only bases or `app` to search only apps. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['searchBaseOrApps'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -4580,7 +4580,7 @@ function ($exception) { * Create request for operation 'searchBaseOrApps' * * @param string|null $query_str Search string. Substrings are allowed and capitalization does not matter. (optional) - * @param string|null $query_type (optional) + * @param string|null $query_type Filter the search by type. Use `base` to search only bases or `app` to search only apps. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['searchBaseOrApps'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -5272,7 +5272,7 @@ public function updateBaseRequest($workspace_id, $name = null, $new_name = null, * Update Folder * * @param int $workspace_id id of your workspace. (required) - * @param string $folder_id folder_id (required) + * @param string $folder_id The ID of the folder. (required) * @param string|null $name Name of your folder. If the name already exists in the workspace, the system will add a \\\"(1)\\\" to it. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateFolder'] to see the possible values for this operation * @@ -5292,7 +5292,7 @@ public function updateFolder($workspace_id, $folder_id, $name = null, string $co * Update Folder * * @param int $workspace_id id of your workspace. (required) - * @param string $folder_id (required) + * @param string $folder_id The ID of the folder. (required) * @param string|null $name Name of your folder. If the name already exists in the workspace, the system will add a \\\"(1)\\\" to it. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateFolder'] to see the possible values for this operation * @@ -5379,7 +5379,7 @@ public function updateFolderWithHttpInfo($workspace_id, $folder_id, $name = null * Update Folder * * @param int $workspace_id id of your workspace. (required) - * @param string $folder_id (required) + * @param string $folder_id The ID of the folder. (required) * @param string|null $name Name of your folder. If the name already exists in the workspace, the system will add a \\\"(1)\\\" to it. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateFolder'] to see the possible values for this operation * @@ -5402,7 +5402,7 @@ function ($response) { * Update Folder * * @param int $workspace_id id of your workspace. (required) - * @param string $folder_id (required) + * @param string $folder_id The ID of the folder. (required) * @param string|null $name Name of your folder. If the name already exists in the workspace, the system will add a \\\"(1)\\\" to it. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateFolder'] to see the possible values for this operation * @@ -5454,7 +5454,7 @@ function ($exception) { * Create request for operation 'updateFolder' * * @param int $workspace_id id of your workspace. (required) - * @param string $folder_id (required) + * @param string $folder_id The ID of the folder. (required) * @param string|null $name Name of your folder. If the name already exists in the workspace, the system will add a \\\"(1)\\\" to it. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateFolder'] to see the possible values for this operation * @@ -5593,6 +5593,14 @@ protected function createHttpClientOption() } } + if ($this->config->getCertFile()) { + $options[RequestOptions::CERT] = $this->config->getCertFile(); + } + + if ($this->config->getKeyFile()) { + $options[RequestOptions::SSL_KEY] = $this->config->getKeyFile(); + } + return $options; } diff --git a/lib/User/ChooseADateColumnValue.php b/lib/User/ChooseADateColumnValue.php index cc2ba9f3..7e1ce37d 100644 --- a/lib/User/ChooseADateColumnValue.php +++ b/lib/User/ChooseADateColumnValue.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -383,11 +383,11 @@ public function setDateColumnKey($date_column_key) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -395,12 +395,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -425,11 +425,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/CommonDatasetApi.php b/lib/User/CommonDatasetApi.php index 6f09b7a7..da5ef565 100644 --- a/lib/User/CommonDatasetApi.php +++ b/lib/User/CommonDatasetApi.php @@ -14,7 +14,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -436,7 +436,7 @@ public function deleteCommonDatasetRequest($dataset_id, string $contentType = se * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return object + * @return \SeaTable\Client\User\GetCommonDataset200Response */ public function getCommonDataset($dataset_id, string $contentType = self::contentTypes['getCommonDataset'][0]) { @@ -454,7 +454,7 @@ public function getCommonDataset($dataset_id, string $contentType = self::conten * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) + * @return array of \SeaTable\Client\User\GetCommonDataset200Response, HTTP status code, HTTP response headers (array of strings) */ public function getCommonDatasetWithHttpInfo($dataset_id, string $contentType = self::contentTypes['getCommonDataset'][0]) { @@ -486,7 +486,7 @@ public function getCommonDatasetWithHttpInfo($dataset_id, string $contentType = switch($statusCode) { case 200: return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\User\GetCommonDataset200Response', $request, $response, ); @@ -508,7 +508,7 @@ public function getCommonDatasetWithHttpInfo($dataset_id, string $contentType = } return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\User\GetCommonDataset200Response', $request, $response, ); @@ -517,7 +517,7 @@ public function getCommonDatasetWithHttpInfo($dataset_id, string $contentType = case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - 'object', + '\SeaTable\Client\User\GetCommonDataset200Response', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -563,7 +563,7 @@ function ($response) { */ public function getCommonDatasetAsyncWithHttpInfo($dataset_id, string $contentType = self::contentTypes['getCommonDataset'][0]) { - $returnType = 'object'; + $returnType = '\SeaTable\Client\User\GetCommonDataset200Response'; $request = $this->getCommonDatasetRequest($dataset_id, $contentType); return $this->client @@ -982,7 +982,7 @@ public function getCommonDatasetInfoRequest($dataset_id, string $contentType = s * Import Common Dataset * * @param int $dataset_id The ID of the common dataset. When you e.g. publish a common dataset from a view, the returned `id` is what you need here. (required) - * @param string|null $dst_dtable_uuid The name of the base. (optional) + * @param string|null $dst_dtable_uuid The UUID of the base. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['importCommonDataset'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -1001,7 +1001,7 @@ public function importCommonDataset($dataset_id, $dst_dtable_uuid = null, string * Import Common Dataset * * @param int $dataset_id The ID of the common dataset. When you e.g. publish a common dataset from a view, the returned `id` is what you need here. (required) - * @param string|null $dst_dtable_uuid The name of the base. (optional) + * @param string|null $dst_dtable_uuid The UUID of the base. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['importCommonDataset'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -1087,7 +1087,7 @@ public function importCommonDatasetWithHttpInfo($dataset_id, $dst_dtable_uuid = * Import Common Dataset * * @param int $dataset_id The ID of the common dataset. When you e.g. publish a common dataset from a view, the returned `id` is what you need here. (required) - * @param string|null $dst_dtable_uuid The name of the base. (optional) + * @param string|null $dst_dtable_uuid The UUID of the base. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['importCommonDataset'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1109,7 +1109,7 @@ function ($response) { * Import Common Dataset * * @param int $dataset_id The ID of the common dataset. When you e.g. publish a common dataset from a view, the returned `id` is what you need here. (required) - * @param string|null $dst_dtable_uuid The name of the base. (optional) + * @param string|null $dst_dtable_uuid The UUID of the base. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['importCommonDataset'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1160,7 +1160,7 @@ function ($exception) { * Create request for operation 'importCommonDataset' * * @param int $dataset_id The ID of the common dataset. When you e.g. publish a common dataset from a view, the returned `id` is what you need here. (required) - * @param string|null $dst_dtable_uuid The name of the base. (optional) + * @param string|null $dst_dtable_uuid The UUID of the base. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['importCommonDataset'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1848,7 +1848,7 @@ public function listSyncHistoryRequest($dtable_uuid, string $contentType = self: * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return object + * @return \SeaTable\Client\User\PublishCommonDataset200Response */ public function publishCommonDataset($dataset_name = null, $workspace_id = null, $dtable_name = null, $table_name = null, $view_name = null, string $contentType = self::contentTypes['publishCommonDataset'][0]) { @@ -1870,7 +1870,7 @@ public function publishCommonDataset($dataset_name = null, $workspace_id = null, * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) + * @return array of \SeaTable\Client\User\PublishCommonDataset200Response, HTTP status code, HTTP response headers (array of strings) */ public function publishCommonDatasetWithHttpInfo($dataset_name = null, $workspace_id = null, $dtable_name = null, $table_name = null, $view_name = null, string $contentType = self::contentTypes['publishCommonDataset'][0]) { @@ -1902,7 +1902,7 @@ public function publishCommonDatasetWithHttpInfo($dataset_name = null, $workspac switch($statusCode) { case 200: return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\User\PublishCommonDataset200Response', $request, $response, ); @@ -1924,7 +1924,7 @@ public function publishCommonDatasetWithHttpInfo($dataset_name = null, $workspac } return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\User\PublishCommonDataset200Response', $request, $response, ); @@ -1933,7 +1933,7 @@ public function publishCommonDatasetWithHttpInfo($dataset_name = null, $workspac case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - 'object', + '\SeaTable\Client\User\PublishCommonDataset200Response', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1987,7 +1987,7 @@ function ($response) { */ public function publishCommonDatasetAsyncWithHttpInfo($dataset_name = null, $workspace_id = null, $dtable_name = null, $table_name = null, $view_name = null, string $contentType = self::contentTypes['publishCommonDataset'][0]) { - $returnType = 'object'; + $returnType = '\SeaTable\Client\User\PublishCommonDataset200Response'; $request = $this->publishCommonDatasetRequest($dataset_name, $workspace_id, $dtable_name, $table_name, $view_name, $contentType); return $this->client @@ -3036,6 +3036,14 @@ protected function createHttpClientOption() } } + if ($this->config->getCertFile()) { + $options[RequestOptions::CERT] = $this->config->getCertFile(); + } + + if ($this->config->getKeyFile()) { + $options[RequestOptions::SSL_KEY] = $this->config->getKeyFile(); + } + return $options; } diff --git a/lib/User/Contains.php b/lib/User/Contains.php index bf078767..10e2411e 100644 --- a/lib/User/Contains.php +++ b/lib/User/Contains.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -417,11 +417,11 @@ public function setFilterTerm($filter_term) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -429,12 +429,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -459,11 +459,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/ContainsFilterTerm.php b/lib/User/ContainsFilterTerm.php index 034fb1e7..fdeaab9e 100644 --- a/lib/User/ContainsFilterTerm.php +++ b/lib/User/ContainsFilterTerm.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -289,11 +289,11 @@ public function valid() /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -301,12 +301,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -331,11 +331,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/CreateAutomationRule200Response.php b/lib/User/CreateAutomationRule200Response.php new file mode 100644 index 00000000..33f14b3c --- /dev/null +++ b/lib/User/CreateAutomationRule200Response.php @@ -0,0 +1,714 @@ + + */ +class CreateAutomationRule200Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'createAutomationRule_200_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'id' => 'int', + 'dtable_uuid' => 'string', + 'run_condition' => 'string', + 'trigger' => 'object', + 'actions' => 'object[]', + 'creator' => 'string', + 'ctime' => 'string', + 'last_trigger_time' => 'string', + 'is_valid' => 'bool', + 'trigger_count' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'id' => null, + 'dtable_uuid' => null, + 'run_condition' => null, + 'trigger' => null, + 'actions' => null, + 'creator' => null, + 'ctime' => null, + 'last_trigger_time' => null, + 'is_valid' => null, + 'trigger_count' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'id' => false, + 'dtable_uuid' => false, + 'run_condition' => false, + 'trigger' => false, + 'actions' => false, + 'creator' => false, + 'ctime' => false, + 'last_trigger_time' => false, + 'is_valid' => false, + 'trigger_count' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'dtable_uuid' => 'dtable_uuid', + 'run_condition' => 'run_condition', + 'trigger' => 'trigger', + 'actions' => 'actions', + 'creator' => 'creator', + 'ctime' => 'ctime', + 'last_trigger_time' => 'last_trigger_time', + 'is_valid' => 'is_valid', + 'trigger_count' => 'trigger_count' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'dtable_uuid' => 'setDtableUuid', + 'run_condition' => 'setRunCondition', + 'trigger' => 'setTrigger', + 'actions' => 'setActions', + 'creator' => 'setCreator', + 'ctime' => 'setCtime', + 'last_trigger_time' => 'setLastTriggerTime', + 'is_valid' => 'setIsValid', + 'trigger_count' => 'setTriggerCount' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'dtable_uuid' => 'getDtableUuid', + 'run_condition' => 'getRunCondition', + 'trigger' => 'getTrigger', + 'actions' => 'getActions', + 'creator' => 'getCreator', + 'ctime' => 'getCtime', + 'last_trigger_time' => 'getLastTriggerTime', + 'is_valid' => 'getIsValid', + 'trigger_count' => 'getTriggerCount' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('dtable_uuid', $data ?? [], null); + $this->setIfExists('run_condition', $data ?? [], null); + $this->setIfExists('trigger', $data ?? [], null); + $this->setIfExists('actions', $data ?? [], null); + $this->setIfExists('creator', $data ?? [], null); + $this->setIfExists('ctime', $data ?? [], null); + $this->setIfExists('last_trigger_time', $data ?? [], null); + $this->setIfExists('is_valid', $data ?? [], null); + $this->setIfExists('trigger_count', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return int|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int|null $id id + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets dtable_uuid + * + * @return string|null + */ + public function getDtableUuid() + { + return $this->container['dtable_uuid']; + } + + /** + * Sets dtable_uuid + * + * @param string|null $dtable_uuid dtable_uuid + * + * @return self + */ + public function setDtableUuid($dtable_uuid) + { + if (is_null($dtable_uuid)) { + throw new \InvalidArgumentException('non-nullable dtable_uuid cannot be null'); + } + $this->container['dtable_uuid'] = $dtable_uuid; + + return $this; + } + + /** + * Gets run_condition + * + * @return string|null + */ + public function getRunCondition() + { + return $this->container['run_condition']; + } + + /** + * Sets run_condition + * + * @param string|null $run_condition run_condition + * + * @return self + */ + public function setRunCondition($run_condition) + { + if (is_null($run_condition)) { + throw new \InvalidArgumentException('non-nullable run_condition cannot be null'); + } + $this->container['run_condition'] = $run_condition; + + return $this; + } + + /** + * Gets trigger + * + * @return object|null + */ + public function getTrigger() + { + return $this->container['trigger']; + } + + /** + * Sets trigger + * + * @param object|null $trigger trigger + * + * @return self + */ + public function setTrigger($trigger) + { + if (is_null($trigger)) { + throw new \InvalidArgumentException('non-nullable trigger cannot be null'); + } + $this->container['trigger'] = $trigger; + + return $this; + } + + /** + * Gets actions + * + * @return object[]|null + */ + public function getActions() + { + return $this->container['actions']; + } + + /** + * Sets actions + * + * @param object[]|null $actions actions + * + * @return self + */ + public function setActions($actions) + { + if (is_null($actions)) { + throw new \InvalidArgumentException('non-nullable actions cannot be null'); + } + $this->container['actions'] = $actions; + + return $this; + } + + /** + * Gets creator + * + * @return string|null + */ + public function getCreator() + { + return $this->container['creator']; + } + + /** + * Sets creator + * + * @param string|null $creator creator + * + * @return self + */ + public function setCreator($creator) + { + if (is_null($creator)) { + throw new \InvalidArgumentException('non-nullable creator cannot be null'); + } + $this->container['creator'] = $creator; + + return $this; + } + + /** + * Gets ctime + * + * @return string|null + */ + public function getCtime() + { + return $this->container['ctime']; + } + + /** + * Sets ctime + * + * @param string|null $ctime ctime + * + * @return self + */ + public function setCtime($ctime) + { + if (is_null($ctime)) { + throw new \InvalidArgumentException('non-nullable ctime cannot be null'); + } + $this->container['ctime'] = $ctime; + + return $this; + } + + /** + * Gets last_trigger_time + * + * @return string|null + */ + public function getLastTriggerTime() + { + return $this->container['last_trigger_time']; + } + + /** + * Sets last_trigger_time + * + * @param string|null $last_trigger_time last_trigger_time + * + * @return self + */ + public function setLastTriggerTime($last_trigger_time) + { + if (is_null($last_trigger_time)) { + throw new \InvalidArgumentException('non-nullable last_trigger_time cannot be null'); + } + $this->container['last_trigger_time'] = $last_trigger_time; + + return $this; + } + + /** + * Gets is_valid + * + * @return bool|null + */ + public function getIsValid() + { + return $this->container['is_valid']; + } + + /** + * Sets is_valid + * + * @param bool|null $is_valid is_valid + * + * @return self + */ + public function setIsValid($is_valid) + { + if (is_null($is_valid)) { + throw new \InvalidArgumentException('non-nullable is_valid cannot be null'); + } + $this->container['is_valid'] = $is_valid; + + return $this; + } + + /** + * Gets trigger_count + * + * @return int|null + */ + public function getTriggerCount() + { + return $this->container['trigger_count']; + } + + /** + * Sets trigger_count + * + * @param int|null $trigger_count trigger_count + * + * @return self + */ + public function setTriggerCount($trigger_count) + { + if (is_null($trigger_count)) { + throw new \InvalidArgumentException('non-nullable trigger_count cannot be null'); + } + $this->container['trigger_count'] = $trigger_count; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/User/CreateAutomationRuleRequest.php b/lib/User/CreateAutomationRuleRequest.php index 63a454ae..f3e0717e 100644 --- a/lib/User/CreateAutomationRuleRequest.php +++ b/lib/User/CreateAutomationRuleRequest.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -417,11 +417,11 @@ public function setActions($actions) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -429,12 +429,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -459,11 +459,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/CreateBaseExternalLink200Response.php b/lib/User/CreateBaseExternalLink200Response.php new file mode 100644 index 00000000..7575ecbc --- /dev/null +++ b/lib/User/CreateBaseExternalLink200Response.php @@ -0,0 +1,578 @@ + + */ +class CreateBaseExternalLink200Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'createBaseExternalLink_200_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'url' => 'string', + 'token' => 'string', + 'is_custom' => 'bool', + 'permission' => 'string', + 'is_expired' => 'bool', + 'expire_date' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'url' => null, + 'token' => null, + 'is_custom' => null, + 'permission' => null, + 'is_expired' => null, + 'expire_date' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'url' => false, + 'token' => false, + 'is_custom' => false, + 'permission' => false, + 'is_expired' => false, + 'expire_date' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'url' => 'url', + 'token' => 'token', + 'is_custom' => 'is_custom', + 'permission' => 'permission', + 'is_expired' => 'is_expired', + 'expire_date' => 'expire_date' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'url' => 'setUrl', + 'token' => 'setToken', + 'is_custom' => 'setIsCustom', + 'permission' => 'setPermission', + 'is_expired' => 'setIsExpired', + 'expire_date' => 'setExpireDate' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'url' => 'getUrl', + 'token' => 'getToken', + 'is_custom' => 'getIsCustom', + 'permission' => 'getPermission', + 'is_expired' => 'getIsExpired', + 'expire_date' => 'getExpireDate' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('url', $data ?? [], null); + $this->setIfExists('token', $data ?? [], null); + $this->setIfExists('is_custom', $data ?? [], null); + $this->setIfExists('permission', $data ?? [], null); + $this->setIfExists('is_expired', $data ?? [], null); + $this->setIfExists('expire_date', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets url + * + * @return string|null + */ + public function getUrl() + { + return $this->container['url']; + } + + /** + * Sets url + * + * @param string|null $url url + * + * @return self + */ + public function setUrl($url) + { + if (is_null($url)) { + throw new \InvalidArgumentException('non-nullable url cannot be null'); + } + $this->container['url'] = $url; + + return $this; + } + + /** + * Gets token + * + * @return string|null + */ + public function getToken() + { + return $this->container['token']; + } + + /** + * Sets token + * + * @param string|null $token token + * + * @return self + */ + public function setToken($token) + { + if (is_null($token)) { + throw new \InvalidArgumentException('non-nullable token cannot be null'); + } + $this->container['token'] = $token; + + return $this; + } + + /** + * Gets is_custom + * + * @return bool|null + */ + public function getIsCustom() + { + return $this->container['is_custom']; + } + + /** + * Sets is_custom + * + * @param bool|null $is_custom is_custom + * + * @return self + */ + public function setIsCustom($is_custom) + { + if (is_null($is_custom)) { + throw new \InvalidArgumentException('non-nullable is_custom cannot be null'); + } + $this->container['is_custom'] = $is_custom; + + return $this; + } + + /** + * Gets permission + * + * @return string|null + */ + public function getPermission() + { + return $this->container['permission']; + } + + /** + * Sets permission + * + * @param string|null $permission permission + * + * @return self + */ + public function setPermission($permission) + { + if (is_null($permission)) { + throw new \InvalidArgumentException('non-nullable permission cannot be null'); + } + $this->container['permission'] = $permission; + + return $this; + } + + /** + * Gets is_expired + * + * @return bool|null + */ + public function getIsExpired() + { + return $this->container['is_expired']; + } + + /** + * Sets is_expired + * + * @param bool|null $is_expired is_expired + * + * @return self + */ + public function setIsExpired($is_expired) + { + if (is_null($is_expired)) { + throw new \InvalidArgumentException('non-nullable is_expired cannot be null'); + } + $this->container['is_expired'] = $is_expired; + + return $this; + } + + /** + * Gets expire_date + * + * @return string|null + */ + public function getExpireDate() + { + return $this->container['expire_date']; + } + + /** + * Sets expire_date + * + * @param string|null $expire_date expire_date + * + * @return self + */ + public function setExpireDate($expire_date) + { + if (is_null($expire_date)) { + throw new \InvalidArgumentException('non-nullable expire_date cannot be null'); + } + $this->container['expire_date'] = $expire_date; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/User/CreateGroupRequest.php b/lib/User/CreateGroupRequest.php index 3e0678dc..999b5ce6 100644 --- a/lib/User/CreateGroupRequest.php +++ b/lib/User/CreateGroupRequest.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -317,11 +317,11 @@ public function setName($name) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -329,12 +329,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -359,11 +359,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/CreateGroupViewShare200Response.php b/lib/User/CreateGroupViewShare200Response.php new file mode 100644 index 00000000..19c3945e --- /dev/null +++ b/lib/User/CreateGroupViewShare200Response.php @@ -0,0 +1,680 @@ + + */ +class CreateGroupViewShare200Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'createGroupViewShare_200_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'id' => 'int', + 'dtable_name' => 'string', + 'from_user' => 'string', + 'from_user_name' => 'string', + 'to_group_id' => 'string', + 'to_group_name' => 'string', + 'permission' => 'string', + 'table_id' => 'string', + 'view_id' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'id' => null, + 'dtable_name' => null, + 'from_user' => null, + 'from_user_name' => null, + 'to_group_id' => null, + 'to_group_name' => null, + 'permission' => null, + 'table_id' => null, + 'view_id' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'id' => false, + 'dtable_name' => false, + 'from_user' => false, + 'from_user_name' => false, + 'to_group_id' => false, + 'to_group_name' => false, + 'permission' => false, + 'table_id' => false, + 'view_id' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'dtable_name' => 'dtable_name', + 'from_user' => 'from_user', + 'from_user_name' => 'from_user_name', + 'to_group_id' => 'to_group_id', + 'to_group_name' => 'to_group_name', + 'permission' => 'permission', + 'table_id' => 'table_id', + 'view_id' => 'view_id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'dtable_name' => 'setDtableName', + 'from_user' => 'setFromUser', + 'from_user_name' => 'setFromUserName', + 'to_group_id' => 'setToGroupId', + 'to_group_name' => 'setToGroupName', + 'permission' => 'setPermission', + 'table_id' => 'setTableId', + 'view_id' => 'setViewId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'dtable_name' => 'getDtableName', + 'from_user' => 'getFromUser', + 'from_user_name' => 'getFromUserName', + 'to_group_id' => 'getToGroupId', + 'to_group_name' => 'getToGroupName', + 'permission' => 'getPermission', + 'table_id' => 'getTableId', + 'view_id' => 'getViewId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('dtable_name', $data ?? [], null); + $this->setIfExists('from_user', $data ?? [], null); + $this->setIfExists('from_user_name', $data ?? [], null); + $this->setIfExists('to_group_id', $data ?? [], null); + $this->setIfExists('to_group_name', $data ?? [], null); + $this->setIfExists('permission', $data ?? [], null); + $this->setIfExists('table_id', $data ?? [], null); + $this->setIfExists('view_id', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return int|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int|null $id id + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets dtable_name + * + * @return string|null + */ + public function getDtableName() + { + return $this->container['dtable_name']; + } + + /** + * Sets dtable_name + * + * @param string|null $dtable_name dtable_name + * + * @return self + */ + public function setDtableName($dtable_name) + { + if (is_null($dtable_name)) { + throw new \InvalidArgumentException('non-nullable dtable_name cannot be null'); + } + $this->container['dtable_name'] = $dtable_name; + + return $this; + } + + /** + * Gets from_user + * + * @return string|null + */ + public function getFromUser() + { + return $this->container['from_user']; + } + + /** + * Sets from_user + * + * @param string|null $from_user from_user + * + * @return self + */ + public function setFromUser($from_user) + { + if (is_null($from_user)) { + throw new \InvalidArgumentException('non-nullable from_user cannot be null'); + } + $this->container['from_user'] = $from_user; + + return $this; + } + + /** + * Gets from_user_name + * + * @return string|null + */ + public function getFromUserName() + { + return $this->container['from_user_name']; + } + + /** + * Sets from_user_name + * + * @param string|null $from_user_name from_user_name + * + * @return self + */ + public function setFromUserName($from_user_name) + { + if (is_null($from_user_name)) { + throw new \InvalidArgumentException('non-nullable from_user_name cannot be null'); + } + $this->container['from_user_name'] = $from_user_name; + + return $this; + } + + /** + * Gets to_group_id + * + * @return string|null + */ + public function getToGroupId() + { + return $this->container['to_group_id']; + } + + /** + * Sets to_group_id + * + * @param string|null $to_group_id to_group_id + * + * @return self + */ + public function setToGroupId($to_group_id) + { + if (is_null($to_group_id)) { + throw new \InvalidArgumentException('non-nullable to_group_id cannot be null'); + } + $this->container['to_group_id'] = $to_group_id; + + return $this; + } + + /** + * Gets to_group_name + * + * @return string|null + */ + public function getToGroupName() + { + return $this->container['to_group_name']; + } + + /** + * Sets to_group_name + * + * @param string|null $to_group_name to_group_name + * + * @return self + */ + public function setToGroupName($to_group_name) + { + if (is_null($to_group_name)) { + throw new \InvalidArgumentException('non-nullable to_group_name cannot be null'); + } + $this->container['to_group_name'] = $to_group_name; + + return $this; + } + + /** + * Gets permission + * + * @return string|null + */ + public function getPermission() + { + return $this->container['permission']; + } + + /** + * Sets permission + * + * @param string|null $permission permission + * + * @return self + */ + public function setPermission($permission) + { + if (is_null($permission)) { + throw new \InvalidArgumentException('non-nullable permission cannot be null'); + } + $this->container['permission'] = $permission; + + return $this; + } + + /** + * Gets table_id + * + * @return string|null + */ + public function getTableId() + { + return $this->container['table_id']; + } + + /** + * Sets table_id + * + * @param string|null $table_id table_id + * + * @return self + */ + public function setTableId($table_id) + { + if (is_null($table_id)) { + throw new \InvalidArgumentException('non-nullable table_id cannot be null'); + } + $this->container['table_id'] = $table_id; + + return $this; + } + + /** + * Gets view_id + * + * @return string|null + */ + public function getViewId() + { + return $this->container['view_id']; + } + + /** + * Sets view_id + * + * @param string|null $view_id view_id + * + * @return self + */ + public function setViewId($view_id) + { + if (is_null($view_id)) { + throw new \InvalidArgumentException('non-nullable view_id cannot be null'); + } + $this->container['view_id'] = $view_id; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/User/CreateInviteLink200Response.php b/lib/User/CreateInviteLink200Response.php new file mode 100644 index 00000000..23fbec43 --- /dev/null +++ b/lib/User/CreateInviteLink200Response.php @@ -0,0 +1,680 @@ + + */ +class CreateInviteLink200Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'createInviteLink_200_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'username' => 'string', + 'permission' => 'string', + 'token' => 'string', + 'link' => 'string', + 'dtable' => 'string', + 'dtable_id' => 'int', + 'workspace_id' => 'int', + 'expire_date' => 'string', + 'ctime' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'username' => null, + 'permission' => null, + 'token' => null, + 'link' => null, + 'dtable' => null, + 'dtable_id' => null, + 'workspace_id' => null, + 'expire_date' => null, + 'ctime' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'username' => false, + 'permission' => false, + 'token' => false, + 'link' => false, + 'dtable' => false, + 'dtable_id' => false, + 'workspace_id' => false, + 'expire_date' => false, + 'ctime' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'username' => 'username', + 'permission' => 'permission', + 'token' => 'token', + 'link' => 'link', + 'dtable' => 'dtable', + 'dtable_id' => 'dtable_id', + 'workspace_id' => 'workspace_id', + 'expire_date' => 'expire_date', + 'ctime' => 'ctime' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'username' => 'setUsername', + 'permission' => 'setPermission', + 'token' => 'setToken', + 'link' => 'setLink', + 'dtable' => 'setDtable', + 'dtable_id' => 'setDtableId', + 'workspace_id' => 'setWorkspaceId', + 'expire_date' => 'setExpireDate', + 'ctime' => 'setCtime' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'username' => 'getUsername', + 'permission' => 'getPermission', + 'token' => 'getToken', + 'link' => 'getLink', + 'dtable' => 'getDtable', + 'dtable_id' => 'getDtableId', + 'workspace_id' => 'getWorkspaceId', + 'expire_date' => 'getExpireDate', + 'ctime' => 'getCtime' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('username', $data ?? [], null); + $this->setIfExists('permission', $data ?? [], null); + $this->setIfExists('token', $data ?? [], null); + $this->setIfExists('link', $data ?? [], null); + $this->setIfExists('dtable', $data ?? [], null); + $this->setIfExists('dtable_id', $data ?? [], null); + $this->setIfExists('workspace_id', $data ?? [], null); + $this->setIfExists('expire_date', $data ?? [], null); + $this->setIfExists('ctime', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets username + * + * @return string|null + */ + public function getUsername() + { + return $this->container['username']; + } + + /** + * Sets username + * + * @param string|null $username username + * + * @return self + */ + public function setUsername($username) + { + if (is_null($username)) { + throw new \InvalidArgumentException('non-nullable username cannot be null'); + } + $this->container['username'] = $username; + + return $this; + } + + /** + * Gets permission + * + * @return string|null + */ + public function getPermission() + { + return $this->container['permission']; + } + + /** + * Sets permission + * + * @param string|null $permission permission + * + * @return self + */ + public function setPermission($permission) + { + if (is_null($permission)) { + throw new \InvalidArgumentException('non-nullable permission cannot be null'); + } + $this->container['permission'] = $permission; + + return $this; + } + + /** + * Gets token + * + * @return string|null + */ + public function getToken() + { + return $this->container['token']; + } + + /** + * Sets token + * + * @param string|null $token token + * + * @return self + */ + public function setToken($token) + { + if (is_null($token)) { + throw new \InvalidArgumentException('non-nullable token cannot be null'); + } + $this->container['token'] = $token; + + return $this; + } + + /** + * Gets link + * + * @return string|null + */ + public function getLink() + { + return $this->container['link']; + } + + /** + * Sets link + * + * @param string|null $link link + * + * @return self + */ + public function setLink($link) + { + if (is_null($link)) { + throw new \InvalidArgumentException('non-nullable link cannot be null'); + } + $this->container['link'] = $link; + + return $this; + } + + /** + * Gets dtable + * + * @return string|null + */ + public function getDtable() + { + return $this->container['dtable']; + } + + /** + * Sets dtable + * + * @param string|null $dtable dtable + * + * @return self + */ + public function setDtable($dtable) + { + if (is_null($dtable)) { + throw new \InvalidArgumentException('non-nullable dtable cannot be null'); + } + $this->container['dtable'] = $dtable; + + return $this; + } + + /** + * Gets dtable_id + * + * @return int|null + */ + public function getDtableId() + { + return $this->container['dtable_id']; + } + + /** + * Sets dtable_id + * + * @param int|null $dtable_id dtable_id + * + * @return self + */ + public function setDtableId($dtable_id) + { + if (is_null($dtable_id)) { + throw new \InvalidArgumentException('non-nullable dtable_id cannot be null'); + } + $this->container['dtable_id'] = $dtable_id; + + return $this; + } + + /** + * Gets workspace_id + * + * @return int|null + */ + public function getWorkspaceId() + { + return $this->container['workspace_id']; + } + + /** + * Sets workspace_id + * + * @param int|null $workspace_id workspace_id + * + * @return self + */ + public function setWorkspaceId($workspace_id) + { + if (is_null($workspace_id)) { + throw new \InvalidArgumentException('non-nullable workspace_id cannot be null'); + } + $this->container['workspace_id'] = $workspace_id; + + return $this; + } + + /** + * Gets expire_date + * + * @return string|null + */ + public function getExpireDate() + { + return $this->container['expire_date']; + } + + /** + * Sets expire_date + * + * @param string|null $expire_date expire_date + * + * @return self + */ + public function setExpireDate($expire_date) + { + if (is_null($expire_date)) { + throw new \InvalidArgumentException('non-nullable expire_date cannot be null'); + } + $this->container['expire_date'] = $expire_date; + + return $this; + } + + /** + * Gets ctime + * + * @return string|null + */ + public function getCtime() + { + return $this->container['ctime']; + } + + /** + * Sets ctime + * + * @param string|null $ctime ctime + * + * @return self + */ + public function setCtime($ctime) + { + if (is_null($ctime)) { + throw new \InvalidArgumentException('non-nullable ctime cannot be null'); + } + $this->container['ctime'] = $ctime; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/User/CreateUserViewShare200Response.php b/lib/User/CreateUserViewShare200Response.php new file mode 100644 index 00000000..25c8c707 --- /dev/null +++ b/lib/User/CreateUserViewShare200Response.php @@ -0,0 +1,714 @@ + + */ +class CreateUserViewShare200Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'createUserViewShare_200_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'id' => 'int', + 'dtable_name' => 'string', + 'from_user' => 'string', + 'from_user_name' => 'string', + 'to_user' => 'string', + 'to_user_name' => 'string', + 'permission' => 'string', + 'table_id' => 'string', + 'view_id' => 'string', + 'shared_name' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'id' => null, + 'dtable_name' => null, + 'from_user' => null, + 'from_user_name' => null, + 'to_user' => null, + 'to_user_name' => null, + 'permission' => null, + 'table_id' => null, + 'view_id' => null, + 'shared_name' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'id' => false, + 'dtable_name' => false, + 'from_user' => false, + 'from_user_name' => false, + 'to_user' => false, + 'to_user_name' => false, + 'permission' => false, + 'table_id' => false, + 'view_id' => false, + 'shared_name' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'dtable_name' => 'dtable_name', + 'from_user' => 'from_user', + 'from_user_name' => 'from_user_name', + 'to_user' => 'to_user', + 'to_user_name' => 'to_user_name', + 'permission' => 'permission', + 'table_id' => 'table_id', + 'view_id' => 'view_id', + 'shared_name' => 'shared_name' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'dtable_name' => 'setDtableName', + 'from_user' => 'setFromUser', + 'from_user_name' => 'setFromUserName', + 'to_user' => 'setToUser', + 'to_user_name' => 'setToUserName', + 'permission' => 'setPermission', + 'table_id' => 'setTableId', + 'view_id' => 'setViewId', + 'shared_name' => 'setSharedName' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'dtable_name' => 'getDtableName', + 'from_user' => 'getFromUser', + 'from_user_name' => 'getFromUserName', + 'to_user' => 'getToUser', + 'to_user_name' => 'getToUserName', + 'permission' => 'getPermission', + 'table_id' => 'getTableId', + 'view_id' => 'getViewId', + 'shared_name' => 'getSharedName' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('dtable_name', $data ?? [], null); + $this->setIfExists('from_user', $data ?? [], null); + $this->setIfExists('from_user_name', $data ?? [], null); + $this->setIfExists('to_user', $data ?? [], null); + $this->setIfExists('to_user_name', $data ?? [], null); + $this->setIfExists('permission', $data ?? [], null); + $this->setIfExists('table_id', $data ?? [], null); + $this->setIfExists('view_id', $data ?? [], null); + $this->setIfExists('shared_name', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return int|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int|null $id id + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets dtable_name + * + * @return string|null + */ + public function getDtableName() + { + return $this->container['dtable_name']; + } + + /** + * Sets dtable_name + * + * @param string|null $dtable_name dtable_name + * + * @return self + */ + public function setDtableName($dtable_name) + { + if (is_null($dtable_name)) { + throw new \InvalidArgumentException('non-nullable dtable_name cannot be null'); + } + $this->container['dtable_name'] = $dtable_name; + + return $this; + } + + /** + * Gets from_user + * + * @return string|null + */ + public function getFromUser() + { + return $this->container['from_user']; + } + + /** + * Sets from_user + * + * @param string|null $from_user from_user + * + * @return self + */ + public function setFromUser($from_user) + { + if (is_null($from_user)) { + throw new \InvalidArgumentException('non-nullable from_user cannot be null'); + } + $this->container['from_user'] = $from_user; + + return $this; + } + + /** + * Gets from_user_name + * + * @return string|null + */ + public function getFromUserName() + { + return $this->container['from_user_name']; + } + + /** + * Sets from_user_name + * + * @param string|null $from_user_name from_user_name + * + * @return self + */ + public function setFromUserName($from_user_name) + { + if (is_null($from_user_name)) { + throw new \InvalidArgumentException('non-nullable from_user_name cannot be null'); + } + $this->container['from_user_name'] = $from_user_name; + + return $this; + } + + /** + * Gets to_user + * + * @return string|null + */ + public function getToUser() + { + return $this->container['to_user']; + } + + /** + * Sets to_user + * + * @param string|null $to_user to_user + * + * @return self + */ + public function setToUser($to_user) + { + if (is_null($to_user)) { + throw new \InvalidArgumentException('non-nullable to_user cannot be null'); + } + $this->container['to_user'] = $to_user; + + return $this; + } + + /** + * Gets to_user_name + * + * @return string|null + */ + public function getToUserName() + { + return $this->container['to_user_name']; + } + + /** + * Sets to_user_name + * + * @param string|null $to_user_name to_user_name + * + * @return self + */ + public function setToUserName($to_user_name) + { + if (is_null($to_user_name)) { + throw new \InvalidArgumentException('non-nullable to_user_name cannot be null'); + } + $this->container['to_user_name'] = $to_user_name; + + return $this; + } + + /** + * Gets permission + * + * @return string|null + */ + public function getPermission() + { + return $this->container['permission']; + } + + /** + * Sets permission + * + * @param string|null $permission permission + * + * @return self + */ + public function setPermission($permission) + { + if (is_null($permission)) { + throw new \InvalidArgumentException('non-nullable permission cannot be null'); + } + $this->container['permission'] = $permission; + + return $this; + } + + /** + * Gets table_id + * + * @return string|null + */ + public function getTableId() + { + return $this->container['table_id']; + } + + /** + * Sets table_id + * + * @param string|null $table_id table_id + * + * @return self + */ + public function setTableId($table_id) + { + if (is_null($table_id)) { + throw new \InvalidArgumentException('non-nullable table_id cannot be null'); + } + $this->container['table_id'] = $table_id; + + return $this; + } + + /** + * Gets view_id + * + * @return string|null + */ + public function getViewId() + { + return $this->container['view_id']; + } + + /** + * Sets view_id + * + * @param string|null $view_id view_id + * + * @return self + */ + public function setViewId($view_id) + { + if (is_null($view_id)) { + throw new \InvalidArgumentException('non-nullable view_id cannot be null'); + } + $this->container['view_id'] = $view_id; + + return $this; + } + + /** + * Gets shared_name + * + * @return string|null + */ + public function getSharedName() + { + return $this->container['shared_name']; + } + + /** + * Sets shared_name + * + * @param string|null $shared_name shared_name + * + * @return self + */ + public function setSharedName($shared_name) + { + if (is_null($shared_name)) { + throw new \InvalidArgumentException('non-nullable shared_name cannot be null'); + } + $this->container['shared_name'] = $shared_name; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/User/CreateViewExternalLink200Response.php b/lib/User/CreateViewExternalLink200Response.php new file mode 100644 index 00000000..f645fb69 --- /dev/null +++ b/lib/User/CreateViewExternalLink200Response.php @@ -0,0 +1,816 @@ + + */ +class CreateViewExternalLink200Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'createViewExternalLink_200_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'id' => 'int', + 'from_dtable' => 'string', + 'creator' => 'string', + 'creator_name' => 'string', + 'token' => 'string', + 'permission' => 'string', + 'create_at' => 'string', + 'view_cnt' => 'int', + 'table_id' => 'string', + 'view_id' => 'string', + 'url' => 'string', + 'is_custom' => 'bool', + 'expire_date' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'id' => null, + 'from_dtable' => null, + 'creator' => null, + 'creator_name' => null, + 'token' => null, + 'permission' => null, + 'create_at' => null, + 'view_cnt' => null, + 'table_id' => null, + 'view_id' => null, + 'url' => null, + 'is_custom' => null, + 'expire_date' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'id' => false, + 'from_dtable' => false, + 'creator' => false, + 'creator_name' => false, + 'token' => false, + 'permission' => false, + 'create_at' => false, + 'view_cnt' => false, + 'table_id' => false, + 'view_id' => false, + 'url' => false, + 'is_custom' => false, + 'expire_date' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'from_dtable' => 'from_dtable', + 'creator' => 'creator', + 'creator_name' => 'creator_name', + 'token' => 'token', + 'permission' => 'permission', + 'create_at' => 'create_at', + 'view_cnt' => 'view_cnt', + 'table_id' => 'table_id', + 'view_id' => 'view_id', + 'url' => 'url', + 'is_custom' => 'is_custom', + 'expire_date' => 'expire_date' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'from_dtable' => 'setFromDtable', + 'creator' => 'setCreator', + 'creator_name' => 'setCreatorName', + 'token' => 'setToken', + 'permission' => 'setPermission', + 'create_at' => 'setCreateAt', + 'view_cnt' => 'setViewCnt', + 'table_id' => 'setTableId', + 'view_id' => 'setViewId', + 'url' => 'setUrl', + 'is_custom' => 'setIsCustom', + 'expire_date' => 'setExpireDate' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'from_dtable' => 'getFromDtable', + 'creator' => 'getCreator', + 'creator_name' => 'getCreatorName', + 'token' => 'getToken', + 'permission' => 'getPermission', + 'create_at' => 'getCreateAt', + 'view_cnt' => 'getViewCnt', + 'table_id' => 'getTableId', + 'view_id' => 'getViewId', + 'url' => 'getUrl', + 'is_custom' => 'getIsCustom', + 'expire_date' => 'getExpireDate' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('from_dtable', $data ?? [], null); + $this->setIfExists('creator', $data ?? [], null); + $this->setIfExists('creator_name', $data ?? [], null); + $this->setIfExists('token', $data ?? [], null); + $this->setIfExists('permission', $data ?? [], null); + $this->setIfExists('create_at', $data ?? [], null); + $this->setIfExists('view_cnt', $data ?? [], null); + $this->setIfExists('table_id', $data ?? [], null); + $this->setIfExists('view_id', $data ?? [], null); + $this->setIfExists('url', $data ?? [], null); + $this->setIfExists('is_custom', $data ?? [], null); + $this->setIfExists('expire_date', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return int|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int|null $id id + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets from_dtable + * + * @return string|null + */ + public function getFromDtable() + { + return $this->container['from_dtable']; + } + + /** + * Sets from_dtable + * + * @param string|null $from_dtable from_dtable + * + * @return self + */ + public function setFromDtable($from_dtable) + { + if (is_null($from_dtable)) { + throw new \InvalidArgumentException('non-nullable from_dtable cannot be null'); + } + $this->container['from_dtable'] = $from_dtable; + + return $this; + } + + /** + * Gets creator + * + * @return string|null + */ + public function getCreator() + { + return $this->container['creator']; + } + + /** + * Sets creator + * + * @param string|null $creator creator + * + * @return self + */ + public function setCreator($creator) + { + if (is_null($creator)) { + throw new \InvalidArgumentException('non-nullable creator cannot be null'); + } + $this->container['creator'] = $creator; + + return $this; + } + + /** + * Gets creator_name + * + * @return string|null + */ + public function getCreatorName() + { + return $this->container['creator_name']; + } + + /** + * Sets creator_name + * + * @param string|null $creator_name creator_name + * + * @return self + */ + public function setCreatorName($creator_name) + { + if (is_null($creator_name)) { + throw new \InvalidArgumentException('non-nullable creator_name cannot be null'); + } + $this->container['creator_name'] = $creator_name; + + return $this; + } + + /** + * Gets token + * + * @return string|null + */ + public function getToken() + { + return $this->container['token']; + } + + /** + * Sets token + * + * @param string|null $token token + * + * @return self + */ + public function setToken($token) + { + if (is_null($token)) { + throw new \InvalidArgumentException('non-nullable token cannot be null'); + } + $this->container['token'] = $token; + + return $this; + } + + /** + * Gets permission + * + * @return string|null + */ + public function getPermission() + { + return $this->container['permission']; + } + + /** + * Sets permission + * + * @param string|null $permission permission + * + * @return self + */ + public function setPermission($permission) + { + if (is_null($permission)) { + throw new \InvalidArgumentException('non-nullable permission cannot be null'); + } + $this->container['permission'] = $permission; + + return $this; + } + + /** + * Gets create_at + * + * @return string|null + */ + public function getCreateAt() + { + return $this->container['create_at']; + } + + /** + * Sets create_at + * + * @param string|null $create_at create_at + * + * @return self + */ + public function setCreateAt($create_at) + { + if (is_null($create_at)) { + throw new \InvalidArgumentException('non-nullable create_at cannot be null'); + } + $this->container['create_at'] = $create_at; + + return $this; + } + + /** + * Gets view_cnt + * + * @return int|null + */ + public function getViewCnt() + { + return $this->container['view_cnt']; + } + + /** + * Sets view_cnt + * + * @param int|null $view_cnt view_cnt + * + * @return self + */ + public function setViewCnt($view_cnt) + { + if (is_null($view_cnt)) { + throw new \InvalidArgumentException('non-nullable view_cnt cannot be null'); + } + $this->container['view_cnt'] = $view_cnt; + + return $this; + } + + /** + * Gets table_id + * + * @return string|null + */ + public function getTableId() + { + return $this->container['table_id']; + } + + /** + * Sets table_id + * + * @param string|null $table_id table_id + * + * @return self + */ + public function setTableId($table_id) + { + if (is_null($table_id)) { + throw new \InvalidArgumentException('non-nullable table_id cannot be null'); + } + $this->container['table_id'] = $table_id; + + return $this; + } + + /** + * Gets view_id + * + * @return string|null + */ + public function getViewId() + { + return $this->container['view_id']; + } + + /** + * Sets view_id + * + * @param string|null $view_id view_id + * + * @return self + */ + public function setViewId($view_id) + { + if (is_null($view_id)) { + throw new \InvalidArgumentException('non-nullable view_id cannot be null'); + } + $this->container['view_id'] = $view_id; + + return $this; + } + + /** + * Gets url + * + * @return string|null + */ + public function getUrl() + { + return $this->container['url']; + } + + /** + * Sets url + * + * @param string|null $url url + * + * @return self + */ + public function setUrl($url) + { + if (is_null($url)) { + throw new \InvalidArgumentException('non-nullable url cannot be null'); + } + $this->container['url'] = $url; + + return $this; + } + + /** + * Gets is_custom + * + * @return bool|null + */ + public function getIsCustom() + { + return $this->container['is_custom']; + } + + /** + * Sets is_custom + * + * @param bool|null $is_custom is_custom + * + * @return self + */ + public function setIsCustom($is_custom) + { + if (is_null($is_custom)) { + throw new \InvalidArgumentException('non-nullable is_custom cannot be null'); + } + $this->container['is_custom'] = $is_custom; + + return $this; + } + + /** + * Gets expire_date + * + * @return string|null + */ + public function getExpireDate() + { + return $this->container['expire_date']; + } + + /** + * Sets expire_date + * + * @param string|null $expire_date expire_date + * + * @return self + */ + public function setExpireDate($expire_date) + { + if (is_null($expire_date)) { + throw new \InvalidArgumentException('non-nullable expire_date cannot be null'); + } + $this->container['expire_date'] = $expire_date; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/User/DepartmentsApi.php b/lib/User/DepartmentsApi.php index 78a8a57f..00cb42da 100644 --- a/lib/User/DepartmentsApi.php +++ b/lib/User/DepartmentsApi.php @@ -14,7 +14,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -670,6 +670,14 @@ protected function createHttpClientOption() } } + if ($this->config->getCertFile()) { + $options[RequestOptions::CERT] = $this->config->getCertFile(); + } + + if ($this->config->getKeyFile()) { + $options[RequestOptions::SSL_KEY] = $this->config->getKeyFile(); + } + return $options; } diff --git a/lib/User/Detail.php b/lib/User/Detail.php index 87b757fe..6ebffb36 100644 --- a/lib/User/Detail.php +++ b/lib/User/Detail.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -419,11 +419,11 @@ public function setPassword($password) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -431,12 +431,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -461,11 +461,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/DoesNotContain.php b/lib/User/DoesNotContain.php index 18850ac6..3be9d319 100644 --- a/lib/User/DoesNotContain.php +++ b/lib/User/DoesNotContain.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -417,11 +417,11 @@ public function setFilterTerm($filter_term) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -429,12 +429,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -459,11 +459,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/EmailAccountsApi.php b/lib/User/EmailAccountsApi.php index 5c6f2b90..23c9471b 100644 --- a/lib/User/EmailAccountsApi.php +++ b/lib/User/EmailAccountsApi.php @@ -14,7 +14,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -433,7 +433,7 @@ public function addEmailAccountRequest($base_uuid, $add_email_account_request = * Delete Email Account * * @param string $base_uuid The unique identifier of a base. Sometimes also called dtable_uuid. (required) - * @param string $_3rd_party_account_id _3rd_party_account_id (required) + * @param string $_3rd_party_account_id The ID of the third-party account. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteEmailAccount'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -452,7 +452,7 @@ public function deleteEmailAccount($base_uuid, $_3rd_party_account_id, string $c * Delete Email Account * * @param string $base_uuid The unique identifier of a base. Sometimes also called dtable_uuid. (required) - * @param string $_3rd_party_account_id (required) + * @param string $_3rd_party_account_id The ID of the third-party account. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteEmailAccount'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -538,7 +538,7 @@ public function deleteEmailAccountWithHttpInfo($base_uuid, $_3rd_party_account_i * Delete Email Account * * @param string $base_uuid The unique identifier of a base. Sometimes also called dtable_uuid. (required) - * @param string $_3rd_party_account_id (required) + * @param string $_3rd_party_account_id The ID of the third-party account. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteEmailAccount'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -560,7 +560,7 @@ function ($response) { * Delete Email Account * * @param string $base_uuid The unique identifier of a base. Sometimes also called dtable_uuid. (required) - * @param string $_3rd_party_account_id (required) + * @param string $_3rd_party_account_id The ID of the third-party account. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteEmailAccount'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -611,7 +611,7 @@ function ($exception) { * Create request for operation 'deleteEmailAccount' * * @param string $base_uuid The unique identifier of a base. Sometimes also called dtable_uuid. (required) - * @param string $_3rd_party_account_id (required) + * @param string $_3rd_party_account_id The ID of the third-party account. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteEmailAccount'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -728,16 +728,17 @@ public function deleteEmailAccountRequest($base_uuid, $_3rd_party_account_id, st * Get Email Account * * @param string $base_uuid The unique identifier of a base. Sometimes also called dtable_uuid. (required) - * @param string|null $account_name account_name (optional) + * @param string|null $account_name The name of the third-party email account. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getEmailAccount'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return void + * @return object */ public function getEmailAccount($base_uuid, $account_name = null, string $contentType = self::contentTypes['getEmailAccount'][0]) { - $this->getEmailAccountWithHttpInfo($base_uuid, $account_name, $contentType); + list($response) = $this->getEmailAccountWithHttpInfo($base_uuid, $account_name, $contentType); + return $response; } /** @@ -746,12 +747,12 @@ public function getEmailAccount($base_uuid, $account_name = null, string $conten * Get Email Account * * @param string $base_uuid The unique identifier of a base. Sometimes also called dtable_uuid. (required) - * @param string|null $account_name (optional) + * @param string|null $account_name The name of the third-party email account. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getEmailAccount'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of null, HTTP status code, HTTP response headers (array of strings) + * @return array of object, HTTP status code, HTTP response headers (array of strings) */ public function getEmailAccountWithHttpInfo($base_uuid, $account_name = null, string $contentType = self::contentTypes['getEmailAccount'][0]) { @@ -780,10 +781,38 @@ public function getEmailAccountWithHttpInfo($base_uuid, $account_name = null, st $statusCode = $response->getStatusCode(); - return [null, $statusCode, $response->getHeaders()]; + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + 'object', + $request, + $response, + ); + } + + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + 'object', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { - case 400: + case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), 'object', @@ -804,7 +833,7 @@ public function getEmailAccountWithHttpInfo($base_uuid, $account_name = null, st * Get Email Account * * @param string $base_uuid The unique identifier of a base. Sometimes also called dtable_uuid. (required) - * @param string|null $account_name (optional) + * @param string|null $account_name The name of the third-party email account. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getEmailAccount'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -826,7 +855,7 @@ function ($response) { * Get Email Account * * @param string $base_uuid The unique identifier of a base. Sometimes also called dtable_uuid. (required) - * @param string|null $account_name (optional) + * @param string|null $account_name The name of the third-party email account. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getEmailAccount'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -834,14 +863,27 @@ function ($response) { */ public function getEmailAccountAsyncWithHttpInfo($base_uuid, $account_name = null, string $contentType = self::contentTypes['getEmailAccount'][0]) { - $returnType = ''; + $returnType = 'object'; $request = $this->getEmailAccountRequest($base_uuid, $account_name, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) ->then( function ($response) use ($returnType) { - return [null, $response->getStatusCode(), $response->getHeaders()]; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; }, function ($exception) { $response = $exception->getResponse(); @@ -864,7 +906,7 @@ function ($exception) { * Create request for operation 'getEmailAccount' * * @param string $base_uuid The unique identifier of a base. Sometimes also called dtable_uuid. (required) - * @param string|null $account_name (optional) + * @param string|null $account_name The name of the third-party email account. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getEmailAccount'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1518,7 +1560,7 @@ public function listEmailAccountsRequest($base_uuid, string $contentType = self: * Update Email Account * * @param string $base_uuid The unique identifier of a base. Sometimes also called dtable_uuid. (required) - * @param string $_3rd_party_account_id _3rd_party_account_id (required) + * @param string $_3rd_party_account_id The ID of the third-party account. (required) * @param \SeaTable\Client\User\AddEmailAccountRequest|null $add_email_account_request add_email_account_request (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateEmailAccount'] to see the possible values for this operation * @@ -1538,7 +1580,7 @@ public function updateEmailAccount($base_uuid, $_3rd_party_account_id, $add_emai * Update Email Account * * @param string $base_uuid The unique identifier of a base. Sometimes also called dtable_uuid. (required) - * @param string $_3rd_party_account_id (required) + * @param string $_3rd_party_account_id The ID of the third-party account. (required) * @param \SeaTable\Client\User\AddEmailAccountRequest|null $add_email_account_request (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateEmailAccount'] to see the possible values for this operation * @@ -1625,7 +1667,7 @@ public function updateEmailAccountWithHttpInfo($base_uuid, $_3rd_party_account_i * Update Email Account * * @param string $base_uuid The unique identifier of a base. Sometimes also called dtable_uuid. (required) - * @param string $_3rd_party_account_id (required) + * @param string $_3rd_party_account_id The ID of the third-party account. (required) * @param \SeaTable\Client\User\AddEmailAccountRequest|null $add_email_account_request (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateEmailAccount'] to see the possible values for this operation * @@ -1648,7 +1690,7 @@ function ($response) { * Update Email Account * * @param string $base_uuid The unique identifier of a base. Sometimes also called dtable_uuid. (required) - * @param string $_3rd_party_account_id (required) + * @param string $_3rd_party_account_id The ID of the third-party account. (required) * @param \SeaTable\Client\User\AddEmailAccountRequest|null $add_email_account_request (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateEmailAccount'] to see the possible values for this operation * @@ -1700,7 +1742,7 @@ function ($exception) { * Create request for operation 'updateEmailAccount' * * @param string $base_uuid The unique identifier of a base. Sometimes also called dtable_uuid. (required) - * @param string $_3rd_party_account_id (required) + * @param string $_3rd_party_account_id The ID of the third-party account. (required) * @param \SeaTable\Client\User\AddEmailAccountRequest|null $add_email_account_request (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateEmailAccount'] to see the possible values for this operation * @@ -1836,6 +1878,14 @@ protected function createHttpClientOption() } } + if ($this->config->getCertFile()) { + $options[RequestOptions::CERT] = $this->config->getCertFile(); + } + + if ($this->config->getKeyFile()) { + $options[RequestOptions::SSL_KEY] = $this->config->getKeyFile(); + } + return $options; } diff --git a/lib/User/Equal.php b/lib/User/Equal.php index b3f32cad..c60ce20f 100644 --- a/lib/User/Equal.php +++ b/lib/User/Equal.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -417,11 +417,11 @@ public function setFilterTerm($filter_term) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -429,12 +429,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -459,11 +459,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/FilterTermEmpty.php b/lib/User/FilterTermEmpty.php index dd85d936..23d7d544 100644 --- a/lib/User/FilterTermEmpty.php +++ b/lib/User/FilterTermEmpty.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ diff --git a/lib/User/FiltersInner.php b/lib/User/FiltersInner.php index de8d972a..0c2cf1ce 100644 --- a/lib/User/FiltersInner.php +++ b/lib/User/FiltersInner.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -483,11 +483,11 @@ public function setFilterTermModifier($filter_term_modifier) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -495,12 +495,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -525,11 +525,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/FormsApi.php b/lib/User/FormsApi.php index 29ee7f24..29d998aa 100644 --- a/lib/User/FormsApi.php +++ b/lib/User/FormsApi.php @@ -14,7 +14,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -429,7 +429,7 @@ public function createFormRequest($workspace_id = null, $name = null, $form_conf * * Delete Form * - * @param string $form_token form_token (required) + * @param string $form_token The token of the form. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteForm'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -447,7 +447,7 @@ public function deleteForm($form_token, string $contentType = self::contentTypes * * Delete Form * - * @param string $form_token (required) + * @param string $form_token The token of the form. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteForm'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -532,7 +532,7 @@ public function deleteFormWithHttpInfo($form_token, string $contentType = self:: * * Delete Form * - * @param string $form_token (required) + * @param string $form_token The token of the form. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteForm'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -553,7 +553,7 @@ function ($response) { * * Delete Form * - * @param string $form_token (required) + * @param string $form_token The token of the form. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteForm'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -603,7 +603,7 @@ function ($exception) { /** * Create request for operation 'deleteForm' * - * @param string $form_token (required) + * @param string $form_token The token of the form. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteForm'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -704,7 +704,7 @@ public function deleteFormRequest($form_token, string $contentType = self::conte * * Duplicate Form * - * @param string $form_token form_token (required) + * @param string $form_token The token of the form. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['duplicateForm'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -722,7 +722,7 @@ public function duplicateForm($form_token, string $contentType = self::contentTy * * Duplicate Form * - * @param string $form_token (required) + * @param string $form_token The token of the form. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['duplicateForm'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -807,7 +807,7 @@ public function duplicateFormWithHttpInfo($form_token, string $contentType = sel * * Duplicate Form * - * @param string $form_token (required) + * @param string $form_token The token of the form. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['duplicateForm'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -828,7 +828,7 @@ function ($response) { * * Duplicate Form * - * @param string $form_token (required) + * @param string $form_token The token of the form. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['duplicateForm'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -878,7 +878,7 @@ function ($exception) { /** * Create request for operation 'duplicateForm' * - * @param string $form_token (required) + * @param string $form_token The token of the form. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['duplicateForm'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1528,7 +1528,7 @@ public function listSharedFormsRequest(string $contentType = self::contentTypes[ * * Update Form * - * @param string $form_token form_token (required) + * @param string $form_token The token of the form. (required) * @param string|null $form_config Define the form's name (required) and other details (optional). For a full list of available options, refer to the instruction above. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateForm'] to see the possible values for this operation * @@ -1547,7 +1547,7 @@ public function updateForm($form_token, $form_config = null, string $contentType * * Update Form * - * @param string $form_token (required) + * @param string $form_token The token of the form. (required) * @param string|null $form_config Define the form's name (required) and other details (optional). For a full list of available options, refer to the instruction above. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateForm'] to see the possible values for this operation * @@ -1633,7 +1633,7 @@ public function updateFormWithHttpInfo($form_token, $form_config = null, string * * Update Form * - * @param string $form_token (required) + * @param string $form_token The token of the form. (required) * @param string|null $form_config Define the form's name (required) and other details (optional). For a full list of available options, refer to the instruction above. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateForm'] to see the possible values for this operation * @@ -1655,7 +1655,7 @@ function ($response) { * * Update Form * - * @param string $form_token (required) + * @param string $form_token The token of the form. (required) * @param string|null $form_config Define the form's name (required) and other details (optional). For a full list of available options, refer to the instruction above. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateForm'] to see the possible values for this operation * @@ -1706,7 +1706,7 @@ function ($exception) { /** * Create request for operation 'updateForm' * - * @param string $form_token (required) + * @param string $form_token The token of the form. (required) * @param string|null $form_config Define the form's name (required) and other details (optional). For a full list of available options, refer to the instruction above. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateForm'] to see the possible values for this operation * @@ -1819,7 +1819,7 @@ public function updateFormRequest($form_token, $form_config = null, string $cont * * Upload Form Logo * - * @param string $form_token form_token (required) + * @param string $form_token The token of the form. (required) * @param \SplFileObject|null $form_logo Path and file name to your logo image. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['uploadFormLogo'] to see the possible values for this operation * @@ -1838,7 +1838,7 @@ public function uploadFormLogo($form_token, $form_logo = null, string $contentTy * * Upload Form Logo * - * @param string $form_token (required) + * @param string $form_token The token of the form. (required) * @param \SplFileObject|null $form_logo Path and file name to your logo image. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['uploadFormLogo'] to see the possible values for this operation * @@ -1924,7 +1924,7 @@ public function uploadFormLogoWithHttpInfo($form_token, $form_logo = null, strin * * Upload Form Logo * - * @param string $form_token (required) + * @param string $form_token The token of the form. (required) * @param \SplFileObject|null $form_logo Path and file name to your logo image. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['uploadFormLogo'] to see the possible values for this operation * @@ -1946,7 +1946,7 @@ function ($response) { * * Upload Form Logo * - * @param string $form_token (required) + * @param string $form_token The token of the form. (required) * @param \SplFileObject|null $form_logo Path and file name to your logo image. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['uploadFormLogo'] to see the possible values for this operation * @@ -1997,7 +1997,7 @@ function ($exception) { /** * Create request for operation 'uploadFormLogo' * - * @param string $form_token (required) + * @param string $form_token The token of the form. (required) * @param \SplFileObject|null $form_logo Path and file name to your logo image. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['uploadFormLogo'] to see the possible values for this operation * @@ -2121,6 +2121,14 @@ protected function createHttpClientOption() } } + if ($this->config->getCertFile()) { + $options[RequestOptions::CERT] = $this->config->getCertFile(); + } + + if ($this->config->getKeyFile()) { + $options[RequestOptions::SSL_KEY] = $this->config->getKeyFile(); + } + return $options; } diff --git a/lib/User/GetAccountInfo200Response.php b/lib/User/GetAccountInfo200Response.php new file mode 100644 index 00000000..563a583c --- /dev/null +++ b/lib/User/GetAccountInfo200Response.php @@ -0,0 +1,1020 @@ + + */ +class GetAccountInfo200Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'getAccountInfo_200_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'org_id' => 'int', + 'is_org_staff' => 'int', + 'space_usage' => 'string', + 'total' => 'int', + 'usage' => 'int', + 'row_usage_rate' => 'string', + 'row_total' => 'int', + 'row_usage' => 'int', + 'avatar_url' => 'string', + 'email' => 'string', + 'name' => 'string', + 'login_id' => 'string', + 'contact_email' => 'string', + 'institution' => 'string', + 'is_staff' => 'bool', + 'enable_chargebee' => 'bool', + 'enable_subscription' => 'bool', + 'dtable_updates_email_interval' => 'int', + 'dtable_collaborate_email_interval' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'org_id' => null, + 'is_org_staff' => null, + 'space_usage' => null, + 'total' => null, + 'usage' => null, + 'row_usage_rate' => null, + 'row_total' => null, + 'row_usage' => null, + 'avatar_url' => null, + 'email' => null, + 'name' => null, + 'login_id' => null, + 'contact_email' => null, + 'institution' => null, + 'is_staff' => null, + 'enable_chargebee' => null, + 'enable_subscription' => null, + 'dtable_updates_email_interval' => null, + 'dtable_collaborate_email_interval' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'org_id' => false, + 'is_org_staff' => false, + 'space_usage' => false, + 'total' => false, + 'usage' => false, + 'row_usage_rate' => false, + 'row_total' => false, + 'row_usage' => false, + 'avatar_url' => false, + 'email' => false, + 'name' => false, + 'login_id' => false, + 'contact_email' => false, + 'institution' => false, + 'is_staff' => false, + 'enable_chargebee' => false, + 'enable_subscription' => false, + 'dtable_updates_email_interval' => false, + 'dtable_collaborate_email_interval' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'org_id' => 'org_id', + 'is_org_staff' => 'is_org_staff', + 'space_usage' => 'space_usage', + 'total' => 'total', + 'usage' => 'usage', + 'row_usage_rate' => 'row_usage_rate', + 'row_total' => 'row_total', + 'row_usage' => 'row_usage', + 'avatar_url' => 'avatar_url', + 'email' => 'email', + 'name' => 'name', + 'login_id' => 'login_id', + 'contact_email' => 'contact_email', + 'institution' => 'institution', + 'is_staff' => 'is_staff', + 'enable_chargebee' => 'enable_chargebee', + 'enable_subscription' => 'enable_subscription', + 'dtable_updates_email_interval' => 'dtable_updates_email_interval', + 'dtable_collaborate_email_interval' => 'dtable_collaborate_email_interval' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'org_id' => 'setOrgId', + 'is_org_staff' => 'setIsOrgStaff', + 'space_usage' => 'setSpaceUsage', + 'total' => 'setTotal', + 'usage' => 'setUsage', + 'row_usage_rate' => 'setRowUsageRate', + 'row_total' => 'setRowTotal', + 'row_usage' => 'setRowUsage', + 'avatar_url' => 'setAvatarUrl', + 'email' => 'setEmail', + 'name' => 'setName', + 'login_id' => 'setLoginId', + 'contact_email' => 'setContactEmail', + 'institution' => 'setInstitution', + 'is_staff' => 'setIsStaff', + 'enable_chargebee' => 'setEnableChargebee', + 'enable_subscription' => 'setEnableSubscription', + 'dtable_updates_email_interval' => 'setDtableUpdatesEmailInterval', + 'dtable_collaborate_email_interval' => 'setDtableCollaborateEmailInterval' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'org_id' => 'getOrgId', + 'is_org_staff' => 'getIsOrgStaff', + 'space_usage' => 'getSpaceUsage', + 'total' => 'getTotal', + 'usage' => 'getUsage', + 'row_usage_rate' => 'getRowUsageRate', + 'row_total' => 'getRowTotal', + 'row_usage' => 'getRowUsage', + 'avatar_url' => 'getAvatarUrl', + 'email' => 'getEmail', + 'name' => 'getName', + 'login_id' => 'getLoginId', + 'contact_email' => 'getContactEmail', + 'institution' => 'getInstitution', + 'is_staff' => 'getIsStaff', + 'enable_chargebee' => 'getEnableChargebee', + 'enable_subscription' => 'getEnableSubscription', + 'dtable_updates_email_interval' => 'getDtableUpdatesEmailInterval', + 'dtable_collaborate_email_interval' => 'getDtableCollaborateEmailInterval' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('org_id', $data ?? [], null); + $this->setIfExists('is_org_staff', $data ?? [], null); + $this->setIfExists('space_usage', $data ?? [], null); + $this->setIfExists('total', $data ?? [], null); + $this->setIfExists('usage', $data ?? [], null); + $this->setIfExists('row_usage_rate', $data ?? [], null); + $this->setIfExists('row_total', $data ?? [], null); + $this->setIfExists('row_usage', $data ?? [], null); + $this->setIfExists('avatar_url', $data ?? [], null); + $this->setIfExists('email', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('login_id', $data ?? [], null); + $this->setIfExists('contact_email', $data ?? [], null); + $this->setIfExists('institution', $data ?? [], null); + $this->setIfExists('is_staff', $data ?? [], null); + $this->setIfExists('enable_chargebee', $data ?? [], null); + $this->setIfExists('enable_subscription', $data ?? [], null); + $this->setIfExists('dtable_updates_email_interval', $data ?? [], null); + $this->setIfExists('dtable_collaborate_email_interval', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets org_id + * + * @return int|null + */ + public function getOrgId() + { + return $this->container['org_id']; + } + + /** + * Sets org_id + * + * @param int|null $org_id org_id + * + * @return self + */ + public function setOrgId($org_id) + { + if (is_null($org_id)) { + throw new \InvalidArgumentException('non-nullable org_id cannot be null'); + } + $this->container['org_id'] = $org_id; + + return $this; + } + + /** + * Gets is_org_staff + * + * @return int|null + */ + public function getIsOrgStaff() + { + return $this->container['is_org_staff']; + } + + /** + * Sets is_org_staff + * + * @param int|null $is_org_staff is_org_staff + * + * @return self + */ + public function setIsOrgStaff($is_org_staff) + { + if (is_null($is_org_staff)) { + throw new \InvalidArgumentException('non-nullable is_org_staff cannot be null'); + } + $this->container['is_org_staff'] = $is_org_staff; + + return $this; + } + + /** + * Gets space_usage + * + * @return string|null + */ + public function getSpaceUsage() + { + return $this->container['space_usage']; + } + + /** + * Sets space_usage + * + * @param string|null $space_usage space_usage + * + * @return self + */ + public function setSpaceUsage($space_usage) + { + if (is_null($space_usage)) { + throw new \InvalidArgumentException('non-nullable space_usage cannot be null'); + } + $this->container['space_usage'] = $space_usage; + + return $this; + } + + /** + * Gets total + * + * @return int|null + */ + public function getTotal() + { + return $this->container['total']; + } + + /** + * Sets total + * + * @param int|null $total total + * + * @return self + */ + public function setTotal($total) + { + if (is_null($total)) { + throw new \InvalidArgumentException('non-nullable total cannot be null'); + } + $this->container['total'] = $total; + + return $this; + } + + /** + * Gets usage + * + * @return int|null + */ + public function getUsage() + { + return $this->container['usage']; + } + + /** + * Sets usage + * + * @param int|null $usage usage + * + * @return self + */ + public function setUsage($usage) + { + if (is_null($usage)) { + throw new \InvalidArgumentException('non-nullable usage cannot be null'); + } + $this->container['usage'] = $usage; + + return $this; + } + + /** + * Gets row_usage_rate + * + * @return string|null + */ + public function getRowUsageRate() + { + return $this->container['row_usage_rate']; + } + + /** + * Sets row_usage_rate + * + * @param string|null $row_usage_rate row_usage_rate + * + * @return self + */ + public function setRowUsageRate($row_usage_rate) + { + if (is_null($row_usage_rate)) { + throw new \InvalidArgumentException('non-nullable row_usage_rate cannot be null'); + } + $this->container['row_usage_rate'] = $row_usage_rate; + + return $this; + } + + /** + * Gets row_total + * + * @return int|null + */ + public function getRowTotal() + { + return $this->container['row_total']; + } + + /** + * Sets row_total + * + * @param int|null $row_total row_total + * + * @return self + */ + public function setRowTotal($row_total) + { + if (is_null($row_total)) { + throw new \InvalidArgumentException('non-nullable row_total cannot be null'); + } + $this->container['row_total'] = $row_total; + + return $this; + } + + /** + * Gets row_usage + * + * @return int|null + */ + public function getRowUsage() + { + return $this->container['row_usage']; + } + + /** + * Sets row_usage + * + * @param int|null $row_usage row_usage + * + * @return self + */ + public function setRowUsage($row_usage) + { + if (is_null($row_usage)) { + throw new \InvalidArgumentException('non-nullable row_usage cannot be null'); + } + $this->container['row_usage'] = $row_usage; + + return $this; + } + + /** + * Gets avatar_url + * + * @return string|null + */ + public function getAvatarUrl() + { + return $this->container['avatar_url']; + } + + /** + * Sets avatar_url + * + * @param string|null $avatar_url avatar_url + * + * @return self + */ + public function setAvatarUrl($avatar_url) + { + if (is_null($avatar_url)) { + throw new \InvalidArgumentException('non-nullable avatar_url cannot be null'); + } + $this->container['avatar_url'] = $avatar_url; + + return $this; + } + + /** + * Gets email + * + * @return string|null + */ + public function getEmail() + { + return $this->container['email']; + } + + /** + * Sets email + * + * @param string|null $email email + * + * @return self + */ + public function setEmail($email) + { + if (is_null($email)) { + throw new \InvalidArgumentException('non-nullable email cannot be null'); + } + $this->container['email'] = $email; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name name + * + * @return self + */ + public function setName($name) + { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets login_id + * + * @return string|null + */ + public function getLoginId() + { + return $this->container['login_id']; + } + + /** + * Sets login_id + * + * @param string|null $login_id login_id + * + * @return self + */ + public function setLoginId($login_id) + { + if (is_null($login_id)) { + throw new \InvalidArgumentException('non-nullable login_id cannot be null'); + } + $this->container['login_id'] = $login_id; + + return $this; + } + + /** + * Gets contact_email + * + * @return string|null + */ + public function getContactEmail() + { + return $this->container['contact_email']; + } + + /** + * Sets contact_email + * + * @param string|null $contact_email contact_email + * + * @return self + */ + public function setContactEmail($contact_email) + { + if (is_null($contact_email)) { + throw new \InvalidArgumentException('non-nullable contact_email cannot be null'); + } + $this->container['contact_email'] = $contact_email; + + return $this; + } + + /** + * Gets institution + * + * @return string|null + */ + public function getInstitution() + { + return $this->container['institution']; + } + + /** + * Sets institution + * + * @param string|null $institution institution + * + * @return self + */ + public function setInstitution($institution) + { + if (is_null($institution)) { + throw new \InvalidArgumentException('non-nullable institution cannot be null'); + } + $this->container['institution'] = $institution; + + return $this; + } + + /** + * Gets is_staff + * + * @return bool|null + */ + public function getIsStaff() + { + return $this->container['is_staff']; + } + + /** + * Sets is_staff + * + * @param bool|null $is_staff is_staff + * + * @return self + */ + public function setIsStaff($is_staff) + { + if (is_null($is_staff)) { + throw new \InvalidArgumentException('non-nullable is_staff cannot be null'); + } + $this->container['is_staff'] = $is_staff; + + return $this; + } + + /** + * Gets enable_chargebee + * + * @return bool|null + */ + public function getEnableChargebee() + { + return $this->container['enable_chargebee']; + } + + /** + * Sets enable_chargebee + * + * @param bool|null $enable_chargebee enable_chargebee + * + * @return self + */ + public function setEnableChargebee($enable_chargebee) + { + if (is_null($enable_chargebee)) { + throw new \InvalidArgumentException('non-nullable enable_chargebee cannot be null'); + } + $this->container['enable_chargebee'] = $enable_chargebee; + + return $this; + } + + /** + * Gets enable_subscription + * + * @return bool|null + */ + public function getEnableSubscription() + { + return $this->container['enable_subscription']; + } + + /** + * Sets enable_subscription + * + * @param bool|null $enable_subscription enable_subscription + * + * @return self + */ + public function setEnableSubscription($enable_subscription) + { + if (is_null($enable_subscription)) { + throw new \InvalidArgumentException('non-nullable enable_subscription cannot be null'); + } + $this->container['enable_subscription'] = $enable_subscription; + + return $this; + } + + /** + * Gets dtable_updates_email_interval + * + * @return int|null + */ + public function getDtableUpdatesEmailInterval() + { + return $this->container['dtable_updates_email_interval']; + } + + /** + * Sets dtable_updates_email_interval + * + * @param int|null $dtable_updates_email_interval dtable_updates_email_interval + * + * @return self + */ + public function setDtableUpdatesEmailInterval($dtable_updates_email_interval) + { + if (is_null($dtable_updates_email_interval)) { + throw new \InvalidArgumentException('non-nullable dtable_updates_email_interval cannot be null'); + } + $this->container['dtable_updates_email_interval'] = $dtable_updates_email_interval; + + return $this; + } + + /** + * Gets dtable_collaborate_email_interval + * + * @return int|null + */ + public function getDtableCollaborateEmailInterval() + { + return $this->container['dtable_collaborate_email_interval']; + } + + /** + * Sets dtable_collaborate_email_interval + * + * @param int|null $dtable_collaborate_email_interval dtable_collaborate_email_interval + * + * @return self + */ + public function setDtableCollaborateEmailInterval($dtable_collaborate_email_interval) + { + if (is_null($dtable_collaborate_email_interval)) { + throw new \InvalidArgumentException('non-nullable dtable_collaborate_email_interval cannot be null'); + } + $this->container['dtable_collaborate_email_interval'] = $dtable_collaborate_email_interval; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/User/GetBaseAttachmentUploadLink200Response.php b/lib/User/GetBaseAttachmentUploadLink200Response.php new file mode 100644 index 00000000..458a3712 --- /dev/null +++ b/lib/User/GetBaseAttachmentUploadLink200Response.php @@ -0,0 +1,510 @@ + + */ +class GetBaseAttachmentUploadLink200Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'getBaseAttachmentUploadLink_200_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'upload_link' => 'string', + 'parent_path' => 'string', + 'img_relative_path' => 'string', + 'file_relative_path' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'upload_link' => null, + 'parent_path' => null, + 'img_relative_path' => null, + 'file_relative_path' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'upload_link' => false, + 'parent_path' => false, + 'img_relative_path' => false, + 'file_relative_path' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'upload_link' => 'upload_link', + 'parent_path' => 'parent_path', + 'img_relative_path' => 'img_relative_path', + 'file_relative_path' => 'file_relative_path' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'upload_link' => 'setUploadLink', + 'parent_path' => 'setParentPath', + 'img_relative_path' => 'setImgRelativePath', + 'file_relative_path' => 'setFileRelativePath' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'upload_link' => 'getUploadLink', + 'parent_path' => 'getParentPath', + 'img_relative_path' => 'getImgRelativePath', + 'file_relative_path' => 'getFileRelativePath' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('upload_link', $data ?? [], null); + $this->setIfExists('parent_path', $data ?? [], null); + $this->setIfExists('img_relative_path', $data ?? [], null); + $this->setIfExists('file_relative_path', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets upload_link + * + * @return string|null + */ + public function getUploadLink() + { + return $this->container['upload_link']; + } + + /** + * Sets upload_link + * + * @param string|null $upload_link upload_link + * + * @return self + */ + public function setUploadLink($upload_link) + { + if (is_null($upload_link)) { + throw new \InvalidArgumentException('non-nullable upload_link cannot be null'); + } + $this->container['upload_link'] = $upload_link; + + return $this; + } + + /** + * Gets parent_path + * + * @return string|null + */ + public function getParentPath() + { + return $this->container['parent_path']; + } + + /** + * Sets parent_path + * + * @param string|null $parent_path parent_path + * + * @return self + */ + public function setParentPath($parent_path) + { + if (is_null($parent_path)) { + throw new \InvalidArgumentException('non-nullable parent_path cannot be null'); + } + $this->container['parent_path'] = $parent_path; + + return $this; + } + + /** + * Gets img_relative_path + * + * @return string|null + */ + public function getImgRelativePath() + { + return $this->container['img_relative_path']; + } + + /** + * Sets img_relative_path + * + * @param string|null $img_relative_path img_relative_path + * + * @return self + */ + public function setImgRelativePath($img_relative_path) + { + if (is_null($img_relative_path)) { + throw new \InvalidArgumentException('non-nullable img_relative_path cannot be null'); + } + $this->container['img_relative_path'] = $img_relative_path; + + return $this; + } + + /** + * Gets file_relative_path + * + * @return string|null + */ + public function getFileRelativePath() + { + return $this->container['file_relative_path']; + } + + /** + * Sets file_relative_path + * + * @param string|null $file_relative_path file_relative_path + * + * @return self + */ + public function setFileRelativePath($file_relative_path) + { + if (is_null($file_relative_path)) { + throw new \InvalidArgumentException('non-nullable file_relative_path cannot be null'); + } + $this->container['file_relative_path'] = $file_relative_path; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/User/GetBigDataOperationLogs200Response.php b/lib/User/GetBigDataOperationLogs200Response.php index 7d0f9ba5..79168550 100644 --- a/lib/User/GetBigDataOperationLogs200Response.php +++ b/lib/User/GetBigDataOperationLogs200Response.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -317,11 +317,11 @@ public function setOperations($operations) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -329,12 +329,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -359,11 +359,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/GetBigDataOperationLogs200ResponseOperationsInner.php b/lib/User/GetBigDataOperationLogs200ResponseOperationsInner.php index cb499976..574cb8a3 100644 --- a/lib/User/GetBigDataOperationLogs200ResponseOperationsInner.php +++ b/lib/User/GetBigDataOperationLogs200ResponseOperationsInner.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -453,11 +453,11 @@ public function setOperation($operation) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -465,12 +465,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -495,11 +495,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/GetBigDataOperationLogs200ResponseOperationsInnerOperation.php b/lib/User/GetBigDataOperationLogs200ResponseOperationsInnerOperation.php index 0742f96b..4b97f75a 100644 --- a/lib/User/GetBigDataOperationLogs200ResponseOperationsInnerOperation.php +++ b/lib/User/GetBigDataOperationLogs200ResponseOperationsInnerOperation.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -488,11 +488,11 @@ public function setRowData($row_data) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -500,12 +500,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -530,11 +530,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/GetCommonDataset200Response.php b/lib/User/GetCommonDataset200Response.php new file mode 100644 index 00000000..703aa64b --- /dev/null +++ b/lib/User/GetCommonDataset200Response.php @@ -0,0 +1,476 @@ + + */ +class GetCommonDataset200Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'getCommonDataset_200_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'rows' => 'object[]', + 'columns' => 'object[]', + 'related_user_list' => 'object[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'rows' => null, + 'columns' => null, + 'related_user_list' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'rows' => false, + 'columns' => false, + 'related_user_list' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'rows' => 'rows', + 'columns' => 'columns', + 'related_user_list' => 'related_user_list' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'rows' => 'setRows', + 'columns' => 'setColumns', + 'related_user_list' => 'setRelatedUserList' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'rows' => 'getRows', + 'columns' => 'getColumns', + 'related_user_list' => 'getRelatedUserList' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('rows', $data ?? [], null); + $this->setIfExists('columns', $data ?? [], null); + $this->setIfExists('related_user_list', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets rows + * + * @return object[]|null + */ + public function getRows() + { + return $this->container['rows']; + } + + /** + * Sets rows + * + * @param object[]|null $rows rows + * + * @return self + */ + public function setRows($rows) + { + if (is_null($rows)) { + throw new \InvalidArgumentException('non-nullable rows cannot be null'); + } + $this->container['rows'] = $rows; + + return $this; + } + + /** + * Gets columns + * + * @return object[]|null + */ + public function getColumns() + { + return $this->container['columns']; + } + + /** + * Sets columns + * + * @param object[]|null $columns columns + * + * @return self + */ + public function setColumns($columns) + { + if (is_null($columns)) { + throw new \InvalidArgumentException('non-nullable columns cannot be null'); + } + $this->container['columns'] = $columns; + + return $this; + } + + /** + * Gets related_user_list + * + * @return object[]|null + */ + public function getRelatedUserList() + { + return $this->container['related_user_list']; + } + + /** + * Sets related_user_list + * + * @param object[]|null $related_user_list related_user_list + * + * @return self + */ + public function setRelatedUserList($related_user_list) + { + if (is_null($related_user_list)) { + throw new \InvalidArgumentException('non-nullable related_user_list cannot be null'); + } + $this->container['related_user_list'] = $related_user_list; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/User/GetGroupMembers200ResponseInner.php b/lib/User/GetGroupMembers200ResponseInner.php new file mode 100644 index 00000000..b4d5b8f3 --- /dev/null +++ b/lib/User/GetGroupMembers200ResponseInner.php @@ -0,0 +1,578 @@ + + */ +class GetGroupMembers200ResponseInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'getGroupMembers_200_response_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'name' => 'string', + 'email' => 'string', + 'contact_email' => 'string', + 'is_admin' => 'int', + 'role' => 'string', + 'group_id' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'name' => null, + 'email' => null, + 'contact_email' => null, + 'is_admin' => null, + 'role' => null, + 'group_id' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'name' => false, + 'email' => false, + 'contact_email' => false, + 'is_admin' => false, + 'role' => false, + 'group_id' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name', + 'email' => 'email', + 'contact_email' => 'contact_email', + 'is_admin' => 'is_admin', + 'role' => 'role', + 'group_id' => 'group_id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'email' => 'setEmail', + 'contact_email' => 'setContactEmail', + 'is_admin' => 'setIsAdmin', + 'role' => 'setRole', + 'group_id' => 'setGroupId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'email' => 'getEmail', + 'contact_email' => 'getContactEmail', + 'is_admin' => 'getIsAdmin', + 'role' => 'getRole', + 'group_id' => 'getGroupId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('email', $data ?? [], null); + $this->setIfExists('contact_email', $data ?? [], null); + $this->setIfExists('is_admin', $data ?? [], null); + $this->setIfExists('role', $data ?? [], null); + $this->setIfExists('group_id', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets name + * + * @return string|null + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name name + * + * @return self + */ + public function setName($name) + { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets email + * + * @return string|null + */ + public function getEmail() + { + return $this->container['email']; + } + + /** + * Sets email + * + * @param string|null $email email + * + * @return self + */ + public function setEmail($email) + { + if (is_null($email)) { + throw new \InvalidArgumentException('non-nullable email cannot be null'); + } + $this->container['email'] = $email; + + return $this; + } + + /** + * Gets contact_email + * + * @return string|null + */ + public function getContactEmail() + { + return $this->container['contact_email']; + } + + /** + * Sets contact_email + * + * @param string|null $contact_email contact_email + * + * @return self + */ + public function setContactEmail($contact_email) + { + if (is_null($contact_email)) { + throw new \InvalidArgumentException('non-nullable contact_email cannot be null'); + } + $this->container['contact_email'] = $contact_email; + + return $this; + } + + /** + * Gets is_admin + * + * @return int|null + */ + public function getIsAdmin() + { + return $this->container['is_admin']; + } + + /** + * Sets is_admin + * + * @param int|null $is_admin is_admin + * + * @return self + */ + public function setIsAdmin($is_admin) + { + if (is_null($is_admin)) { + throw new \InvalidArgumentException('non-nullable is_admin cannot be null'); + } + $this->container['is_admin'] = $is_admin; + + return $this; + } + + /** + * Gets role + * + * @return string|null + */ + public function getRole() + { + return $this->container['role']; + } + + /** + * Sets role + * + * @param string|null $role role + * + * @return self + */ + public function setRole($role) + { + if (is_null($role)) { + throw new \InvalidArgumentException('non-nullable role cannot be null'); + } + $this->container['role'] = $role; + + return $this; + } + + /** + * Gets group_id + * + * @return int|null + */ + public function getGroupId() + { + return $this->container['group_id']; + } + + /** + * Sets group_id + * + * @param int|null $group_id group_id + * + * @return self + */ + public function setGroupId($group_id) + { + if (is_null($group_id)) { + throw new \InvalidArgumentException('non-nullable group_id cannot be null'); + } + $this->container['group_id'] = $group_id; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/User/GetPublicUserInfo200Response.php b/lib/User/GetPublicUserInfo200Response.php new file mode 100644 index 00000000..4ecfe8f9 --- /dev/null +++ b/lib/User/GetPublicUserInfo200Response.php @@ -0,0 +1,510 @@ + + */ +class GetPublicUserInfo200Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'getPublicUserInfo_200_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'email' => 'string', + 'name' => 'string', + 'avatar_url' => 'string', + 'contact_email' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'email' => null, + 'name' => null, + 'avatar_url' => null, + 'contact_email' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'email' => false, + 'name' => false, + 'avatar_url' => false, + 'contact_email' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'email' => 'email', + 'name' => 'name', + 'avatar_url' => 'avatar_url', + 'contact_email' => 'contact_email' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'email' => 'setEmail', + 'name' => 'setName', + 'avatar_url' => 'setAvatarUrl', + 'contact_email' => 'setContactEmail' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'email' => 'getEmail', + 'name' => 'getName', + 'avatar_url' => 'getAvatarUrl', + 'contact_email' => 'getContactEmail' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('email', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('avatar_url', $data ?? [], null); + $this->setIfExists('contact_email', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets email + * + * @return string|null + */ + public function getEmail() + { + return $this->container['email']; + } + + /** + * Sets email + * + * @param string|null $email email + * + * @return self + */ + public function setEmail($email) + { + if (is_null($email)) { + throw new \InvalidArgumentException('non-nullable email cannot be null'); + } + $this->container['email'] = $email; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name name + * + * @return self + */ + public function setName($name) + { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets avatar_url + * + * @return string|null + */ + public function getAvatarUrl() + { + return $this->container['avatar_url']; + } + + /** + * Sets avatar_url + * + * @param string|null $avatar_url avatar_url + * + * @return self + */ + public function setAvatarUrl($avatar_url) + { + if (is_null($avatar_url)) { + throw new \InvalidArgumentException('non-nullable avatar_url cannot be null'); + } + $this->container['avatar_url'] = $avatar_url; + + return $this; + } + + /** + * Gets contact_email + * + * @return string|null + */ + public function getContactEmail() + { + return $this->container['contact_email']; + } + + /** + * Sets contact_email + * + * @param string|null $contact_email contact_email + * + * @return self + */ + public function setContactEmail($contact_email) + { + if (is_null($contact_email)) { + throw new \InvalidArgumentException('non-nullable contact_email cannot be null'); + } + $this->container['contact_email'] = $contact_email; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/User/Greater.php b/lib/User/Greater.php index 0f61525b..061aeefe 100644 --- a/lib/User/Greater.php +++ b/lib/User/Greater.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -417,11 +417,11 @@ public function setFilterTerm($filter_term) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -429,12 +429,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -459,11 +459,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/GreaterOrEqual.php b/lib/User/GreaterOrEqual.php index 95e77a9a..1f37f6eb 100644 --- a/lib/User/GreaterOrEqual.php +++ b/lib/User/GreaterOrEqual.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -417,11 +417,11 @@ public function setFilterTerm($filter_term) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -429,12 +429,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -459,11 +459,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/GroupsWorkspacesApi.php b/lib/User/GroupsWorkspacesApi.php index 70b5e60a..c95822c0 100644 --- a/lib/User/GroupsWorkspacesApi.php +++ b/lib/User/GroupsWorkspacesApi.php @@ -14,7 +14,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -168,13 +168,13 @@ public function getConfig() * * Add Group Member * - * @param int $group_id group_id (required) + * @param int $group_id The ID of the group. (required) * @param \SeaTable\Client\User\AddGroupMemberRequest|null $add_group_member_request add_group_member_request (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['addGroupMember'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return object + * @return \SeaTable\Client\User\AddGroupMember201Response */ public function addGroupMember($group_id, $add_group_member_request = null, string $contentType = self::contentTypes['addGroupMember'][0]) { @@ -187,13 +187,13 @@ public function addGroupMember($group_id, $add_group_member_request = null, stri * * Add Group Member * - * @param int $group_id (required) + * @param int $group_id The ID of the group. (required) * @param \SeaTable\Client\User\AddGroupMemberRequest|null $add_group_member_request (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['addGroupMember'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) + * @return array of \SeaTable\Client\User\AddGroupMember201Response, HTTP status code, HTTP response headers (array of strings) */ public function addGroupMemberWithHttpInfo($group_id, $add_group_member_request = null, string $contentType = self::contentTypes['addGroupMember'][0]) { @@ -223,9 +223,9 @@ public function addGroupMemberWithHttpInfo($group_id, $add_group_member_request switch($statusCode) { - case 200: + case 201: return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\User\AddGroupMember201Response', $request, $response, ); @@ -247,16 +247,16 @@ public function addGroupMemberWithHttpInfo($group_id, $add_group_member_request } return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\User\AddGroupMember201Response', $request, $response, ); } catch (ApiException $e) { switch ($e->getCode()) { - case 200: + case 201: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - 'object', + '\SeaTable\Client\User\AddGroupMember201Response', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -273,7 +273,7 @@ public function addGroupMemberWithHttpInfo($group_id, $add_group_member_request * * Add Group Member * - * @param int $group_id (required) + * @param int $group_id The ID of the group. (required) * @param \SeaTable\Client\User\AddGroupMemberRequest|null $add_group_member_request (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['addGroupMember'] to see the possible values for this operation * @@ -295,7 +295,7 @@ function ($response) { * * Add Group Member * - * @param int $group_id (required) + * @param int $group_id The ID of the group. (required) * @param \SeaTable\Client\User\AddGroupMemberRequest|null $add_group_member_request (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['addGroupMember'] to see the possible values for this operation * @@ -304,7 +304,7 @@ function ($response) { */ public function addGroupMemberAsyncWithHttpInfo($group_id, $add_group_member_request = null, string $contentType = self::contentTypes['addGroupMember'][0]) { - $returnType = 'object'; + $returnType = '\SeaTable\Client\User\AddGroupMember201Response'; $request = $this->addGroupMemberRequest($group_id, $add_group_member_request, $contentType); return $this->client @@ -346,7 +346,7 @@ function ($exception) { /** * Create request for operation 'addGroupMember' * - * @param int $group_id (required) + * @param int $group_id The ID of the group. (required) * @param \SeaTable\Client\User\AddGroupMemberRequest|null $add_group_member_request (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['addGroupMember'] to see the possible values for this operation * @@ -1303,7 +1303,7 @@ public function createGroupRequest($create_group_request = null, string $content * * Delete Group * - * @param int $group_id group_id (required) + * @param int $group_id The ID of the group. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteGroup'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -1321,7 +1321,7 @@ public function deleteGroup($group_id, string $contentType = self::contentTypes[ * * Delete Group * - * @param int $group_id (required) + * @param int $group_id The ID of the group. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteGroup'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -1406,7 +1406,7 @@ public function deleteGroupWithHttpInfo($group_id, string $contentType = self::c * * Delete Group * - * @param int $group_id (required) + * @param int $group_id The ID of the group. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteGroup'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1427,7 +1427,7 @@ function ($response) { * * Delete Group * - * @param int $group_id (required) + * @param int $group_id The ID of the group. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteGroup'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1477,7 +1477,7 @@ function ($exception) { /** * Create request for operation 'deleteGroup' * - * @param int $group_id (required) + * @param int $group_id The ID of the group. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteGroup'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1578,7 +1578,7 @@ public function deleteGroupRequest($group_id, string $contentType = self::conten * * Get Group * - * @param int $group_id group_id (required) + * @param int $group_id The ID of the group. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getGroup'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -1596,7 +1596,7 @@ public function getGroup($group_id, string $contentType = self::contentTypes['ge * * Get Group * - * @param int $group_id (required) + * @param int $group_id The ID of the group. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getGroup'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -1681,7 +1681,7 @@ public function getGroupWithHttpInfo($group_id, string $contentType = self::cont * * Get Group * - * @param int $group_id (required) + * @param int $group_id The ID of the group. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getGroup'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1702,7 +1702,7 @@ function ($response) { * * Get Group * - * @param int $group_id (required) + * @param int $group_id The ID of the group. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getGroup'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1752,7 +1752,7 @@ function ($exception) { /** * Create request for operation 'getGroup' * - * @param int $group_id (required) + * @param int $group_id The ID of the group. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getGroup'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1853,12 +1853,12 @@ public function getGroupRequest($group_id, string $contentType = self::contentTy * * Get Group Members * - * @param int $group_id group_id (required) + * @param int $group_id The ID of the group. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getGroupMembers'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return object + * @return \SeaTable\Client\User\GetGroupMembers200ResponseInner[] */ public function getGroupMembers($group_id, string $contentType = self::contentTypes['getGroupMembers'][0]) { @@ -1871,12 +1871,12 @@ public function getGroupMembers($group_id, string $contentType = self::contentTy * * Get Group Members * - * @param int $group_id (required) + * @param int $group_id The ID of the group. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getGroupMembers'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) + * @return array of \SeaTable\Client\User\GetGroupMembers200ResponseInner[], HTTP status code, HTTP response headers (array of strings) */ public function getGroupMembersWithHttpInfo($group_id, string $contentType = self::contentTypes['getGroupMembers'][0]) { @@ -1908,7 +1908,7 @@ public function getGroupMembersWithHttpInfo($group_id, string $contentType = sel switch($statusCode) { case 200: return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\User\GetGroupMembers200ResponseInner[]', $request, $response, ); @@ -1930,7 +1930,7 @@ public function getGroupMembersWithHttpInfo($group_id, string $contentType = sel } return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\User\GetGroupMembers200ResponseInner[]', $request, $response, ); @@ -1939,7 +1939,7 @@ public function getGroupMembersWithHttpInfo($group_id, string $contentType = sel case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - 'object', + '\SeaTable\Client\User\GetGroupMembers200ResponseInner[]', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1956,7 +1956,7 @@ public function getGroupMembersWithHttpInfo($group_id, string $contentType = sel * * Get Group Members * - * @param int $group_id (required) + * @param int $group_id The ID of the group. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getGroupMembers'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1977,7 +1977,7 @@ function ($response) { * * Get Group Members * - * @param int $group_id (required) + * @param int $group_id The ID of the group. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getGroupMembers'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1985,7 +1985,7 @@ function ($response) { */ public function getGroupMembersAsyncWithHttpInfo($group_id, string $contentType = self::contentTypes['getGroupMembers'][0]) { - $returnType = 'object'; + $returnType = '\SeaTable\Client\User\GetGroupMembers200ResponseInner[]'; $request = $this->getGroupMembersRequest($group_id, $contentType); return $this->client @@ -2027,7 +2027,7 @@ function ($exception) { /** * Create request for operation 'getGroupMembers' * - * @param int $group_id (required) + * @param int $group_id The ID of the group. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getGroupMembers'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -2647,8 +2647,8 @@ public function listWorkspacesRequest($detail = null, string $contentType = self * * Remove Group Member * - * @param int $group_id group_id (required) - * @param string $group_member group_member (required) + * @param int $group_id The ID of the group. (required) + * @param string $group_member The unique user ID of the group member. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['removeGroupMember'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -2666,8 +2666,8 @@ public function removeGroupMember($group_id, $group_member, string $contentType * * Remove Group Member * - * @param int $group_id (required) - * @param string $group_member (required) + * @param int $group_id The ID of the group. (required) + * @param string $group_member The unique user ID of the group member. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['removeGroupMember'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -2752,8 +2752,8 @@ public function removeGroupMemberWithHttpInfo($group_id, $group_member, string $ * * Remove Group Member * - * @param int $group_id (required) - * @param string $group_member (required) + * @param int $group_id The ID of the group. (required) + * @param string $group_member The unique user ID of the group member. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['removeGroupMember'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -2774,8 +2774,8 @@ function ($response) { * * Remove Group Member * - * @param int $group_id (required) - * @param string $group_member (required) + * @param int $group_id The ID of the group. (required) + * @param string $group_member The unique user ID of the group member. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['removeGroupMember'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -2825,8 +2825,8 @@ function ($exception) { /** * Create request for operation 'removeGroupMember' * - * @param int $group_id (required) - * @param string $group_member (required) + * @param int $group_id The ID of the group. (required) + * @param string $group_member The unique user ID of the group member. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['removeGroupMember'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -2945,12 +2945,12 @@ public function removeGroupMemberRequest($group_id, $group_member, string $conte * * Search Group * - * @param string|null $q q (optional) + * @param string|null $q Search query string. Matches against group name. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['searchGroup'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return object + * @return \SeaTable\Client\User\SearchGroup200ResponseInner[] */ public function searchGroup($q = null, string $contentType = self::contentTypes['searchGroup'][0]) { @@ -2963,12 +2963,12 @@ public function searchGroup($q = null, string $contentType = self::contentTypes[ * * Search Group * - * @param string|null $q (optional) + * @param string|null $q Search query string. Matches against group name. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['searchGroup'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) + * @return array of \SeaTable\Client\User\SearchGroup200ResponseInner[], HTTP status code, HTTP response headers (array of strings) */ public function searchGroupWithHttpInfo($q = null, string $contentType = self::contentTypes['searchGroup'][0]) { @@ -3000,7 +3000,7 @@ public function searchGroupWithHttpInfo($q = null, string $contentType = self::c switch($statusCode) { case 200: return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\User\SearchGroup200ResponseInner[]', $request, $response, ); @@ -3022,7 +3022,7 @@ public function searchGroupWithHttpInfo($q = null, string $contentType = self::c } return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\User\SearchGroup200ResponseInner[]', $request, $response, ); @@ -3031,7 +3031,7 @@ public function searchGroupWithHttpInfo($q = null, string $contentType = self::c case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - 'object', + '\SeaTable\Client\User\SearchGroup200ResponseInner[]', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -3048,7 +3048,7 @@ public function searchGroupWithHttpInfo($q = null, string $contentType = self::c * * Search Group * - * @param string|null $q (optional) + * @param string|null $q Search query string. Matches against group name. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['searchGroup'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -3069,7 +3069,7 @@ function ($response) { * * Search Group * - * @param string|null $q (optional) + * @param string|null $q Search query string. Matches against group name. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['searchGroup'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -3077,7 +3077,7 @@ function ($response) { */ public function searchGroupAsyncWithHttpInfo($q = null, string $contentType = self::contentTypes['searchGroup'][0]) { - $returnType = 'object'; + $returnType = '\SeaTable\Client\User\SearchGroup200ResponseInner[]'; $request = $this->searchGroupRequest($q, $contentType); return $this->client @@ -3119,7 +3119,7 @@ function ($exception) { /** * Create request for operation 'searchGroup' * - * @param string|null $q (optional) + * @param string|null $q Search query string. Matches against group name. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['searchGroup'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -3212,8 +3212,8 @@ public function searchGroupRequest($q = null, string $contentType = self::conten * * Search Group Members * - * @param int $group_id group_id (required) - * @param string|null $q q (optional) + * @param int $group_id The ID of the group. (required) + * @param string|null $q Search query string. Matches against member name or email. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['searchGroupMembers'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -3231,8 +3231,8 @@ public function searchGroupMembers($group_id, $q = null, string $contentType = s * * Search Group Members * - * @param int $group_id (required) - * @param string|null $q (optional) + * @param int $group_id The ID of the group. (required) + * @param string|null $q Search query string. Matches against member name or email. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['searchGroupMembers'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -3317,8 +3317,8 @@ public function searchGroupMembersWithHttpInfo($group_id, $q = null, string $con * * Search Group Members * - * @param int $group_id (required) - * @param string|null $q (optional) + * @param int $group_id The ID of the group. (required) + * @param string|null $q Search query string. Matches against member name or email. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['searchGroupMembers'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -3339,8 +3339,8 @@ function ($response) { * * Search Group Members * - * @param int $group_id (required) - * @param string|null $q (optional) + * @param int $group_id The ID of the group. (required) + * @param string|null $q Search query string. Matches against member name or email. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['searchGroupMembers'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -3390,8 +3390,8 @@ function ($exception) { /** * Create request for operation 'searchGroupMembers' * - * @param int $group_id (required) - * @param string|null $q (optional) + * @param int $group_id The ID of the group. (required) + * @param string|null $q Search query string. Matches against member name or email. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['searchGroupMembers'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -3502,13 +3502,13 @@ public function searchGroupMembersRequest($group_id, $q = null, string $contentT * * Update Group * - * @param int $group_id group_id (required) + * @param int $group_id The ID of the group. (required) * @param \SeaTable\Client\User\UpdateGroupRequest|null $update_group_request update_group_request (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateGroup'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return object + * @return \SeaTable\Client\User\UpdateGroup200Response */ public function updateGroup($group_id, $update_group_request = null, string $contentType = self::contentTypes['updateGroup'][0]) { @@ -3521,13 +3521,13 @@ public function updateGroup($group_id, $update_group_request = null, string $con * * Update Group * - * @param int $group_id (required) + * @param int $group_id The ID of the group. (required) * @param \SeaTable\Client\User\UpdateGroupRequest|null $update_group_request (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateGroup'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) + * @return array of \SeaTable\Client\User\UpdateGroup200Response, HTTP status code, HTTP response headers (array of strings) */ public function updateGroupWithHttpInfo($group_id, $update_group_request = null, string $contentType = self::contentTypes['updateGroup'][0]) { @@ -3559,7 +3559,7 @@ public function updateGroupWithHttpInfo($group_id, $update_group_request = null, switch($statusCode) { case 200: return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\User\UpdateGroup200Response', $request, $response, ); @@ -3581,7 +3581,7 @@ public function updateGroupWithHttpInfo($group_id, $update_group_request = null, } return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\User\UpdateGroup200Response', $request, $response, ); @@ -3590,7 +3590,7 @@ public function updateGroupWithHttpInfo($group_id, $update_group_request = null, case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - 'object', + '\SeaTable\Client\User\UpdateGroup200Response', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -3607,7 +3607,7 @@ public function updateGroupWithHttpInfo($group_id, $update_group_request = null, * * Update Group * - * @param int $group_id (required) + * @param int $group_id The ID of the group. (required) * @param \SeaTable\Client\User\UpdateGroupRequest|null $update_group_request (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateGroup'] to see the possible values for this operation * @@ -3629,7 +3629,7 @@ function ($response) { * * Update Group * - * @param int $group_id (required) + * @param int $group_id The ID of the group. (required) * @param \SeaTable\Client\User\UpdateGroupRequest|null $update_group_request (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateGroup'] to see the possible values for this operation * @@ -3638,7 +3638,7 @@ function ($response) { */ public function updateGroupAsyncWithHttpInfo($group_id, $update_group_request = null, string $contentType = self::contentTypes['updateGroup'][0]) { - $returnType = 'object'; + $returnType = '\SeaTable\Client\User\UpdateGroup200Response'; $request = $this->updateGroupRequest($group_id, $update_group_request, $contentType); return $this->client @@ -3680,7 +3680,7 @@ function ($exception) { /** * Create request for operation 'updateGroup' * - * @param int $group_id (required) + * @param int $group_id The ID of the group. (required) * @param \SeaTable\Client\User\UpdateGroupRequest|null $update_group_request (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateGroup'] to see the possible values for this operation * @@ -3790,8 +3790,8 @@ public function updateGroupRequest($group_id, $update_group_request = null, stri * * Update Group Role * - * @param int $group_id group_id (required) - * @param string $group_member group_member (required) + * @param int $group_id The ID of the group. (required) + * @param string $group_member The unique user ID of the group member. (required) * @param \SeaTable\Client\User\UpdateGroupRoleRequest|null $update_group_role_request update_group_role_request (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateGroupRole'] to see the possible values for this operation * @@ -3810,8 +3810,8 @@ public function updateGroupRole($group_id, $group_member, $update_group_role_req * * Update Group Role * - * @param int $group_id (required) - * @param string $group_member (required) + * @param int $group_id The ID of the group. (required) + * @param string $group_member The unique user ID of the group member. (required) * @param \SeaTable\Client\User\UpdateGroupRoleRequest|null $update_group_role_request (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateGroupRole'] to see the possible values for this operation * @@ -3897,8 +3897,8 @@ public function updateGroupRoleWithHttpInfo($group_id, $group_member, $update_gr * * Update Group Role * - * @param int $group_id (required) - * @param string $group_member (required) + * @param int $group_id The ID of the group. (required) + * @param string $group_member The unique user ID of the group member. (required) * @param \SeaTable\Client\User\UpdateGroupRoleRequest|null $update_group_role_request (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateGroupRole'] to see the possible values for this operation * @@ -3920,8 +3920,8 @@ function ($response) { * * Update Group Role * - * @param int $group_id (required) - * @param string $group_member (required) + * @param int $group_id The ID of the group. (required) + * @param string $group_member The unique user ID of the group member. (required) * @param \SeaTable\Client\User\UpdateGroupRoleRequest|null $update_group_role_request (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateGroupRole'] to see the possible values for this operation * @@ -3972,8 +3972,8 @@ function ($exception) { /** * Create request for operation 'updateGroupRole' * - * @param int $group_id (required) - * @param string $group_member (required) + * @param int $group_id The ID of the group. (required) + * @param string $group_member The unique user ID of the group member. (required) * @param \SeaTable\Client\User\UpdateGroupRoleRequest|null $update_group_role_request (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateGroupRole'] to see the possible values for this operation * @@ -4112,6 +4112,14 @@ protected function createHttpClientOption() } } + if ($this->config->getCertFile()) { + $options[RequestOptions::CERT] = $this->config->getCertFile(); + } + + if ($this->config->getKeyFile()) { + $options[RequestOptions::SSL_KEY] = $this->config->getKeyFile(); + } + return $options; } diff --git a/lib/User/HasAllOf.php b/lib/User/HasAllOf.php index 674689ff..ea52e5a4 100644 --- a/lib/User/HasAllOf.php +++ b/lib/User/HasAllOf.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -417,11 +417,11 @@ public function setFilterTerm($filter_term) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -429,12 +429,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -459,11 +459,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/HasAnyOf.php b/lib/User/HasAnyOf.php index 4e092f61..996cdec1 100644 --- a/lib/User/HasAnyOf.php +++ b/lib/User/HasAnyOf.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -417,11 +417,11 @@ public function setFilterTerm($filter_term) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -429,12 +429,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -459,11 +459,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/HasNoneOf.php b/lib/User/HasNoneOf.php index e507f23c..7531ea3a 100644 --- a/lib/User/HasNoneOf.php +++ b/lib/User/HasNoneOf.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -417,11 +417,11 @@ public function setFilterTerm($filter_term) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -429,12 +429,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -459,11 +459,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/ImportBasefromDTableFile200Response.php b/lib/User/ImportBasefromDTableFile200Response.php index c9da8f53..ffbd91f4 100644 --- a/lib/User/ImportBasefromDTableFile200Response.php +++ b/lib/User/ImportBasefromDTableFile200Response.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -351,11 +351,11 @@ public function setTable($table) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -363,12 +363,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -393,11 +393,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/ImportBasefromDTableFile200ResponseTable.php b/lib/User/ImportBasefromDTableFile200ResponseTable.php index f28067f7..1151d568 100644 --- a/lib/User/ImportBasefromDTableFile200ResponseTable.php +++ b/lib/User/ImportBasefromDTableFile200ResponseTable.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -678,11 +678,11 @@ public function setInStorage($in_storage) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -690,12 +690,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -720,11 +720,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/ImportExportApi.php b/lib/User/ImportExportApi.php index 1e9435d8..0cc149c1 100644 --- a/lib/User/ImportExportApi.php +++ b/lib/User/ImportExportApi.php @@ -14,7 +14,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -461,7 +461,7 @@ public function appendToTableFromFileRequest($workspace_id, $file = null, $dtabl * * Export Base * - * @param string $dtable_name dtable_name (required) + * @param string $dtable_name The name of the base to search for. (required) * @param int $workspace_id id of your workspace. (required) * @param string|null $password The password of your Base. (optional) * @param bool|null $ignore_asset Set this to `true` to export the base without assets. Default is `false`. (optional) @@ -481,7 +481,7 @@ public function exportBase($dtable_name, $workspace_id, $password = null, $ignor * * Export Base * - * @param string $dtable_name (required) + * @param string $dtable_name The name of the base to search for. (required) * @param int $workspace_id id of your workspace. (required) * @param string|null $password The password of your Base. (optional) * @param bool|null $ignore_asset Set this to `true` to export the base without assets. Default is `false`. (optional) @@ -533,7 +533,7 @@ public function exportBaseWithHttpInfo($dtable_name, $workspace_id, $password = * * Export Base * - * @param string $dtable_name (required) + * @param string $dtable_name The name of the base to search for. (required) * @param int $workspace_id id of your workspace. (required) * @param string|null $password The password of your Base. (optional) * @param bool|null $ignore_asset Set this to `true` to export the base without assets. Default is `false`. (optional) @@ -557,7 +557,7 @@ function ($response) { * * Export Base * - * @param string $dtable_name (required) + * @param string $dtable_name The name of the base to search for. (required) * @param int $workspace_id id of your workspace. (required) * @param string|null $password The password of your Base. (optional) * @param bool|null $ignore_asset Set this to `true` to export the base without assets. Default is `false`. (optional) @@ -597,7 +597,7 @@ function ($exception) { /** * Create request for operation 'exportBase' * - * @param string $dtable_name (required) + * @param string $dtable_name The name of the base to search for. (required) * @param int $workspace_id id of your workspace. (required) * @param string|null $password The password of your Base. (optional) * @param bool|null $ignore_asset Set this to `true` to export the base without assets. Default is `false`. (optional) @@ -737,7 +737,7 @@ public function exportBaseRequest($dtable_name, $workspace_id, $password = null, * * Export Base from External Link * - * @param string $external_link_token external_link_token (required) + * @param string $external_link_token The token of the external link. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['exportBaseFromExternalLink'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -754,7 +754,7 @@ public function exportBaseFromExternalLink($external_link_token, string $content * * Export Base from External Link * - * @param string $external_link_token (required) + * @param string $external_link_token The token of the external link. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['exportBaseFromExternalLink'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -803,7 +803,7 @@ public function exportBaseFromExternalLinkWithHttpInfo($external_link_token, str * * Export Base from External Link * - * @param string $external_link_token (required) + * @param string $external_link_token The token of the external link. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['exportBaseFromExternalLink'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -824,7 +824,7 @@ function ($response) { * * Export Base from External Link * - * @param string $external_link_token (required) + * @param string $external_link_token The token of the external link. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['exportBaseFromExternalLink'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -861,7 +861,7 @@ function ($exception) { /** * Create request for operation 'exportBaseFromExternalLink' * - * @param string $external_link_token (required) + * @param string $external_link_token The token of the external link. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['exportBaseFromExternalLink'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1250,7 +1250,7 @@ public function exportBigDataViewRequest($workspace_id, $base_name, $table_id, $ * * @param string $table_id The id of the table. The id of a table is unique inside a base and is often used to identify a table. **Important: the table_id is not the table_name**. (required) * @param string $table_name The name of the table. (required) - * @param string $dtable_name dtable_name (required) + * @param string $dtable_name The name of the base to search for. (required) * @param int $workspace_id id of your workspace. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['exportTable'] to see the possible values for this operation * @@ -1270,7 +1270,7 @@ public function exportTable($table_id, $table_name, $dtable_name, $workspace_id, * * @param string $table_id The id of the table. The id of a table is unique inside a base and is often used to identify a table. **Important: the table_id is not the table_name**. (required) * @param string $table_name The name of the table. (required) - * @param string $dtable_name (required) + * @param string $dtable_name The name of the base to search for. (required) * @param int $workspace_id id of your workspace. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['exportTable'] to see the possible values for this operation * @@ -1322,7 +1322,7 @@ public function exportTableWithHttpInfo($table_id, $table_name, $dtable_name, $w * * @param string $table_id The id of the table. The id of a table is unique inside a base and is often used to identify a table. **Important: the table_id is not the table_name**. (required) * @param string $table_name The name of the table. (required) - * @param string $dtable_name (required) + * @param string $dtable_name The name of the base to search for. (required) * @param int $workspace_id id of your workspace. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['exportTable'] to see the possible values for this operation * @@ -1346,7 +1346,7 @@ function ($response) { * * @param string $table_id The id of the table. The id of a table is unique inside a base and is often used to identify a table. **Important: the table_id is not the table_name**. (required) * @param string $table_name The name of the table. (required) - * @param string $dtable_name (required) + * @param string $dtable_name The name of the base to search for. (required) * @param int $workspace_id id of your workspace. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['exportTable'] to see the possible values for this operation * @@ -1386,7 +1386,7 @@ function ($exception) { * * @param string $table_id The id of the table. The id of a table is unique inside a base and is often used to identify a table. **Important: the table_id is not the table_name**. (required) * @param string $table_name The name of the table. (required) - * @param string $dtable_name (required) + * @param string $dtable_name The name of the base to search for. (required) * @param int $workspace_id id of your workspace. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['exportTable'] to see the possible values for this operation * @@ -1541,7 +1541,7 @@ public function exportTableRequest($table_id, $table_name, $dtable_name, $worksp * * @param string $table_id The id of the table. The id of a table is unique inside a base and is often used to identify a table. **Important: the table_id is not the table_name**. (required) * @param string $table_name The name of the table. (required) - * @param string $dtable_name dtable_name (required) + * @param string $dtable_name The name of the base to search for. (required) * @param string $view_id id of view, string (required) * @param string $view_name name of view, required, string (required) * @param int $workspace_id id of your workspace. (required) @@ -1563,7 +1563,7 @@ public function exportView($table_id, $table_name, $dtable_name, $view_id, $view * * @param string $table_id The id of the table. The id of a table is unique inside a base and is often used to identify a table. **Important: the table_id is not the table_name**. (required) * @param string $table_name The name of the table. (required) - * @param string $dtable_name (required) + * @param string $dtable_name The name of the base to search for. (required) * @param string $view_id id of view, string (required) * @param string $view_name name of view, required, string (required) * @param int $workspace_id id of your workspace. (required) @@ -1617,7 +1617,7 @@ public function exportViewWithHttpInfo($table_id, $table_name, $dtable_name, $vi * * @param string $table_id The id of the table. The id of a table is unique inside a base and is often used to identify a table. **Important: the table_id is not the table_name**. (required) * @param string $table_name The name of the table. (required) - * @param string $dtable_name (required) + * @param string $dtable_name The name of the base to search for. (required) * @param string $view_id id of view, string (required) * @param string $view_name name of view, required, string (required) * @param int $workspace_id id of your workspace. (required) @@ -1643,7 +1643,7 @@ function ($response) { * * @param string $table_id The id of the table. The id of a table is unique inside a base and is often used to identify a table. **Important: the table_id is not the table_name**. (required) * @param string $table_name The name of the table. (required) - * @param string $dtable_name (required) + * @param string $dtable_name The name of the base to search for. (required) * @param string $view_id id of view, string (required) * @param string $view_name name of view, required, string (required) * @param int $workspace_id id of your workspace. (required) @@ -1685,7 +1685,7 @@ function ($exception) { * * @param string $table_id The id of the table. The id of a table is unique inside a base and is often used to identify a table. **Important: the table_id is not the table_name**. (required) * @param string $table_name The name of the table. (required) - * @param string $dtable_name (required) + * @param string $dtable_name The name of the base to search for. (required) * @param string $view_id id of view, string (required) * @param string $view_name name of view, required, string (required) * @param int $workspace_id id of your workspace. (required) @@ -2760,7 +2760,7 @@ public function importTableFromFileRequest($workspace_id, $file = null, $dtable_ /** * Operation updateFromFile * - * Update from xlsx or csv + * Update from XLSX or CSV * * @param int $workspace_id id of your workspace. (required) * @param \SplFileObject $file file (required) @@ -2782,7 +2782,7 @@ public function updateFromFile($workspace_id, $file, $dtable_uuid, $table_name, /** * Operation updateFromFileWithHttpInfo * - * Update from xlsx or csv + * Update from XLSX or CSV * * @param int $workspace_id id of your workspace. (required) * @param \SplFileObject $file (required) @@ -2871,7 +2871,7 @@ public function updateFromFileWithHttpInfo($workspace_id, $file, $dtable_uuid, $ /** * Operation updateFromFileAsync * - * Update from xlsx or csv + * Update from XLSX or CSV * * @param int $workspace_id id of your workspace. (required) * @param \SplFileObject $file (required) @@ -2896,7 +2896,7 @@ function ($response) { /** * Operation updateFromFileAsyncWithHttpInfo * - * Update from xlsx or csv + * Update from XLSX or CSV * * @param int $workspace_id id of your workspace. (required) * @param \SplFileObject $file (required) @@ -3109,6 +3109,14 @@ protected function createHttpClientOption() } } + if ($this->config->getCertFile()) { + $options[RequestOptions::CERT] = $this->config->getCertFile(); + } + + if ($this->config->getKeyFile()) { + $options[RequestOptions::SSL_KEY] = $this->config->getKeyFile(); + } + return $options; } diff --git a/lib/User/ImportUsersToAppRequest.php b/lib/User/ImportUsersToAppRequest.php index 08c3efc2..c363a524 100644 --- a/lib/User/ImportUsersToAppRequest.php +++ b/lib/User/ImportUsersToAppRequest.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -317,11 +317,11 @@ public function setUsersInfo($users_info) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -329,12 +329,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -359,11 +359,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/IncludeMe.php b/lib/User/IncludeMe.php index 1a5e9039..7b75f458 100644 --- a/lib/User/IncludeMe.php +++ b/lib/User/IncludeMe.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -417,11 +417,11 @@ public function setFilterTerm($filter_term) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -429,12 +429,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -459,11 +459,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/Is.php b/lib/User/Is.php index 3543dec9..3a7e71df 100644 --- a/lib/User/Is.php +++ b/lib/User/Is.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -417,11 +417,11 @@ public function setFilterTerm($filter_term) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -429,12 +429,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -459,11 +459,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/IsAdmin.php b/lib/User/IsAdmin.php index 2fe6373b..c4d7bfc9 100644 --- a/lib/User/IsAdmin.php +++ b/lib/User/IsAdmin.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ diff --git a/lib/User/IsAnyOf.php b/lib/User/IsAnyOf.php index c31a1aa6..88b70dd6 100644 --- a/lib/User/IsAnyOf.php +++ b/lib/User/IsAnyOf.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -417,11 +417,11 @@ public function setFilterTerm($filter_term) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -429,12 +429,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -459,11 +459,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/IsCurrentUserID.php b/lib/User/IsCurrentUserID.php index 570775b9..f1572882 100644 --- a/lib/User/IsCurrentUserID.php +++ b/lib/User/IsCurrentUserID.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -417,11 +417,11 @@ public function setFilterTerm($filter_term) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -429,12 +429,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -459,11 +459,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/IsEmpty.php b/lib/User/IsEmpty.php index af058803..2c84fbe7 100644 --- a/lib/User/IsEmpty.php +++ b/lib/User/IsEmpty.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -417,11 +417,11 @@ public function setFilterTerm($filter_term) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -429,12 +429,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -459,11 +459,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/IsExactly.php b/lib/User/IsExactly.php index bc2651da..2befbb26 100644 --- a/lib/User/IsExactly.php +++ b/lib/User/IsExactly.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -417,11 +417,11 @@ public function setFilterTerm($filter_term) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -429,12 +429,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -459,11 +459,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/IsInactive.php b/lib/User/IsInactive.php index e239616c..a454b2b0 100644 --- a/lib/User/IsInactive.php +++ b/lib/User/IsInactive.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -320,11 +320,11 @@ public function setIsInactive($is_inactive) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -332,12 +332,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -362,11 +362,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/IsNoneOf.php b/lib/User/IsNoneOf.php index a2eb8c5a..ece3f9d5 100644 --- a/lib/User/IsNoneOf.php +++ b/lib/User/IsNoneOf.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -417,11 +417,11 @@ public function setFilterTerm($filter_term) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -429,12 +429,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -459,11 +459,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/IsNot.php b/lib/User/IsNot.php index f9c4c5b7..7f6a5aba 100644 --- a/lib/User/IsNot.php +++ b/lib/User/IsNot.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -417,11 +417,11 @@ public function setFilterTerm($filter_term) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -429,12 +429,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -459,11 +459,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/IsNotEmpty.php b/lib/User/IsNotEmpty.php index 13c593b6..7e63ef90 100644 --- a/lib/User/IsNotEmpty.php +++ b/lib/User/IsNotEmpty.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -417,11 +417,11 @@ public function setFilterTerm($filter_term) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -429,12 +429,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -459,11 +459,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/IsWithinTheNextMonth.php b/lib/User/IsWithinTheNextMonth.php index b60ac4fa..8a411c22 100644 --- a/lib/User/IsWithinTheNextMonth.php +++ b/lib/User/IsWithinTheNextMonth.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -483,11 +483,11 @@ public function setFilterTermModifier($filter_term_modifier) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -495,12 +495,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -525,11 +525,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/IsWithinTheNextNumberOfDays.php b/lib/User/IsWithinTheNextNumberOfDays.php index e05ceecf..59d0cf2c 100644 --- a/lib/User/IsWithinTheNextNumberOfDays.php +++ b/lib/User/IsWithinTheNextNumberOfDays.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -483,11 +483,11 @@ public function setFilterTermModifier($filter_term_modifier) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -495,12 +495,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -525,11 +525,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/IsWithinTheNextWeek.php b/lib/User/IsWithinTheNextWeek.php index d254e850..272d13ba 100644 --- a/lib/User/IsWithinTheNextWeek.php +++ b/lib/User/IsWithinTheNextWeek.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -483,11 +483,11 @@ public function setFilterTermModifier($filter_term_modifier) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -495,12 +495,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -525,11 +525,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/IsWithinTheNextYear.php b/lib/User/IsWithinTheNextYear.php index 045aca79..2af1ae5b 100644 --- a/lib/User/IsWithinTheNextYear.php +++ b/lib/User/IsWithinTheNextYear.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -483,11 +483,11 @@ public function setFilterTermModifier($filter_term_modifier) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -495,12 +495,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -525,11 +525,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/IsWithinThePastMonth.php b/lib/User/IsWithinThePastMonth.php index 744a5754..68f7cc6c 100644 --- a/lib/User/IsWithinThePastMonth.php +++ b/lib/User/IsWithinThePastMonth.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -483,11 +483,11 @@ public function setFilterTermModifier($filter_term_modifier) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -495,12 +495,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -525,11 +525,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/IsWithinThePastNumberOfDays.php b/lib/User/IsWithinThePastNumberOfDays.php index 5f80af18..26a6423a 100644 --- a/lib/User/IsWithinThePastNumberOfDays.php +++ b/lib/User/IsWithinThePastNumberOfDays.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -483,11 +483,11 @@ public function setFilterTermModifier($filter_term_modifier) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -495,12 +495,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -525,11 +525,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/IsWithinThePastWeek.php b/lib/User/IsWithinThePastWeek.php index a9d417a9..595c0ced 100644 --- a/lib/User/IsWithinThePastWeek.php +++ b/lib/User/IsWithinThePastWeek.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -483,11 +483,11 @@ public function setFilterTermModifier($filter_term_modifier) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -495,12 +495,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -525,11 +525,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/IsWithinThePastYear.php b/lib/User/IsWithinThePastYear.php index 0eaaa612..b9c0a680 100644 --- a/lib/User/IsWithinThePastYear.php +++ b/lib/User/IsWithinThePastYear.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -483,11 +483,11 @@ public function setFilterTermModifier($filter_term_modifier) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -495,12 +495,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -525,11 +525,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/IsWithinThisMonth.php b/lib/User/IsWithinThisMonth.php index 903e5ab3..c6da7619 100644 --- a/lib/User/IsWithinThisMonth.php +++ b/lib/User/IsWithinThisMonth.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -483,11 +483,11 @@ public function setFilterTermModifier($filter_term_modifier) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -495,12 +495,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -525,11 +525,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/IsWithinThisWeek.php b/lib/User/IsWithinThisWeek.php index 0e89b98c..01ad5132 100644 --- a/lib/User/IsWithinThisWeek.php +++ b/lib/User/IsWithinThisWeek.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -483,11 +483,11 @@ public function setFilterTermModifier($filter_term_modifier) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -495,12 +495,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -525,11 +525,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/IsWithinThisYear.php b/lib/User/IsWithinThisYear.php index 5a26f24f..90e9d55a 100644 --- a/lib/User/IsWithinThisYear.php +++ b/lib/User/IsWithinThisYear.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -483,11 +483,11 @@ public function setFilterTermModifier($filter_term_modifier) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -495,12 +495,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -525,11 +525,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/Less.php b/lib/User/Less.php index cf4f6c73..57c3518b 100644 --- a/lib/User/Less.php +++ b/lib/User/Less.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -417,11 +417,11 @@ public function setFilterTerm($filter_term) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -429,12 +429,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -459,11 +459,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/LessOrEqual.php b/lib/User/LessOrEqual.php index 90520f7c..e97a6bed 100644 --- a/lib/User/LessOrEqual.php +++ b/lib/User/LessOrEqual.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -417,11 +417,11 @@ public function setFilterTerm($filter_term) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -429,12 +429,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -459,11 +459,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/ListPublicUserInfosRequest.php b/lib/User/ListPublicUserInfosRequest.php index 3458e3da..f40880e5 100644 --- a/lib/User/ListPublicUserInfosRequest.php +++ b/lib/User/ListPublicUserInfosRequest.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -317,11 +317,11 @@ public function setUserIdList($user_id_list) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -329,12 +329,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -359,11 +359,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/MaintenanceApi.php b/lib/User/MaintenanceApi.php index 29e575cd..18bb710a 100644 --- a/lib/User/MaintenanceApi.php +++ b/lib/User/MaintenanceApi.php @@ -14,7 +14,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -415,6 +415,14 @@ protected function createHttpClientOption() } } + if ($this->config->getCertFile()) { + $options[RequestOptions::CERT] = $this->config->getCertFile(); + } + + if ($this->config->getKeyFile()) { + $options[RequestOptions::SSL_KEY] = $this->config->getKeyFile(); + } + return $options; } diff --git a/lib/User/ModelInterface.php b/lib/User/ModelInterface.php index b981eb53..9597596a 100644 --- a/lib/User/ModelInterface.php +++ b/lib/User/ModelInterface.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ diff --git a/lib/User/ModifyPassword.php b/lib/User/ModifyPassword.php index e160e21b..2fd55655 100644 --- a/lib/User/ModifyPassword.php +++ b/lib/User/ModifyPassword.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -451,11 +451,11 @@ public function setNewPassword($new_password) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -463,12 +463,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -493,11 +493,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/NotEqual.php b/lib/User/NotEqual.php index d0ac1eb9..3c75da00 100644 --- a/lib/User/NotEqual.php +++ b/lib/User/NotEqual.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -417,11 +417,11 @@ public function setFilterTerm($filter_term) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -429,12 +429,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -459,11 +459,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/NotificationsApi.php b/lib/User/NotificationsApi.php index 08c3ba85..f360b5e4 100644 --- a/lib/User/NotificationsApi.php +++ b/lib/User/NotificationsApi.php @@ -14,7 +14,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -148,7 +148,7 @@ public function getConfig() * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return object + * @return \SeaTable\Client\User\AddNotificationRule200Response */ public function addNotificationRule($workspace_id, $base_name, $add_notification_rule_request, string $contentType = self::contentTypes['addNotificationRule'][0]) { @@ -168,7 +168,7 @@ public function addNotificationRule($workspace_id, $base_name, $add_notification * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) + * @return array of \SeaTable\Client\User\AddNotificationRule200Response, HTTP status code, HTTP response headers (array of strings) */ public function addNotificationRuleWithHttpInfo($workspace_id, $base_name, $add_notification_rule_request, string $contentType = self::contentTypes['addNotificationRule'][0]) { @@ -200,7 +200,7 @@ public function addNotificationRuleWithHttpInfo($workspace_id, $base_name, $add_ switch($statusCode) { case 200: return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\User\AddNotificationRule200Response', $request, $response, ); @@ -222,7 +222,7 @@ public function addNotificationRuleWithHttpInfo($workspace_id, $base_name, $add_ } return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\User\AddNotificationRule200Response', $request, $response, ); @@ -231,7 +231,7 @@ public function addNotificationRuleWithHttpInfo($workspace_id, $base_name, $add_ case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - 'object', + '\SeaTable\Client\User\AddNotificationRule200Response', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -281,7 +281,7 @@ function ($response) { */ public function addNotificationRuleAsyncWithHttpInfo($workspace_id, $base_name, $add_notification_rule_request, string $contentType = self::contentTypes['addNotificationRule'][0]) { - $returnType = 'object'; + $returnType = '\SeaTable\Client\User\AddNotificationRule200Response'; $request = $this->addNotificationRuleRequest($workspace_id, $base_name, $add_notification_rule_request, $contentType); return $this->client @@ -457,7 +457,7 @@ public function addNotificationRuleRequest($workspace_id, $base_name, $add_notif * * @param int $workspace_id id of your workspace. (required) * @param string $base_name name of your base. (required) - * @param string $notification_rule_id notification_rule_id (required) + * @param string $notification_rule_id The ID of the notification rule. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteNotificationRule'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -477,7 +477,7 @@ public function deleteNotificationRule($workspace_id, $base_name, $notification_ * * @param int $workspace_id id of your workspace. (required) * @param string $base_name name of your base. (required) - * @param string $notification_rule_id (required) + * @param string $notification_rule_id The ID of the notification rule. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteNotificationRule'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -564,7 +564,7 @@ public function deleteNotificationRuleWithHttpInfo($workspace_id, $base_name, $n * * @param int $workspace_id id of your workspace. (required) * @param string $base_name name of your base. (required) - * @param string $notification_rule_id (required) + * @param string $notification_rule_id The ID of the notification rule. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteNotificationRule'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -587,7 +587,7 @@ function ($response) { * * @param int $workspace_id id of your workspace. (required) * @param string $base_name name of your base. (required) - * @param string $notification_rule_id (required) + * @param string $notification_rule_id The ID of the notification rule. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteNotificationRule'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -639,7 +639,7 @@ function ($exception) { * * @param int $workspace_id id of your workspace. (required) * @param string $base_name name of your base. (required) - * @param string $notification_rule_id (required) + * @param string $notification_rule_id The ID of the notification rule. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteNotificationRule'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1319,13 +1319,13 @@ public function markNotificationAsSeenRequest(string $contentType = self::conten * * @param int $workspace_id id of your workspace. (required) * @param string $base_name name of your base. (required) - * @param string $notification_rule_id notification_rule_id (required) + * @param string $notification_rule_id The ID of the notification rule. (required) * @param \SeaTable\Client\User\UpdateNotificationRuleRequest|null $update_notification_rule_request update_notification_rule_request (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateNotificationRule'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return object + * @return \SeaTable\Client\User\AddNotificationRule200Response */ public function updateNotificationRule($workspace_id, $base_name, $notification_rule_id, $update_notification_rule_request = null, string $contentType = self::contentTypes['updateNotificationRule'][0]) { @@ -1340,13 +1340,13 @@ public function updateNotificationRule($workspace_id, $base_name, $notification_ * * @param int $workspace_id id of your workspace. (required) * @param string $base_name name of your base. (required) - * @param string $notification_rule_id (required) + * @param string $notification_rule_id The ID of the notification rule. (required) * @param \SeaTable\Client\User\UpdateNotificationRuleRequest|null $update_notification_rule_request (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateNotificationRule'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) + * @return array of \SeaTable\Client\User\AddNotificationRule200Response, HTTP status code, HTTP response headers (array of strings) */ public function updateNotificationRuleWithHttpInfo($workspace_id, $base_name, $notification_rule_id, $update_notification_rule_request = null, string $contentType = self::contentTypes['updateNotificationRule'][0]) { @@ -1378,7 +1378,7 @@ public function updateNotificationRuleWithHttpInfo($workspace_id, $base_name, $n switch($statusCode) { case 200: return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\User\AddNotificationRule200Response', $request, $response, ); @@ -1400,7 +1400,7 @@ public function updateNotificationRuleWithHttpInfo($workspace_id, $base_name, $n } return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\User\AddNotificationRule200Response', $request, $response, ); @@ -1409,7 +1409,7 @@ public function updateNotificationRuleWithHttpInfo($workspace_id, $base_name, $n case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - 'object', + '\SeaTable\Client\User\AddNotificationRule200Response', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1428,7 +1428,7 @@ public function updateNotificationRuleWithHttpInfo($workspace_id, $base_name, $n * * @param int $workspace_id id of your workspace. (required) * @param string $base_name name of your base. (required) - * @param string $notification_rule_id (required) + * @param string $notification_rule_id The ID of the notification rule. (required) * @param \SeaTable\Client\User\UpdateNotificationRuleRequest|null $update_notification_rule_request (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateNotificationRule'] to see the possible values for this operation * @@ -1452,7 +1452,7 @@ function ($response) { * * @param int $workspace_id id of your workspace. (required) * @param string $base_name name of your base. (required) - * @param string $notification_rule_id (required) + * @param string $notification_rule_id The ID of the notification rule. (required) * @param \SeaTable\Client\User\UpdateNotificationRuleRequest|null $update_notification_rule_request (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateNotificationRule'] to see the possible values for this operation * @@ -1461,7 +1461,7 @@ function ($response) { */ public function updateNotificationRuleAsyncWithHttpInfo($workspace_id, $base_name, $notification_rule_id, $update_notification_rule_request = null, string $contentType = self::contentTypes['updateNotificationRule'][0]) { - $returnType = 'object'; + $returnType = '\SeaTable\Client\User\AddNotificationRule200Response'; $request = $this->updateNotificationRuleRequest($workspace_id, $base_name, $notification_rule_id, $update_notification_rule_request, $contentType); return $this->client @@ -1505,7 +1505,7 @@ function ($exception) { * * @param int $workspace_id id of your workspace. (required) * @param string $base_name name of your base. (required) - * @param string $notification_rule_id (required) + * @param string $notification_rule_id The ID of the notification rule. (required) * @param \SeaTable\Client\User\UpdateNotificationRuleRequest|null $update_notification_rule_request (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateNotificationRule'] to see the possible values for this operation * @@ -1656,6 +1656,14 @@ protected function createHttpClientOption() } } + if ($this->config->getCertFile()) { + $options[RequestOptions::CERT] = $this->config->getCertFile(); + } + + if ($this->config->getKeyFile()) { + $options[RequestOptions::SSL_KEY] = $this->config->getKeyFile(); + } + return $options; } diff --git a/lib/User/PublishCommonDataset200Response.php b/lib/User/PublishCommonDataset200Response.php new file mode 100644 index 00000000..3ac3fe41 --- /dev/null +++ b/lib/User/PublishCommonDataset200Response.php @@ -0,0 +1,680 @@ + + */ +class PublishCommonDataset200Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'publishCommonDataset_200_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'id' => 'int', + 'org_id' => 'int', + 'group_id' => 'int', + 'dtable_uuid' => 'string', + 'table_id' => 'string', + 'view_id' => 'string', + 'created_at' => 'string', + 'creator' => 'string', + 'dataset_name' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'id' => null, + 'org_id' => null, + 'group_id' => null, + 'dtable_uuid' => null, + 'table_id' => null, + 'view_id' => null, + 'created_at' => null, + 'creator' => null, + 'dataset_name' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'id' => false, + 'org_id' => false, + 'group_id' => false, + 'dtable_uuid' => false, + 'table_id' => false, + 'view_id' => false, + 'created_at' => false, + 'creator' => false, + 'dataset_name' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'org_id' => 'org_id', + 'group_id' => 'group_id', + 'dtable_uuid' => 'dtable_uuid', + 'table_id' => 'table_id', + 'view_id' => 'view_id', + 'created_at' => 'created_at', + 'creator' => 'creator', + 'dataset_name' => 'dataset_name' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'org_id' => 'setOrgId', + 'group_id' => 'setGroupId', + 'dtable_uuid' => 'setDtableUuid', + 'table_id' => 'setTableId', + 'view_id' => 'setViewId', + 'created_at' => 'setCreatedAt', + 'creator' => 'setCreator', + 'dataset_name' => 'setDatasetName' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'org_id' => 'getOrgId', + 'group_id' => 'getGroupId', + 'dtable_uuid' => 'getDtableUuid', + 'table_id' => 'getTableId', + 'view_id' => 'getViewId', + 'created_at' => 'getCreatedAt', + 'creator' => 'getCreator', + 'dataset_name' => 'getDatasetName' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('org_id', $data ?? [], null); + $this->setIfExists('group_id', $data ?? [], null); + $this->setIfExists('dtable_uuid', $data ?? [], null); + $this->setIfExists('table_id', $data ?? [], null); + $this->setIfExists('view_id', $data ?? [], null); + $this->setIfExists('created_at', $data ?? [], null); + $this->setIfExists('creator', $data ?? [], null); + $this->setIfExists('dataset_name', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return int|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int|null $id id + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets org_id + * + * @return int|null + */ + public function getOrgId() + { + return $this->container['org_id']; + } + + /** + * Sets org_id + * + * @param int|null $org_id org_id + * + * @return self + */ + public function setOrgId($org_id) + { + if (is_null($org_id)) { + throw new \InvalidArgumentException('non-nullable org_id cannot be null'); + } + $this->container['org_id'] = $org_id; + + return $this; + } + + /** + * Gets group_id + * + * @return int|null + */ + public function getGroupId() + { + return $this->container['group_id']; + } + + /** + * Sets group_id + * + * @param int|null $group_id group_id + * + * @return self + */ + public function setGroupId($group_id) + { + if (is_null($group_id)) { + throw new \InvalidArgumentException('non-nullable group_id cannot be null'); + } + $this->container['group_id'] = $group_id; + + return $this; + } + + /** + * Gets dtable_uuid + * + * @return string|null + */ + public function getDtableUuid() + { + return $this->container['dtable_uuid']; + } + + /** + * Sets dtable_uuid + * + * @param string|null $dtable_uuid dtable_uuid + * + * @return self + */ + public function setDtableUuid($dtable_uuid) + { + if (is_null($dtable_uuid)) { + throw new \InvalidArgumentException('non-nullable dtable_uuid cannot be null'); + } + $this->container['dtable_uuid'] = $dtable_uuid; + + return $this; + } + + /** + * Gets table_id + * + * @return string|null + */ + public function getTableId() + { + return $this->container['table_id']; + } + + /** + * Sets table_id + * + * @param string|null $table_id table_id + * + * @return self + */ + public function setTableId($table_id) + { + if (is_null($table_id)) { + throw new \InvalidArgumentException('non-nullable table_id cannot be null'); + } + $this->container['table_id'] = $table_id; + + return $this; + } + + /** + * Gets view_id + * + * @return string|null + */ + public function getViewId() + { + return $this->container['view_id']; + } + + /** + * Sets view_id + * + * @param string|null $view_id view_id + * + * @return self + */ + public function setViewId($view_id) + { + if (is_null($view_id)) { + throw new \InvalidArgumentException('non-nullable view_id cannot be null'); + } + $this->container['view_id'] = $view_id; + + return $this; + } + + /** + * Gets created_at + * + * @return string|null + */ + public function getCreatedAt() + { + return $this->container['created_at']; + } + + /** + * Sets created_at + * + * @param string|null $created_at created_at + * + * @return self + */ + public function setCreatedAt($created_at) + { + if (is_null($created_at)) { + throw new \InvalidArgumentException('non-nullable created_at cannot be null'); + } + $this->container['created_at'] = $created_at; + + return $this; + } + + /** + * Gets creator + * + * @return string|null + */ + public function getCreator() + { + return $this->container['creator']; + } + + /** + * Sets creator + * + * @param string|null $creator creator + * + * @return self + */ + public function setCreator($creator) + { + if (is_null($creator)) { + throw new \InvalidArgumentException('non-nullable creator cannot be null'); + } + $this->container['creator'] = $creator; + + return $this; + } + + /** + * Gets dataset_name + * + * @return string|null + */ + public function getDatasetName() + { + return $this->container['dataset_name']; + } + + /** + * Sets dataset_name + * + * @param string|null $dataset_name dataset_name + * + * @return self + */ + public function setDatasetName($dataset_name) + { + if (is_null($dataset_name)) { + throw new \InvalidArgumentException('non-nullable dataset_name cannot be null'); + } + $this->container['dataset_name'] = $dataset_name; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/User/RecordsMeetSpecificConditionsAfterModification.php b/lib/User/RecordsMeetSpecificConditionsAfterModification.php index a84045e2..6cb67fc9 100644 --- a/lib/User/RecordsMeetSpecificConditionsAfterModification.php +++ b/lib/User/RecordsMeetSpecificConditionsAfterModification.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -417,11 +417,11 @@ public function setActions($actions) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -429,12 +429,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -459,11 +459,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/RepairBase200Response.php b/lib/User/RepairBase200Response.php index 3de0d23c..3a7e8023 100644 --- a/lib/User/RepairBase200Response.php +++ b/lib/User/RepairBase200Response.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -317,11 +317,11 @@ public function setSuccess($success) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -329,12 +329,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -359,11 +359,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/RowAdded.php b/lib/User/RowAdded.php index 810fcb12..1023c767 100644 --- a/lib/User/RowAdded.php +++ b/lib/User/RowAdded.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -417,11 +417,11 @@ public function setActions($actions) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -429,12 +429,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -459,11 +459,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/RunPeriodically.php b/lib/User/RunPeriodically.php index 7d5af1cf..70fffa31 100644 --- a/lib/User/RunPeriodically.php +++ b/lib/User/RunPeriodically.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -417,11 +417,11 @@ public function setActions($actions) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -429,12 +429,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -459,11 +459,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/RunPeriodicallyOnRecordsMeetConditions.php b/lib/User/RunPeriodicallyOnRecordsMeetConditions.php index 2f351921..a2a757e1 100644 --- a/lib/User/RunPeriodicallyOnRecordsMeetConditions.php +++ b/lib/User/RunPeriodicallyOnRecordsMeetConditions.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -417,11 +417,11 @@ public function setActions($actions) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -429,12 +429,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -459,11 +459,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/SearchGroup200ResponseInner.php b/lib/User/SearchGroup200ResponseInner.php new file mode 100644 index 00000000..b268e591 --- /dev/null +++ b/lib/User/SearchGroup200ResponseInner.php @@ -0,0 +1,510 @@ + + */ +class SearchGroup200ResponseInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'searchGroup_200_response_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'id' => 'int', + 'name' => 'string', + 'owner' => 'string', + 'created_at' => '\DateTime' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'id' => null, + 'name' => null, + 'owner' => null, + 'created_at' => 'date-time' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'id' => false, + 'name' => false, + 'owner' => false, + 'created_at' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'name' => 'name', + 'owner' => 'owner', + 'created_at' => 'created_at' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'name' => 'setName', + 'owner' => 'setOwner', + 'created_at' => 'setCreatedAt' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'name' => 'getName', + 'owner' => 'getOwner', + 'created_at' => 'getCreatedAt' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('owner', $data ?? [], null); + $this->setIfExists('created_at', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return int|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int|null $id id + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name name + * + * @return self + */ + public function setName($name) + { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets owner + * + * @return string|null + */ + public function getOwner() + { + return $this->container['owner']; + } + + /** + * Sets owner + * + * @param string|null $owner owner + * + * @return self + */ + public function setOwner($owner) + { + if (is_null($owner)) { + throw new \InvalidArgumentException('non-nullable owner cannot be null'); + } + $this->container['owner'] = $owner; + + return $this; + } + + /** + * Gets created_at + * + * @return \DateTime|null + */ + public function getCreatedAt() + { + return $this->container['created_at']; + } + + /** + * Sets created_at + * + * @param \DateTime|null $created_at created_at + * + * @return self + */ + public function setCreatedAt($created_at) + { + if (is_null($created_at)) { + throw new \InvalidArgumentException('non-nullable created_at cannot be null'); + } + $this->container['created_at'] = $created_at; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/User/SharingApi.php b/lib/User/SharingApi.php index 09e0b39f..81bcd2e0 100644 --- a/lib/User/SharingApi.php +++ b/lib/User/SharingApi.php @@ -14,7 +14,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -98,7 +98,7 @@ class SharingApi 'application/json', ], 'deleteUserShare' => [ - 'application/json', + 'application/x-www-form-urlencoded', ], 'deleteUserViewShare' => [ 'application/json', @@ -526,7 +526,7 @@ public function createGroupShareRequest($workspace_id, $base_name, $group_id = n * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return object + * @return \SeaTable\Client\User\CreateGroupViewShare200Response */ public function createGroupViewShare($workspace_id, $base_name, $table_id = null, $view_id = null, $permission = null, $to_group_id = null, string $contentType = self::contentTypes['createGroupViewShare'][0]) { @@ -549,7 +549,7 @@ public function createGroupViewShare($workspace_id, $base_name, $table_id = null * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) + * @return array of \SeaTable\Client\User\CreateGroupViewShare200Response, HTTP status code, HTTP response headers (array of strings) */ public function createGroupViewShareWithHttpInfo($workspace_id, $base_name, $table_id = null, $view_id = null, $permission = null, $to_group_id = null, string $contentType = self::contentTypes['createGroupViewShare'][0]) { @@ -581,7 +581,7 @@ public function createGroupViewShareWithHttpInfo($workspace_id, $base_name, $tab switch($statusCode) { case 200: return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\User\CreateGroupViewShare200Response', $request, $response, ); @@ -603,7 +603,7 @@ public function createGroupViewShareWithHttpInfo($workspace_id, $base_name, $tab } return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\User\CreateGroupViewShare200Response', $request, $response, ); @@ -612,7 +612,7 @@ public function createGroupViewShareWithHttpInfo($workspace_id, $base_name, $tab case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - 'object', + '\SeaTable\Client\User\CreateGroupViewShare200Response', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -668,7 +668,7 @@ function ($response) { */ public function createGroupViewShareAsyncWithHttpInfo($workspace_id, $base_name, $table_id = null, $view_id = null, $permission = null, $to_group_id = null, string $contentType = self::contentTypes['createGroupViewShare'][0]) { - $returnType = 'object'; + $returnType = '\SeaTable\Client\User\CreateGroupViewShare200Response'; $request = $this->createGroupViewShareRequest($workspace_id, $base_name, $table_id, $view_id, $permission, $to_group_id, $contentType); return $this->client @@ -1175,7 +1175,7 @@ public function createUserShareRequest($workspace_id, $base_name, $permission = * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return object + * @return \SeaTable\Client\User\CreateUserViewShare200Response */ public function createUserViewShare($workspace_id, $base_name, $permission = null, $to_user = null, $table_id = null, $view_id = null, string $contentType = self::contentTypes['createUserViewShare'][0]) { @@ -1198,7 +1198,7 @@ public function createUserViewShare($workspace_id, $base_name, $permission = nul * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) + * @return array of \SeaTable\Client\User\CreateUserViewShare200Response, HTTP status code, HTTP response headers (array of strings) */ public function createUserViewShareWithHttpInfo($workspace_id, $base_name, $permission = null, $to_user = null, $table_id = null, $view_id = null, string $contentType = self::contentTypes['createUserViewShare'][0]) { @@ -1230,7 +1230,7 @@ public function createUserViewShareWithHttpInfo($workspace_id, $base_name, $perm switch($statusCode) { case 200: return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\User\CreateUserViewShare200Response', $request, $response, ); @@ -1252,7 +1252,7 @@ public function createUserViewShareWithHttpInfo($workspace_id, $base_name, $perm } return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\User\CreateUserViewShare200Response', $request, $response, ); @@ -1261,7 +1261,7 @@ public function createUserViewShareWithHttpInfo($workspace_id, $base_name, $perm case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - 'object', + '\SeaTable\Client\User\CreateUserViewShare200Response', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1317,7 +1317,7 @@ function ($response) { */ public function createUserViewShareAsyncWithHttpInfo($workspace_id, $base_name, $permission = null, $to_user = null, $table_id = null, $view_id = null, string $contentType = self::contentTypes['createUserViewShare'][0]) { - $returnType = 'object'; + $returnType = '\SeaTable\Client\User\CreateUserViewShare200Response'; $request = $this->createUserViewShareRequest($workspace_id, $base_name, $permission, $to_user, $table_id, $view_id, $contentType); return $this->client @@ -1841,7 +1841,7 @@ public function deleteGroupAllViewShareRequest($table_id, $view_id, $workspace_i * * @param int $workspace_id id of your workspace. (required) * @param string $base_name name of your base. (required) - * @param int $group_id group_id (required) + * @param int $group_id The ID of the group. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteGroupShare'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -1861,7 +1861,7 @@ public function deleteGroupShare($workspace_id, $base_name, $group_id, string $c * * @param int $workspace_id id of your workspace. (required) * @param string $base_name name of your base. (required) - * @param int $group_id (required) + * @param int $group_id The ID of the group. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteGroupShare'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -1948,7 +1948,7 @@ public function deleteGroupShareWithHttpInfo($workspace_id, $base_name, $group_i * * @param int $workspace_id id of your workspace. (required) * @param string $base_name name of your base. (required) - * @param int $group_id (required) + * @param int $group_id The ID of the group. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteGroupShare'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1971,7 +1971,7 @@ function ($response) { * * @param int $workspace_id id of your workspace. (required) * @param string $base_name name of your base. (required) - * @param int $group_id (required) + * @param int $group_id The ID of the group. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteGroupShare'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -2023,7 +2023,7 @@ function ($exception) { * * @param int $workspace_id id of your workspace. (required) * @param string $base_name name of your base. (required) - * @param int $group_id (required) + * @param int $group_id The ID of the group. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteGroupShare'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -2159,7 +2159,7 @@ public function deleteGroupShareRequest($workspace_id, $base_name, $group_id, st * * @param int $workspace_id id of your workspace. (required) * @param string $base_name name of your base. (required) - * @param int $group_view_share_id group_view_share_id (required) + * @param int $group_view_share_id The ID of the group view share. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteGroupViewShare'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -2179,7 +2179,7 @@ public function deleteGroupViewShare($workspace_id, $base_name, $group_view_shar * * @param int $workspace_id id of your workspace. (required) * @param string $base_name name of your base. (required) - * @param int $group_view_share_id (required) + * @param int $group_view_share_id The ID of the group view share. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteGroupViewShare'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -2266,7 +2266,7 @@ public function deleteGroupViewShareWithHttpInfo($workspace_id, $base_name, $gro * * @param int $workspace_id id of your workspace. (required) * @param string $base_name name of your base. (required) - * @param int $group_view_share_id (required) + * @param int $group_view_share_id The ID of the group view share. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteGroupViewShare'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -2289,7 +2289,7 @@ function ($response) { * * @param int $workspace_id id of your workspace. (required) * @param string $base_name name of your base. (required) - * @param int $group_view_share_id (required) + * @param int $group_view_share_id The ID of the group view share. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteGroupViewShare'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -2341,7 +2341,7 @@ function ($exception) { * * @param int $workspace_id id of your workspace. (required) * @param string $base_name name of your base. (required) - * @param int $group_view_share_id (required) + * @param int $group_view_share_id The ID of the group view share. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteGroupViewShare'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -2820,15 +2820,16 @@ public function deleteUserAllViewShareRequest($table_id, $view_id, $workspace_id * * @param int $workspace_id id of your workspace. (required) * @param string $base_name name of your base. (required) + * @param string $email The user ID ending with @auth.local (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteUserShare'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return object */ - public function deleteUserShare($workspace_id, $base_name, string $contentType = self::contentTypes['deleteUserShare'][0]) + public function deleteUserShare($workspace_id, $base_name, $email, string $contentType = self::contentTypes['deleteUserShare'][0]) { - list($response) = $this->deleteUserShareWithHttpInfo($workspace_id, $base_name, $contentType); + list($response) = $this->deleteUserShareWithHttpInfo($workspace_id, $base_name, $email, $contentType); return $response; } @@ -2839,15 +2840,16 @@ public function deleteUserShare($workspace_id, $base_name, string $contentType = * * @param int $workspace_id id of your workspace. (required) * @param string $base_name name of your base. (required) + * @param string $email The user ID ending with @auth.local (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteUserShare'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of object, HTTP status code, HTTP response headers (array of strings) */ - public function deleteUserShareWithHttpInfo($workspace_id, $base_name, string $contentType = self::contentTypes['deleteUserShare'][0]) + public function deleteUserShareWithHttpInfo($workspace_id, $base_name, $email, string $contentType = self::contentTypes['deleteUserShare'][0]) { - $request = $this->deleteUserShareRequest($workspace_id, $base_name, $contentType); + $request = $this->deleteUserShareRequest($workspace_id, $base_name, $email, $contentType); try { $options = $this->createHttpClientOption(); @@ -2925,14 +2927,15 @@ public function deleteUserShareWithHttpInfo($workspace_id, $base_name, string $c * * @param int $workspace_id id of your workspace. (required) * @param string $base_name name of your base. (required) + * @param string $email The user ID ending with @auth.local (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteUserShare'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteUserShareAsync($workspace_id, $base_name, string $contentType = self::contentTypes['deleteUserShare'][0]) + public function deleteUserShareAsync($workspace_id, $base_name, $email, string $contentType = self::contentTypes['deleteUserShare'][0]) { - return $this->deleteUserShareAsyncWithHttpInfo($workspace_id, $base_name, $contentType) + return $this->deleteUserShareAsyncWithHttpInfo($workspace_id, $base_name, $email, $contentType) ->then( function ($response) { return $response[0]; @@ -2947,15 +2950,16 @@ function ($response) { * * @param int $workspace_id id of your workspace. (required) * @param string $base_name name of your base. (required) + * @param string $email The user ID ending with @auth.local (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteUserShare'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteUserShareAsyncWithHttpInfo($workspace_id, $base_name, string $contentType = self::contentTypes['deleteUserShare'][0]) + public function deleteUserShareAsyncWithHttpInfo($workspace_id, $base_name, $email, string $contentType = self::contentTypes['deleteUserShare'][0]) { $returnType = 'object'; - $request = $this->deleteUserShareRequest($workspace_id, $base_name, $contentType); + $request = $this->deleteUserShareRequest($workspace_id, $base_name, $email, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -2998,12 +3002,13 @@ function ($exception) { * * @param int $workspace_id id of your workspace. (required) * @param string $base_name name of your base. (required) + * @param string $email The user ID ending with @auth.local (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteUserShare'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function deleteUserShareRequest($workspace_id, $base_name, string $contentType = self::contentTypes['deleteUserShare'][0]) + public function deleteUserShareRequest($workspace_id, $base_name, $email, string $contentType = self::contentTypes['deleteUserShare'][0]) { // verify the required parameter 'workspace_id' is set @@ -3023,6 +3028,13 @@ public function deleteUserShareRequest($workspace_id, $base_name, string $conten ); } + // verify the required parameter 'email' is set + if ($email === null || (is_array($email) && count($email) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $email when calling deleteUserShare' + ); + } + $resourcePath = '/api/v2.1/workspace/{workspace_id}/dtable/{base_name}/share/'; $formParams = []; @@ -3050,6 +3062,15 @@ public function deleteUserShareRequest($workspace_id, $base_name, string $conten ); } + // form params + $formDataProcessor = new FormDataProcessor(); + + $formData = $formDataProcessor->prepare([ + 'email' => $email, + ]); + + $formParams = $formDataProcessor->flatten($formData); + $multipart = $formDataProcessor->has_file; $headers = $this->headerSelector->selectHeaders( ['application/json', ], @@ -3115,7 +3136,7 @@ public function deleteUserShareRequest($workspace_id, $base_name, string $conten * * @param int $workspace_id id of your workspace. (required) * @param string $base_name name of your base. (required) - * @param int $user_view_share_id user_view_share_id (required) + * @param int $user_view_share_id The ID of the user view share. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteUserViewShare'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -3135,7 +3156,7 @@ public function deleteUserViewShare($workspace_id, $base_name, $user_view_share_ * * @param int $workspace_id id of your workspace. (required) * @param string $base_name name of your base. (required) - * @param int $user_view_share_id (required) + * @param int $user_view_share_id The ID of the user view share. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteUserViewShare'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -3222,7 +3243,7 @@ public function deleteUserViewShareWithHttpInfo($workspace_id, $base_name, $user * * @param int $workspace_id id of your workspace. (required) * @param string $base_name name of your base. (required) - * @param int $user_view_share_id (required) + * @param int $user_view_share_id The ID of the user view share. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteUserViewShare'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -3245,7 +3266,7 @@ function ($response) { * * @param int $workspace_id id of your workspace. (required) * @param string $base_name name of your base. (required) - * @param int $user_view_share_id (required) + * @param int $user_view_share_id The ID of the user view share. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteUserViewShare'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -3297,7 +3318,7 @@ function ($exception) { * * @param int $workspace_id id of your workspace. (required) * @param string $base_name name of your base. (required) - * @param int $user_view_share_id (required) + * @param int $user_view_share_id The ID of the user view share. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteUserViewShare'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -3431,7 +3452,7 @@ public function deleteUserViewShareRequest($workspace_id, $base_name, $user_view * * Leave Shared View * - * @param int $user_view_share_id user_view_share_id (required) + * @param int $user_view_share_id The ID of the user view share. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['leaveSharedView'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -3449,7 +3470,7 @@ public function leaveSharedView($user_view_share_id, string $contentType = self: * * Leave Shared View * - * @param int $user_view_share_id (required) + * @param int $user_view_share_id The ID of the user view share. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['leaveSharedView'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -3534,7 +3555,7 @@ public function leaveSharedViewWithHttpInfo($user_view_share_id, string $content * * Leave Shared View * - * @param int $user_view_share_id (required) + * @param int $user_view_share_id The ID of the user view share. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['leaveSharedView'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -3555,7 +3576,7 @@ function ($response) { * * Leave Shared View * - * @param int $user_view_share_id (required) + * @param int $user_view_share_id The ID of the user view share. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['leaveSharedView'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -3605,7 +3626,7 @@ function ($exception) { /** * Create request for operation 'leaveSharedView' * - * @param int $user_view_share_id (required) + * @param int $user_view_share_id The ID of the user view share. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['leaveSharedView'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -6191,7 +6212,7 @@ public function listUserViewSharesRequest($workspace_id, $base_name, string $con * * @param int $workspace_id id of your workspace. (required) * @param string $base_name name of your base. (required) - * @param int $group_id group_id (required) + * @param int $group_id The ID of the group. (required) * @param string|null $permission `r` for read only or `rw` for read and write (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateGroupShare'] to see the possible values for this operation * @@ -6212,7 +6233,7 @@ public function updateGroupShare($workspace_id, $base_name, $group_id, $permissi * * @param int $workspace_id id of your workspace. (required) * @param string $base_name name of your base. (required) - * @param int $group_id (required) + * @param int $group_id The ID of the group. (required) * @param string|null $permission `r` for read only or `rw` for read and write (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateGroupShare'] to see the possible values for this operation * @@ -6300,7 +6321,7 @@ public function updateGroupShareWithHttpInfo($workspace_id, $base_name, $group_i * * @param int $workspace_id id of your workspace. (required) * @param string $base_name name of your base. (required) - * @param int $group_id (required) + * @param int $group_id The ID of the group. (required) * @param string|null $permission `r` for read only or `rw` for read and write (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateGroupShare'] to see the possible values for this operation * @@ -6324,7 +6345,7 @@ function ($response) { * * @param int $workspace_id id of your workspace. (required) * @param string $base_name name of your base. (required) - * @param int $group_id (required) + * @param int $group_id The ID of the group. (required) * @param string|null $permission `r` for read only or `rw` for read and write (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateGroupShare'] to see the possible values for this operation * @@ -6377,7 +6398,7 @@ function ($exception) { * * @param int $workspace_id id of your workspace. (required) * @param string $base_name name of your base. (required) - * @param int $group_id (required) + * @param int $group_id The ID of the group. (required) * @param string|null $permission `r` for read only or `rw` for read and write (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateGroupShare'] to see the possible values for this operation * @@ -6525,13 +6546,13 @@ public function updateGroupShareRequest($workspace_id, $base_name, $group_id, $p * * @param int $workspace_id id of your workspace. (required) * @param string $base_name name of your base. (required) - * @param int $group_view_share_id group_view_share_id (required) + * @param int $group_view_share_id The ID of the group view share. (required) * @param string|null $permission `r` for read only or `rw` for read and write (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateGroupViewShare'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return object + * @return \SeaTable\Client\User\CreateGroupViewShare200Response */ public function updateGroupViewShare($workspace_id, $base_name, $group_view_share_id, $permission = null, string $contentType = self::contentTypes['updateGroupViewShare'][0]) { @@ -6546,13 +6567,13 @@ public function updateGroupViewShare($workspace_id, $base_name, $group_view_shar * * @param int $workspace_id id of your workspace. (required) * @param string $base_name name of your base. (required) - * @param int $group_view_share_id (required) + * @param int $group_view_share_id The ID of the group view share. (required) * @param string|null $permission `r` for read only or `rw` for read and write (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateGroupViewShare'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) + * @return array of \SeaTable\Client\User\CreateGroupViewShare200Response, HTTP status code, HTTP response headers (array of strings) */ public function updateGroupViewShareWithHttpInfo($workspace_id, $base_name, $group_view_share_id, $permission = null, string $contentType = self::contentTypes['updateGroupViewShare'][0]) { @@ -6584,7 +6605,7 @@ public function updateGroupViewShareWithHttpInfo($workspace_id, $base_name, $gro switch($statusCode) { case 200: return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\User\CreateGroupViewShare200Response', $request, $response, ); @@ -6606,7 +6627,7 @@ public function updateGroupViewShareWithHttpInfo($workspace_id, $base_name, $gro } return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\User\CreateGroupViewShare200Response', $request, $response, ); @@ -6615,7 +6636,7 @@ public function updateGroupViewShareWithHttpInfo($workspace_id, $base_name, $gro case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - 'object', + '\SeaTable\Client\User\CreateGroupViewShare200Response', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -6634,7 +6655,7 @@ public function updateGroupViewShareWithHttpInfo($workspace_id, $base_name, $gro * * @param int $workspace_id id of your workspace. (required) * @param string $base_name name of your base. (required) - * @param int $group_view_share_id (required) + * @param int $group_view_share_id The ID of the group view share. (required) * @param string|null $permission `r` for read only or `rw` for read and write (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateGroupViewShare'] to see the possible values for this operation * @@ -6658,7 +6679,7 @@ function ($response) { * * @param int $workspace_id id of your workspace. (required) * @param string $base_name name of your base. (required) - * @param int $group_view_share_id (required) + * @param int $group_view_share_id The ID of the group view share. (required) * @param string|null $permission `r` for read only or `rw` for read and write (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateGroupViewShare'] to see the possible values for this operation * @@ -6667,7 +6688,7 @@ function ($response) { */ public function updateGroupViewShareAsyncWithHttpInfo($workspace_id, $base_name, $group_view_share_id, $permission = null, string $contentType = self::contentTypes['updateGroupViewShare'][0]) { - $returnType = 'object'; + $returnType = '\SeaTable\Client\User\CreateGroupViewShare200Response'; $request = $this->updateGroupViewShareRequest($workspace_id, $base_name, $group_view_share_id, $permission, $contentType); return $this->client @@ -6711,7 +6732,7 @@ function ($exception) { * * @param int $workspace_id id of your workspace. (required) * @param string $base_name name of your base. (required) - * @param int $group_view_share_id (required) + * @param int $group_view_share_id The ID of the group view share. (required) * @param string|null $permission `r` for read only or `rw` for read and write (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateGroupViewShare'] to see the possible values for this operation * @@ -7175,13 +7196,13 @@ public function updateUserShareRequest($workspace_id, $base_name, $permission = * * @param int $workspace_id id of your workspace. (required) * @param string $base_name name of your base. (required) - * @param int $user_view_share_id user_view_share_id (required) + * @param int $user_view_share_id The ID of the user view share. (required) * @param string|null $permission `r` for read only or `rw` for read and write (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateUserViewShare'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return object + * @return \SeaTable\Client\User\CreateUserViewShare200Response */ public function updateUserViewShare($workspace_id, $base_name, $user_view_share_id, $permission = null, string $contentType = self::contentTypes['updateUserViewShare'][0]) { @@ -7196,13 +7217,13 @@ public function updateUserViewShare($workspace_id, $base_name, $user_view_share_ * * @param int $workspace_id id of your workspace. (required) * @param string $base_name name of your base. (required) - * @param int $user_view_share_id (required) + * @param int $user_view_share_id The ID of the user view share. (required) * @param string|null $permission `r` for read only or `rw` for read and write (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateUserViewShare'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) + * @return array of \SeaTable\Client\User\CreateUserViewShare200Response, HTTP status code, HTTP response headers (array of strings) */ public function updateUserViewShareWithHttpInfo($workspace_id, $base_name, $user_view_share_id, $permission = null, string $contentType = self::contentTypes['updateUserViewShare'][0]) { @@ -7234,7 +7255,7 @@ public function updateUserViewShareWithHttpInfo($workspace_id, $base_name, $user switch($statusCode) { case 200: return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\User\CreateUserViewShare200Response', $request, $response, ); @@ -7256,7 +7277,7 @@ public function updateUserViewShareWithHttpInfo($workspace_id, $base_name, $user } return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\User\CreateUserViewShare200Response', $request, $response, ); @@ -7265,7 +7286,7 @@ public function updateUserViewShareWithHttpInfo($workspace_id, $base_name, $user case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - 'object', + '\SeaTable\Client\User\CreateUserViewShare200Response', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -7284,7 +7305,7 @@ public function updateUserViewShareWithHttpInfo($workspace_id, $base_name, $user * * @param int $workspace_id id of your workspace. (required) * @param string $base_name name of your base. (required) - * @param int $user_view_share_id (required) + * @param int $user_view_share_id The ID of the user view share. (required) * @param string|null $permission `r` for read only or `rw` for read and write (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateUserViewShare'] to see the possible values for this operation * @@ -7308,7 +7329,7 @@ function ($response) { * * @param int $workspace_id id of your workspace. (required) * @param string $base_name name of your base. (required) - * @param int $user_view_share_id (required) + * @param int $user_view_share_id The ID of the user view share. (required) * @param string|null $permission `r` for read only or `rw` for read and write (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateUserViewShare'] to see the possible values for this operation * @@ -7317,7 +7338,7 @@ function ($response) { */ public function updateUserViewShareAsyncWithHttpInfo($workspace_id, $base_name, $user_view_share_id, $permission = null, string $contentType = self::contentTypes['updateUserViewShare'][0]) { - $returnType = 'object'; + $returnType = '\SeaTable\Client\User\CreateUserViewShare200Response'; $request = $this->updateUserViewShareRequest($workspace_id, $base_name, $user_view_share_id, $permission, $contentType); return $this->client @@ -7361,7 +7382,7 @@ function ($exception) { * * @param int $workspace_id id of your workspace. (required) * @param string $base_name name of your base. (required) - * @param int $user_view_share_id (required) + * @param int $user_view_share_id The ID of the user view share. (required) * @param string|null $permission `r` for read only or `rw` for read and write (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateUserViewShare'] to see the possible values for this operation * @@ -7517,6 +7538,14 @@ protected function createHttpClientOption() } } + if ($this->config->getCertFile()) { + $options[RequestOptions::CERT] = $this->config->getCertFile(); + } + + if ($this->config->getKeyFile()) { + $options[RequestOptions::SSL_KEY] = $this->config->getKeyFile(); + } + return $options; } diff --git a/lib/User/SharingLinksApi.php b/lib/User/SharingLinksApi.php index 81be62e9..17746107 100644 --- a/lib/User/SharingLinksApi.php +++ b/lib/User/SharingLinksApi.php @@ -14,7 +14,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -159,7 +159,7 @@ public function getConfig() * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return object + * @return \SeaTable\Client\User\CreateBaseExternalLink200Response */ public function createBaseExternalLink($workspace_id, $base_name, $password = null, $expire_days = null, $token = null, string $contentType = self::contentTypes['createBaseExternalLink'][0]) { @@ -181,7 +181,7 @@ public function createBaseExternalLink($workspace_id, $base_name, $password = nu * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) + * @return array of \SeaTable\Client\User\CreateBaseExternalLink200Response, HTTP status code, HTTP response headers (array of strings) */ public function createBaseExternalLinkWithHttpInfo($workspace_id, $base_name, $password = null, $expire_days = null, $token = null, string $contentType = self::contentTypes['createBaseExternalLink'][0]) { @@ -213,7 +213,7 @@ public function createBaseExternalLinkWithHttpInfo($workspace_id, $base_name, $p switch($statusCode) { case 200: return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\User\CreateBaseExternalLink200Response', $request, $response, ); @@ -235,7 +235,7 @@ public function createBaseExternalLinkWithHttpInfo($workspace_id, $base_name, $p } return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\User\CreateBaseExternalLink200Response', $request, $response, ); @@ -244,7 +244,7 @@ public function createBaseExternalLinkWithHttpInfo($workspace_id, $base_name, $p case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - 'object', + '\SeaTable\Client\User\CreateBaseExternalLink200Response', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -298,7 +298,7 @@ function ($response) { */ public function createBaseExternalLinkAsyncWithHttpInfo($workspace_id, $base_name, $password = null, $expire_days = null, $token = null, string $contentType = self::contentTypes['createBaseExternalLink'][0]) { - $returnType = 'object'; + $returnType = '\SeaTable\Client\User\CreateBaseExternalLink200Response'; $request = $this->createBaseExternalLinkRequest($workspace_id, $base_name, $password, $expire_days, $token, $contentType); return $this->client @@ -484,7 +484,7 @@ public function createBaseExternalLinkRequest($workspace_id, $base_name, $passwo * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return object + * @return \SeaTable\Client\User\CreateInviteLink200Response */ public function createInviteLink($table_name = null, $workspace_id = null, $permission = null, $password = null, $expire_days = null, string $contentType = self::contentTypes['createInviteLink'][0]) { @@ -506,7 +506,7 @@ public function createInviteLink($table_name = null, $workspace_id = null, $perm * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) + * @return array of \SeaTable\Client\User\CreateInviteLink200Response, HTTP status code, HTTP response headers (array of strings) */ public function createInviteLinkWithHttpInfo($table_name = null, $workspace_id = null, $permission = null, $password = null, $expire_days = null, string $contentType = self::contentTypes['createInviteLink'][0]) { @@ -538,7 +538,7 @@ public function createInviteLinkWithHttpInfo($table_name = null, $workspace_id = switch($statusCode) { case 200: return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\User\CreateInviteLink200Response', $request, $response, ); @@ -560,7 +560,7 @@ public function createInviteLinkWithHttpInfo($table_name = null, $workspace_id = } return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\User\CreateInviteLink200Response', $request, $response, ); @@ -569,7 +569,7 @@ public function createInviteLinkWithHttpInfo($table_name = null, $workspace_id = case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - 'object', + '\SeaTable\Client\User\CreateInviteLink200Response', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -623,7 +623,7 @@ function ($response) { */ public function createInviteLinkAsyncWithHttpInfo($table_name = null, $workspace_id = null, $permission = null, $password = null, $expire_days = null, string $contentType = self::contentTypes['createInviteLink'][0]) { - $returnType = 'object'; + $returnType = '\SeaTable\Client\User\CreateInviteLink200Response'; $request = $this->createInviteLinkRequest($table_name, $workspace_id, $permission, $password, $expire_days, $contentType); return $this->client @@ -782,7 +782,7 @@ public function createInviteLinkRequest($table_name = null, $workspace_id = null * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return object + * @return \SeaTable\Client\User\CreateViewExternalLink200Response */ public function createViewExternalLink($workspace_id, $base_name, $table_id = null, $view_id = null, $token = null, $password = null, $expire_days = null, string $contentType = self::contentTypes['createViewExternalLink'][0]) { @@ -806,7 +806,7 @@ public function createViewExternalLink($workspace_id, $base_name, $table_id = nu * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) + * @return array of \SeaTable\Client\User\CreateViewExternalLink200Response, HTTP status code, HTTP response headers (array of strings) */ public function createViewExternalLinkWithHttpInfo($workspace_id, $base_name, $table_id = null, $view_id = null, $token = null, $password = null, $expire_days = null, string $contentType = self::contentTypes['createViewExternalLink'][0]) { @@ -838,7 +838,7 @@ public function createViewExternalLinkWithHttpInfo($workspace_id, $base_name, $t switch($statusCode) { case 200: return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\User\CreateViewExternalLink200Response', $request, $response, ); @@ -860,7 +860,7 @@ public function createViewExternalLinkWithHttpInfo($workspace_id, $base_name, $t } return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\User\CreateViewExternalLink200Response', $request, $response, ); @@ -869,7 +869,7 @@ public function createViewExternalLinkWithHttpInfo($workspace_id, $base_name, $t case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - 'object', + '\SeaTable\Client\User\CreateViewExternalLink200Response', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -927,7 +927,7 @@ function ($response) { */ public function createViewExternalLinkAsyncWithHttpInfo($workspace_id, $base_name, $table_id = null, $view_id = null, $token = null, $password = null, $expire_days = null, string $contentType = self::contentTypes['createViewExternalLink'][0]) { - $returnType = 'object'; + $returnType = '\SeaTable\Client\User\CreateViewExternalLink200Response'; $request = $this->createViewExternalLinkRequest($workspace_id, $base_name, $table_id, $view_id, $token, $password, $expire_days, $contentType); return $this->client @@ -1112,7 +1112,7 @@ public function createViewExternalLinkRequest($workspace_id, $base_name, $table_ * * @param int $workspace_id id of your workspace. (required) * @param string $base_name name of your base. (required) - * @param string $external_link_token external_link_token (required) + * @param string $external_link_token The token of the external link. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteExternalLink'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -1132,7 +1132,7 @@ public function deleteExternalLink($workspace_id, $base_name, $external_link_tok * * @param int $workspace_id id of your workspace. (required) * @param string $base_name name of your base. (required) - * @param string $external_link_token (required) + * @param string $external_link_token The token of the external link. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteExternalLink'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -1219,7 +1219,7 @@ public function deleteExternalLinkWithHttpInfo($workspace_id, $base_name, $exter * * @param int $workspace_id id of your workspace. (required) * @param string $base_name name of your base. (required) - * @param string $external_link_token (required) + * @param string $external_link_token The token of the external link. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteExternalLink'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1242,7 +1242,7 @@ function ($response) { * * @param int $workspace_id id of your workspace. (required) * @param string $base_name name of your base. (required) - * @param string $external_link_token (required) + * @param string $external_link_token The token of the external link. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteExternalLink'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1294,7 +1294,7 @@ function ($exception) { * * @param int $workspace_id id of your workspace. (required) * @param string $base_name name of your base. (required) - * @param string $external_link_token (required) + * @param string $external_link_token The token of the external link. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteExternalLink'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1425,7 +1425,7 @@ public function deleteExternalLinkRequest($workspace_id, $base_name, $external_l * * Delete Invite Link * - * @param string $invite_link_token invite_link_token (required) + * @param string $invite_link_token The token of the invite link. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteInviteLink'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -1443,7 +1443,7 @@ public function deleteInviteLink($invite_link_token, string $contentType = self: * * Delete Invite Link * - * @param string $invite_link_token (required) + * @param string $invite_link_token The token of the invite link. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteInviteLink'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -1528,7 +1528,7 @@ public function deleteInviteLinkWithHttpInfo($invite_link_token, string $content * * Delete Invite Link * - * @param string $invite_link_token (required) + * @param string $invite_link_token The token of the invite link. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteInviteLink'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1549,7 +1549,7 @@ function ($response) { * * Delete Invite Link * - * @param string $invite_link_token (required) + * @param string $invite_link_token The token of the invite link. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteInviteLink'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1599,7 +1599,7 @@ function ($exception) { /** * Create request for operation 'deleteInviteLink' * - * @param string $invite_link_token (required) + * @param string $invite_link_token The token of the invite link. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteInviteLink'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1702,7 +1702,7 @@ public function deleteInviteLinkRequest($invite_link_token, string $contentType * * @param int $workspace_id id of your workspace. (required) * @param string $base_name name of your base. (required) - * @param string $view_external_link_token view_external_link_token (required) + * @param string $view_external_link_token The token of the view external link. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteViewExternalLink'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -1722,7 +1722,7 @@ public function deleteViewExternalLink($workspace_id, $base_name, $view_external * * @param int $workspace_id id of your workspace. (required) * @param string $base_name name of your base. (required) - * @param string $view_external_link_token (required) + * @param string $view_external_link_token The token of the view external link. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteViewExternalLink'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -1809,7 +1809,7 @@ public function deleteViewExternalLinkWithHttpInfo($workspace_id, $base_name, $v * * @param int $workspace_id id of your workspace. (required) * @param string $base_name name of your base. (required) - * @param string $view_external_link_token (required) + * @param string $view_external_link_token The token of the view external link. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteViewExternalLink'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1832,7 +1832,7 @@ function ($response) { * * @param int $workspace_id id of your workspace. (required) * @param string $base_name name of your base. (required) - * @param string $view_external_link_token (required) + * @param string $view_external_link_token The token of the view external link. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteViewExternalLink'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1884,7 +1884,7 @@ function ($exception) { * * @param int $workspace_id id of your workspace. (required) * @param string $base_name name of your base. (required) - * @param string $view_external_link_token (required) + * @param string $view_external_link_token The token of the view external link. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteViewExternalLink'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1916,10 +1916,7 @@ public function deleteViewExternalLinkRequest($workspace_id, $base_name, $view_e 'Missing the required parameter $view_external_link_token when calling deleteViewExternalLink' ); } - if (!preg_match("/^[0-9a-f]{20}$/", $view_external_link_token)) { - throw new \InvalidArgumentException("invalid value for \"view_external_link_token\" when calling SharingLinksApi.deleteViewExternalLink, must conform to the pattern /^[0-9a-f]{20}$/."); - } - + $resourcePath = '/api/v2.1/workspace/{workspace_id}/dtable/{base_name}/view-external-links/{view_external_link_token}/'; $formParams = []; @@ -2667,6 +2664,14 @@ protected function createHttpClientOption() } } + if ($this->config->getCertFile()) { + $options[RequestOptions::CERT] = $this->config->getCertFile(); + } + + if ($this->config->getKeyFile()) { + $options[RequestOptions::SSL_KEY] = $this->config->getKeyFile(); + } + return $options; } diff --git a/lib/User/SnapshotsApi.php b/lib/User/SnapshotsApi.php index 37b8dd48..bff2b254 100644 --- a/lib/User/SnapshotsApi.php +++ b/lib/User/SnapshotsApi.php @@ -14,7 +14,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -730,8 +730,8 @@ public function listBigDataBackupsRequest($workspace_id, $base_name, string $con * * @param int $workspace_id id of your workspace. (required) * @param string $base_name name of your base. (required) - * @param int|null $page page (optional) - * @param int|null $per_page per_page (optional) + * @param int|null $page Page number of results to return. Default is 1. (optional) + * @param int|null $per_page Number of results per page. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listSnapshots'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -751,8 +751,8 @@ public function listSnapshots($workspace_id, $base_name, $page = null, $per_page * * @param int $workspace_id id of your workspace. (required) * @param string $base_name name of your base. (required) - * @param int|null $page (optional) - * @param int|null $per_page (optional) + * @param int|null $page Page number of results to return. Default is 1. (optional) + * @param int|null $per_page Number of results per page. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listSnapshots'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -839,8 +839,8 @@ public function listSnapshotsWithHttpInfo($workspace_id, $base_name, $page = nul * * @param int $workspace_id id of your workspace. (required) * @param string $base_name name of your base. (required) - * @param int|null $page (optional) - * @param int|null $per_page (optional) + * @param int|null $page Page number of results to return. Default is 1. (optional) + * @param int|null $per_page Number of results per page. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listSnapshots'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -863,8 +863,8 @@ function ($response) { * * @param int $workspace_id id of your workspace. (required) * @param string $base_name name of your base. (required) - * @param int|null $page (optional) - * @param int|null $per_page (optional) + * @param int|null $page Page number of results to return. Default is 1. (optional) + * @param int|null $per_page Number of results per page. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listSnapshots'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -916,8 +916,8 @@ function ($exception) { * * @param int $workspace_id id of your workspace. (required) * @param string $base_name name of your base. (required) - * @param int|null $page (optional) - * @param int|null $per_page (optional) + * @param int|null $page Page number of results to return. Default is 1. (optional) + * @param int|null $per_page Number of results per page. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listSnapshots'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1061,7 +1061,7 @@ public function listSnapshotsRequest($workspace_id, $base_name, $page = null, $p * * @param int $workspace_id id of your workspace. (required) * @param string $base_name name of your base. (required) - * @param string $commit_id commit_id (required) + * @param string $commit_id The commit ID for a base snapshot. (required) * @param string|null $snapshot_name The name of the restored base. Optional. If left blank, a default name will be given. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['restoreSnapshot'] to see the possible values for this operation * @@ -1082,7 +1082,7 @@ public function restoreSnapshot($workspace_id, $base_name, $commit_id, $snapshot * * @param int $workspace_id id of your workspace. (required) * @param string $base_name name of your base. (required) - * @param string $commit_id (required) + * @param string $commit_id The commit ID for a base snapshot. (required) * @param string|null $snapshot_name The name of the restored base. Optional. If left blank, a default name will be given. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['restoreSnapshot'] to see the possible values for this operation * @@ -1170,7 +1170,7 @@ public function restoreSnapshotWithHttpInfo($workspace_id, $base_name, $commit_i * * @param int $workspace_id id of your workspace. (required) * @param string $base_name name of your base. (required) - * @param string $commit_id (required) + * @param string $commit_id The commit ID for a base snapshot. (required) * @param string|null $snapshot_name The name of the restored base. Optional. If left blank, a default name will be given. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['restoreSnapshot'] to see the possible values for this operation * @@ -1194,7 +1194,7 @@ function ($response) { * * @param int $workspace_id id of your workspace. (required) * @param string $base_name name of your base. (required) - * @param string $commit_id (required) + * @param string $commit_id The commit ID for a base snapshot. (required) * @param string|null $snapshot_name The name of the restored base. Optional. If left blank, a default name will be given. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['restoreSnapshot'] to see the possible values for this operation * @@ -1247,7 +1247,7 @@ function ($exception) { * * @param int $workspace_id id of your workspace. (required) * @param string $base_name name of your base. (required) - * @param string $commit_id (required) + * @param string $commit_id The commit ID for a base snapshot. (required) * @param string|null $snapshot_name The name of the restored base. Optional. If left blank, a default name will be given. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['restoreSnapshot'] to see the possible values for this operation * @@ -1404,6 +1404,14 @@ protected function createHttpClientOption() } } + if ($this->config->getCertFile()) { + $options[RequestOptions::CERT] = $this->config->getCertFile(); + } + + if ($this->config->getKeyFile()) { + $options[RequestOptions::SSL_KEY] = $this->config->getKeyFile(); + } + return $options; } diff --git a/lib/User/SpecificDateValue.php b/lib/User/SpecificDateValue.php index 274d0e69..8f68cbdd 100644 --- a/lib/User/SpecificDateValue.php +++ b/lib/User/SpecificDateValue.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -383,11 +383,11 @@ public function setValue($value) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -395,12 +395,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -425,11 +425,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/SystemNotificationsApi.php b/lib/User/SystemNotificationsApi.php index 3dac828e..9fbc22d1 100644 --- a/lib/User/SystemNotificationsApi.php +++ b/lib/User/SystemNotificationsApi.php @@ -14,7 +14,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -667,6 +667,14 @@ protected function createHttpClientOption() } } + if ($this->config->getCertFile()) { + $options[RequestOptions::CERT] = $this->config->getCertFile(); + } + + if ($this->config->getKeyFile()) { + $options[RequestOptions::SSL_KEY] = $this->config->getKeyFile(); + } + return $options; } diff --git a/lib/User/TheDayRunningTheTaskValue.php b/lib/User/TheDayRunningTheTaskValue.php index 0be31cc8..305bc02d 100644 --- a/lib/User/TheDayRunningTheTaskValue.php +++ b/lib/User/TheDayRunningTheTaskValue.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -481,11 +481,11 @@ public function setOffsetBy($offset_by) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -493,12 +493,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -523,11 +523,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/Trigger.php b/lib/User/Trigger.php index 25d95979..340d45f6 100644 --- a/lib/User/Trigger.php +++ b/lib/User/Trigger.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -419,11 +419,11 @@ public function setViewId($view_id) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -431,12 +431,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -461,11 +461,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/TriggerRecordsMeetSpecificConditionsAfterModification.php b/lib/User/TriggerRecordsMeetSpecificConditionsAfterModification.php index 3d6839be..080e17f5 100644 --- a/lib/User/TriggerRecordsMeetSpecificConditionsAfterModification.php +++ b/lib/User/TriggerRecordsMeetSpecificConditionsAfterModification.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -555,11 +555,11 @@ public function setWatchAllColumns($watch_all_columns) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -567,12 +567,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -597,11 +597,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/TriggerRecordsMeetSpecificConditionsAfterModificationCondition.php b/lib/User/TriggerRecordsMeetSpecificConditionsAfterModificationCondition.php index 5b2c7b8e..6ee07bd4 100644 --- a/lib/User/TriggerRecordsMeetSpecificConditionsAfterModificationCondition.php +++ b/lib/User/TriggerRecordsMeetSpecificConditionsAfterModificationCondition.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ diff --git a/lib/User/TriggerRowAdded.php b/lib/User/TriggerRowAdded.php index eeebb2bb..2360133e 100644 --- a/lib/User/TriggerRowAdded.php +++ b/lib/User/TriggerRowAdded.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -587,11 +587,11 @@ public function setWatchAllColumns($watch_all_columns) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -599,12 +599,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -629,11 +629,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/TriggerRowAddedCondition.php b/lib/User/TriggerRowAddedCondition.php index b43e9feb..6f5d8ea0 100644 --- a/lib/User/TriggerRowAddedCondition.php +++ b/lib/User/TriggerRowAddedCondition.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ diff --git a/lib/User/TriggerRunPeriodicallyByCondition.php b/lib/User/TriggerRunPeriodicallyByCondition.php index 546b8f26..6481c676 100644 --- a/lib/User/TriggerRunPeriodicallyByCondition.php +++ b/lib/User/TriggerRunPeriodicallyByCondition.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ diff --git a/lib/User/TriggerRunPeriodicallyCondition.php b/lib/User/TriggerRunPeriodicallyCondition.php index 0516687d..0a0684fe 100644 --- a/lib/User/TriggerRunPeriodicallyCondition.php +++ b/lib/User/TriggerRunPeriodicallyCondition.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ diff --git a/lib/User/TriggerRunPeriodicallyOnRecordsMeetPerDay.php b/lib/User/TriggerRunPeriodicallyOnRecordsMeetPerDay.php index 261e69ba..8a597ecd 100644 --- a/lib/User/TriggerRunPeriodicallyOnRecordsMeetPerDay.php +++ b/lib/User/TriggerRunPeriodicallyOnRecordsMeetPerDay.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -417,11 +417,11 @@ public function setActions($actions) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -429,12 +429,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -459,11 +459,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/TriggerRunPeriodicallyOnRecordsMeetPerDayTrigger.php b/lib/User/TriggerRunPeriodicallyOnRecordsMeetPerDayTrigger.php index 004368de..b3f85f7a 100644 --- a/lib/User/TriggerRunPeriodicallyOnRecordsMeetPerDayTrigger.php +++ b/lib/User/TriggerRunPeriodicallyOnRecordsMeetPerDayTrigger.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -555,11 +555,11 @@ public function setNotifyHour($notify_hour) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -567,12 +567,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -597,11 +597,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/TriggerRunPeriodicallyOnRecordsMeetPerMonth.php b/lib/User/TriggerRunPeriodicallyOnRecordsMeetPerMonth.php index 011c8f79..91c0ef22 100644 --- a/lib/User/TriggerRunPeriodicallyOnRecordsMeetPerMonth.php +++ b/lib/User/TriggerRunPeriodicallyOnRecordsMeetPerMonth.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -417,11 +417,11 @@ public function setActions($actions) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -429,12 +429,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -459,11 +459,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/TriggerRunPeriodicallyOnRecordsMeetPerMonthTrigger.php b/lib/User/TriggerRunPeriodicallyOnRecordsMeetPerMonthTrigger.php index a6120ade..ceed6ad5 100644 --- a/lib/User/TriggerRunPeriodicallyOnRecordsMeetPerMonthTrigger.php +++ b/lib/User/TriggerRunPeriodicallyOnRecordsMeetPerMonthTrigger.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -589,11 +589,11 @@ public function setNotifyMonthHour($notify_month_hour) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -601,12 +601,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -631,11 +631,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/TriggerRunPeriodicallyOnRecordsMeetPerWeek.php b/lib/User/TriggerRunPeriodicallyOnRecordsMeetPerWeek.php index 594180bc..c684175c 100644 --- a/lib/User/TriggerRunPeriodicallyOnRecordsMeetPerWeek.php +++ b/lib/User/TriggerRunPeriodicallyOnRecordsMeetPerWeek.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -417,11 +417,11 @@ public function setActions($actions) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -429,12 +429,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -459,11 +459,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/TriggerRunPeriodicallyOnRecordsMeetPerWeekTrigger.php b/lib/User/TriggerRunPeriodicallyOnRecordsMeetPerWeekTrigger.php index 67170476..d61527af 100644 --- a/lib/User/TriggerRunPeriodicallyOnRecordsMeetPerWeekTrigger.php +++ b/lib/User/TriggerRunPeriodicallyOnRecordsMeetPerWeekTrigger.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -589,11 +589,11 @@ public function setNotifyWeekHour($notify_week_hour) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -601,12 +601,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -631,11 +631,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/TriggerRunPeriodicallyPerDay.php b/lib/User/TriggerRunPeriodicallyPerDay.php index 517c5735..d83112c7 100644 --- a/lib/User/TriggerRunPeriodicallyPerDay.php +++ b/lib/User/TriggerRunPeriodicallyPerDay.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -417,11 +417,11 @@ public function setActions($actions) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -429,12 +429,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -459,11 +459,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/TriggerRunPeriodicallyPerDayTrigger.php b/lib/User/TriggerRunPeriodicallyPerDayTrigger.php index 42d0494e..01525ed5 100644 --- a/lib/User/TriggerRunPeriodicallyPerDayTrigger.php +++ b/lib/User/TriggerRunPeriodicallyPerDayTrigger.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -487,11 +487,11 @@ public function setNotifyHour($notify_hour) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -499,12 +499,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -529,11 +529,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/TriggerRunPeriodicallyPerMonth.php b/lib/User/TriggerRunPeriodicallyPerMonth.php index 77afe779..ddc12c86 100644 --- a/lib/User/TriggerRunPeriodicallyPerMonth.php +++ b/lib/User/TriggerRunPeriodicallyPerMonth.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -417,11 +417,11 @@ public function setActions($actions) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -429,12 +429,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -459,11 +459,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/TriggerRunPeriodicallyPerMonthTrigger.php b/lib/User/TriggerRunPeriodicallyPerMonthTrigger.php index de2e8a4f..015c75ec 100644 --- a/lib/User/TriggerRunPeriodicallyPerMonthTrigger.php +++ b/lib/User/TriggerRunPeriodicallyPerMonthTrigger.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -521,11 +521,11 @@ public function setNotifyMonthHour($notify_month_hour) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -533,12 +533,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -563,11 +563,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/TriggerRunPeriodicallyPerWeek.php b/lib/User/TriggerRunPeriodicallyPerWeek.php index 5416a6af..b9ef4b9f 100644 --- a/lib/User/TriggerRunPeriodicallyPerWeek.php +++ b/lib/User/TriggerRunPeriodicallyPerWeek.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -417,11 +417,11 @@ public function setActions($actions) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -429,12 +429,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -459,11 +459,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/TriggerRunPeriodicallyPerWeekTrigger.php b/lib/User/TriggerRunPeriodicallyPerWeekTrigger.php index 70737349..b739a0d3 100644 --- a/lib/User/TriggerRunPeriodicallyPerWeekTrigger.php +++ b/lib/User/TriggerRunPeriodicallyPerWeekTrigger.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -521,11 +521,11 @@ public function setNotifyWeekHour($notify_week_hour) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -533,12 +533,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -563,11 +563,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/UnsetPassword.php b/lib/User/UnsetPassword.php index 49b74960..d3997710 100644 --- a/lib/User/UnsetPassword.php +++ b/lib/User/UnsetPassword.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -417,11 +417,11 @@ public function setPassword($password) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -429,12 +429,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -459,11 +459,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/UpdateCommonDatasetSyncRequest.php b/lib/User/UpdateCommonDatasetSyncRequest.php index 70b77345..29e4d92c 100644 --- a/lib/User/UpdateCommonDatasetSyncRequest.php +++ b/lib/User/UpdateCommonDatasetSyncRequest.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -385,11 +385,11 @@ public function setDstTableId($dst_table_id) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -397,12 +397,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -427,11 +427,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/UpdateGroup200Response.php b/lib/User/UpdateGroup200Response.php new file mode 100644 index 00000000..95f5eb70 --- /dev/null +++ b/lib/User/UpdateGroup200Response.php @@ -0,0 +1,612 @@ + + */ +class UpdateGroup200Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'updateGroup_200_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'id' => 'int', + 'parent_group_id' => 'int', + 'name' => 'string', + 'owner' => 'string', + 'created_at' => 'string', + 'avatar_url' => 'string', + 'admins' => 'string[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'id' => null, + 'parent_group_id' => null, + 'name' => null, + 'owner' => null, + 'created_at' => null, + 'avatar_url' => null, + 'admins' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'id' => false, + 'parent_group_id' => false, + 'name' => false, + 'owner' => false, + 'created_at' => false, + 'avatar_url' => false, + 'admins' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'parent_group_id' => 'parent_group_id', + 'name' => 'name', + 'owner' => 'owner', + 'created_at' => 'created_at', + 'avatar_url' => 'avatar_url', + 'admins' => 'admins' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'parent_group_id' => 'setParentGroupId', + 'name' => 'setName', + 'owner' => 'setOwner', + 'created_at' => 'setCreatedAt', + 'avatar_url' => 'setAvatarUrl', + 'admins' => 'setAdmins' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'parent_group_id' => 'getParentGroupId', + 'name' => 'getName', + 'owner' => 'getOwner', + 'created_at' => 'getCreatedAt', + 'avatar_url' => 'getAvatarUrl', + 'admins' => 'getAdmins' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('parent_group_id', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('owner', $data ?? [], null); + $this->setIfExists('created_at', $data ?? [], null); + $this->setIfExists('avatar_url', $data ?? [], null); + $this->setIfExists('admins', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return int|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int|null $id id + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets parent_group_id + * + * @return int|null + */ + public function getParentGroupId() + { + return $this->container['parent_group_id']; + } + + /** + * Sets parent_group_id + * + * @param int|null $parent_group_id parent_group_id + * + * @return self + */ + public function setParentGroupId($parent_group_id) + { + if (is_null($parent_group_id)) { + throw new \InvalidArgumentException('non-nullable parent_group_id cannot be null'); + } + $this->container['parent_group_id'] = $parent_group_id; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name name + * + * @return self + */ + public function setName($name) + { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets owner + * + * @return string|null + */ + public function getOwner() + { + return $this->container['owner']; + } + + /** + * Sets owner + * + * @param string|null $owner owner + * + * @return self + */ + public function setOwner($owner) + { + if (is_null($owner)) { + throw new \InvalidArgumentException('non-nullable owner cannot be null'); + } + $this->container['owner'] = $owner; + + return $this; + } + + /** + * Gets created_at + * + * @return string|null + */ + public function getCreatedAt() + { + return $this->container['created_at']; + } + + /** + * Sets created_at + * + * @param string|null $created_at created_at + * + * @return self + */ + public function setCreatedAt($created_at) + { + if (is_null($created_at)) { + throw new \InvalidArgumentException('non-nullable created_at cannot be null'); + } + $this->container['created_at'] = $created_at; + + return $this; + } + + /** + * Gets avatar_url + * + * @return string|null + */ + public function getAvatarUrl() + { + return $this->container['avatar_url']; + } + + /** + * Sets avatar_url + * + * @param string|null $avatar_url avatar_url + * + * @return self + */ + public function setAvatarUrl($avatar_url) + { + if (is_null($avatar_url)) { + throw new \InvalidArgumentException('non-nullable avatar_url cannot be null'); + } + $this->container['avatar_url'] = $avatar_url; + + return $this; + } + + /** + * Gets admins + * + * @return string[]|null + */ + public function getAdmins() + { + return $this->container['admins']; + } + + /** + * Sets admins + * + * @param string[]|null $admins admins + * + * @return self + */ + public function setAdmins($admins) + { + if (is_null($admins)) { + throw new \InvalidArgumentException('non-nullable admins cannot be null'); + } + $this->container['admins'] = $admins; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/User/UpdateGroupRequest.php b/lib/User/UpdateGroupRequest.php index fcf4fcf2..0e063ac3 100644 --- a/lib/User/UpdateGroupRequest.php +++ b/lib/User/UpdateGroupRequest.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -351,11 +351,11 @@ public function setOwner($owner) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -363,12 +363,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -393,11 +393,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/UpdateGroupRoleRequest.php b/lib/User/UpdateGroupRoleRequest.php index 62ffe242..87179233 100644 --- a/lib/User/UpdateGroupRoleRequest.php +++ b/lib/User/UpdateGroupRoleRequest.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -317,11 +317,11 @@ public function setIsAdmin($is_admin) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -329,12 +329,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -359,11 +359,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/UpdateNotificationRuleRequest.php b/lib/User/UpdateNotificationRuleRequest.php index 84ebce7c..1180fc61 100644 --- a/lib/User/UpdateNotificationRuleRequest.php +++ b/lib/User/UpdateNotificationRuleRequest.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -385,11 +385,11 @@ public function setAction($action) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -397,12 +397,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -427,11 +427,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/UserApi.php b/lib/User/UserApi.php index 5c5368e1..7ee3c68a 100644 --- a/lib/User/UserApi.php +++ b/lib/User/UserApi.php @@ -14,7 +14,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -423,7 +423,7 @@ public function addUserAvatarRequest($avatar = null, $avatar_size = null, string * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return object + * @return \SeaTable\Client\User\GetAccountInfo200Response|object|object */ public function getAccountInfo(string $contentType = self::contentTypes['getAccountInfo'][0]) { @@ -440,7 +440,7 @@ public function getAccountInfo(string $contentType = self::contentTypes['getAcco * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) + * @return array of \SeaTable\Client\User\GetAccountInfo200Response|object|object, HTTP status code, HTTP response headers (array of strings) */ public function getAccountInfoWithHttpInfo(string $contentType = self::contentTypes['getAccountInfo'][0]) { @@ -471,6 +471,18 @@ public function getAccountInfoWithHttpInfo(string $contentType = self::contentTy switch($statusCode) { case 200: + return $this->handleResponseWithDataType( + '\SeaTable\Client\User\GetAccountInfo200Response', + $request, + $response, + ); + case 401: + return $this->handleResponseWithDataType( + 'object', + $request, + $response, + ); + case 403: return $this->handleResponseWithDataType( 'object', $request, @@ -494,13 +506,29 @@ public function getAccountInfoWithHttpInfo(string $contentType = self::contentTy } return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\User\GetAccountInfo200Response', $request, $response, ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\SeaTable\Client\User\GetAccountInfo200Response', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + 'object', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), 'object', @@ -547,7 +575,7 @@ function ($response) { */ public function getAccountInfoAsyncWithHttpInfo(string $contentType = self::contentTypes['getAccountInfo'][0]) { - $returnType = 'object'; + $returnType = '\SeaTable\Client\User\GetAccountInfo200Response'; $request = $this->getAccountInfoRequest($contentType); return $this->client @@ -671,12 +699,12 @@ public function getAccountInfoRequest(string $contentType = self::contentTypes[' * * Get Public User Info * - * @param string $user_id user_id (required) + * @param string $user_id The unique user ID in the format `xxx@auth.local`. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPublicUserInfo'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return object + * @return \SeaTable\Client\User\GetPublicUserInfo200Response */ public function getPublicUserInfo($user_id, string $contentType = self::contentTypes['getPublicUserInfo'][0]) { @@ -689,12 +717,12 @@ public function getPublicUserInfo($user_id, string $contentType = self::contentT * * Get Public User Info * - * @param string $user_id (required) + * @param string $user_id The unique user ID in the format `xxx@auth.local`. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPublicUserInfo'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) + * @return array of \SeaTable\Client\User\GetPublicUserInfo200Response, HTTP status code, HTTP response headers (array of strings) */ public function getPublicUserInfoWithHttpInfo($user_id, string $contentType = self::contentTypes['getPublicUserInfo'][0]) { @@ -726,7 +754,7 @@ public function getPublicUserInfoWithHttpInfo($user_id, string $contentType = se switch($statusCode) { case 200: return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\User\GetPublicUserInfo200Response', $request, $response, ); @@ -748,7 +776,7 @@ public function getPublicUserInfoWithHttpInfo($user_id, string $contentType = se } return $this->handleResponseWithDataType( - 'object', + '\SeaTable\Client\User\GetPublicUserInfo200Response', $request, $response, ); @@ -757,7 +785,7 @@ public function getPublicUserInfoWithHttpInfo($user_id, string $contentType = se case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - 'object', + '\SeaTable\Client\User\GetPublicUserInfo200Response', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -774,7 +802,7 @@ public function getPublicUserInfoWithHttpInfo($user_id, string $contentType = se * * Get Public User Info * - * @param string $user_id (required) + * @param string $user_id The unique user ID in the format `xxx@auth.local`. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPublicUserInfo'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -795,7 +823,7 @@ function ($response) { * * Get Public User Info * - * @param string $user_id (required) + * @param string $user_id The unique user ID in the format `xxx@auth.local`. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPublicUserInfo'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -803,7 +831,7 @@ function ($response) { */ public function getPublicUserInfoAsyncWithHttpInfo($user_id, string $contentType = self::contentTypes['getPublicUserInfo'][0]) { - $returnType = 'object'; + $returnType = '\SeaTable\Client\User\GetPublicUserInfo200Response'; $request = $this->getPublicUserInfoRequest($user_id, $contentType); return $this->client @@ -845,7 +873,7 @@ function ($exception) { /** * Create request for operation 'getPublicUserInfo' * - * @param string $user_id (required) + * @param string $user_id The unique user ID in the format `xxx@auth.local`. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPublicUserInfo'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1211,7 +1239,7 @@ public function listPublicUserInfosRequest($list_public_user_infos_request = nul * * Search User * - * @param string|null $q q (optional) + * @param string|null $q Search query string. Matches against email, name, or contact email. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['searchUser'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -1229,7 +1257,7 @@ public function searchUser($q = null, string $contentType = self::contentTypes[' * * Search User * - * @param string|null $q (optional) + * @param string|null $q Search query string. Matches against email, name, or contact email. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['searchUser'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -1314,7 +1342,7 @@ public function searchUserWithHttpInfo($q = null, string $contentType = self::co * * Search User * - * @param string|null $q (optional) + * @param string|null $q Search query string. Matches against email, name, or contact email. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['searchUser'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1335,7 +1363,7 @@ function ($response) { * * Search User * - * @param string|null $q (optional) + * @param string|null $q Search query string. Matches against email, name, or contact email. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['searchUser'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1385,7 +1413,7 @@ function ($exception) { /** * Create request for operation 'searchUser' * - * @param string|null $q (optional) + * @param string|null $q Search query string. Matches against email, name, or contact email. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['searchUser'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1757,6 +1785,14 @@ protected function createHttpClientOption() } } + if ($this->config->getCertFile()) { + $options[RequestOptions::CERT] = $this->config->getCertFile(); + } + + if ($this->config->getKeyFile()) { + $options[RequestOptions::SSL_KEY] = $this->config->getKeyFile(); + } + return $options; } diff --git a/lib/User/UsersInfo.php b/lib/User/UsersInfo.php index e4fc3bd3..f4df07c8 100644 --- a/lib/User/UsersInfo.php +++ b/lib/User/UsersInfo.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -351,11 +351,11 @@ public function setRoleId($role_id) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -363,12 +363,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -393,11 +393,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/WebhooksApi.php b/lib/User/WebhooksApi.php index d2eadd5b..cc309e06 100644 --- a/lib/User/WebhooksApi.php +++ b/lib/User/WebhooksApi.php @@ -14,7 +14,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -458,7 +458,7 @@ public function createWebhookRequest($workspace_id, $base_name, $url = null, $se * * @param int $workspace_id id of your workspace. (required) * @param string $base_name name of your base. (required) - * @param int $webhook_id webhook_id (required) + * @param int $webhook_id The ID of the webhook. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteWebhook'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -478,7 +478,7 @@ public function deleteWebhook($workspace_id, $base_name, $webhook_id, string $co * * @param int $workspace_id id of your workspace. (required) * @param string $base_name name of your base. (required) - * @param int $webhook_id (required) + * @param int $webhook_id The ID of the webhook. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteWebhook'] to see the possible values for this operation * * @throws \SeaTable\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -565,7 +565,7 @@ public function deleteWebhookWithHttpInfo($workspace_id, $base_name, $webhook_id * * @param int $workspace_id id of your workspace. (required) * @param string $base_name name of your base. (required) - * @param int $webhook_id (required) + * @param int $webhook_id The ID of the webhook. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteWebhook'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -588,7 +588,7 @@ function ($response) { * * @param int $workspace_id id of your workspace. (required) * @param string $base_name name of your base. (required) - * @param int $webhook_id (required) + * @param int $webhook_id The ID of the webhook. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteWebhook'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -640,7 +640,7 @@ function ($exception) { * * @param int $workspace_id id of your workspace. (required) * @param string $base_name name of your base. (required) - * @param int $webhook_id (required) + * @param int $webhook_id The ID of the webhook. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteWebhook'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1071,7 +1071,7 @@ public function listWebhooksRequest($workspace_id, $base_name, string $contentTy * * @param int $workspace_id id of your workspace. (required) * @param string $base_name name of your base. (required) - * @param int $webhook_id webhook_id (required) + * @param int $webhook_id The ID of the webhook. (required) * @param string|null $url The URL of the webhook. It should start with `http(s)`. Required. (optional) * @param int|null $secret When you set a secret, you'll receive the X-SeaTable-Signature header, whose value is the result of SHA1 encryption of the secret key, in the webhook POST request. Optional. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateWebhook'] to see the possible values for this operation @@ -1093,7 +1093,7 @@ public function updateWebhook($workspace_id, $base_name, $webhook_id, $url = nul * * @param int $workspace_id id of your workspace. (required) * @param string $base_name name of your base. (required) - * @param int $webhook_id (required) + * @param int $webhook_id The ID of the webhook. (required) * @param string|null $url The URL of the webhook. It should start with `http(s)`. Required. (optional) * @param int|null $secret When you set a secret, you'll receive the X-SeaTable-Signature header, whose value is the result of SHA1 encryption of the secret key, in the webhook POST request. Optional. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateWebhook'] to see the possible values for this operation @@ -1182,7 +1182,7 @@ public function updateWebhookWithHttpInfo($workspace_id, $base_name, $webhook_id * * @param int $workspace_id id of your workspace. (required) * @param string $base_name name of your base. (required) - * @param int $webhook_id (required) + * @param int $webhook_id The ID of the webhook. (required) * @param string|null $url The URL of the webhook. It should start with `http(s)`. Required. (optional) * @param int|null $secret When you set a secret, you'll receive the X-SeaTable-Signature header, whose value is the result of SHA1 encryption of the secret key, in the webhook POST request. Optional. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateWebhook'] to see the possible values for this operation @@ -1207,7 +1207,7 @@ function ($response) { * * @param int $workspace_id id of your workspace. (required) * @param string $base_name name of your base. (required) - * @param int $webhook_id (required) + * @param int $webhook_id The ID of the webhook. (required) * @param string|null $url The URL of the webhook. It should start with `http(s)`. Required. (optional) * @param int|null $secret When you set a secret, you'll receive the X-SeaTable-Signature header, whose value is the result of SHA1 encryption of the secret key, in the webhook POST request. Optional. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateWebhook'] to see the possible values for this operation @@ -1261,7 +1261,7 @@ function ($exception) { * * @param int $workspace_id id of your workspace. (required) * @param string $base_name name of your base. (required) - * @param int $webhook_id (required) + * @param int $webhook_id The ID of the webhook. (required) * @param string|null $url The URL of the webhook. It should start with `http(s)`. Required. (optional) * @param int|null $secret When you set a secret, you'll receive the X-SeaTable-Signature header, whose value is the result of SHA1 encryption of the secret key, in the webhook POST request. Optional. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateWebhook'] to see the possible values for this operation @@ -1421,6 +1421,14 @@ protected function createHttpClientOption() } } + if ($this->config->getCertFile()) { + $options[RequestOptions::CERT] = $this->config->getCertFile(); + } + + if ($this->config->getKeyFile()) { + $options[RequestOptions::SSL_KEY] = $this->config->getKeyFile(); + } + return $options; } diff --git a/lib/User/XDaysBeforeRunningTheTaskValue.php b/lib/User/XDaysBeforeRunningTheTaskValue.php index 73f73f3f..86c418a4 100644 --- a/lib/User/XDaysBeforeRunningTheTaskValue.php +++ b/lib/User/XDaysBeforeRunningTheTaskValue.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -449,11 +449,11 @@ public function setOffsetBy($offset_by) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -461,12 +461,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -491,11 +491,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/XxxExactDate.php b/lib/User/XxxExactDate.php index 7b491324..1a12bf41 100644 --- a/lib/User/XxxExactDate.php +++ b/lib/User/XxxExactDate.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -503,11 +503,11 @@ public function setFilterTermModifier($filter_term_modifier) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -515,12 +515,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -545,11 +545,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/XxxNumberOfDaysAgo.php b/lib/User/XxxNumberOfDaysAgo.php index bb99a282..30336516 100644 --- a/lib/User/XxxNumberOfDaysAgo.php +++ b/lib/User/XxxNumberOfDaysAgo.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -494,11 +494,11 @@ public function setFilterTermModifier($filter_term_modifier) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -506,12 +506,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -536,11 +536,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/XxxNumberOfDaysFromNow.php b/lib/User/XxxNumberOfDaysFromNow.php index 401f7d8b..df687976 100644 --- a/lib/User/XxxNumberOfDaysFromNow.php +++ b/lib/User/XxxNumberOfDaysFromNow.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -494,11 +494,11 @@ public function setFilterTermModifier($filter_term_modifier) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -506,12 +506,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -536,11 +536,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/XxxOneMonthAgo.php b/lib/User/XxxOneMonthAgo.php index 9c7820a9..b4c7c392 100644 --- a/lib/User/XxxOneMonthAgo.php +++ b/lib/User/XxxOneMonthAgo.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -494,11 +494,11 @@ public function setFilterTermModifier($filter_term_modifier) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -506,12 +506,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -536,11 +536,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/XxxOneMonthFromNow.php b/lib/User/XxxOneMonthFromNow.php index a6637e83..8a552661 100644 --- a/lib/User/XxxOneMonthFromNow.php +++ b/lib/User/XxxOneMonthFromNow.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -494,11 +494,11 @@ public function setFilterTermModifier($filter_term_modifier) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -506,12 +506,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -536,11 +536,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/XxxOneWeekAgo.php b/lib/User/XxxOneWeekAgo.php index b822a57c..69771e45 100644 --- a/lib/User/XxxOneWeekAgo.php +++ b/lib/User/XxxOneWeekAgo.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -494,11 +494,11 @@ public function setFilterTermModifier($filter_term_modifier) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -506,12 +506,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -536,11 +536,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/XxxOneWeekFromNow.php b/lib/User/XxxOneWeekFromNow.php index 34ceb52f..4074cb98 100644 --- a/lib/User/XxxOneWeekFromNow.php +++ b/lib/User/XxxOneWeekFromNow.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -494,11 +494,11 @@ public function setFilterTermModifier($filter_term_modifier) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -506,12 +506,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -536,11 +536,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/XxxToday.php b/lib/User/XxxToday.php index a5693086..41074b57 100644 --- a/lib/User/XxxToday.php +++ b/lib/User/XxxToday.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -494,11 +494,11 @@ public function setFilterTermModifier($filter_term_modifier) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -506,12 +506,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -536,11 +536,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/XxxTomorrow.php b/lib/User/XxxTomorrow.php index a1614366..163e5187 100644 --- a/lib/User/XxxTomorrow.php +++ b/lib/User/XxxTomorrow.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -494,11 +494,11 @@ public function setFilterTermModifier($filter_term_modifier) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -506,12 +506,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -536,11 +536,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/User/XxxYesterday.php b/lib/User/XxxYesterday.php index 907b8f66..917bd104 100644 --- a/lib/User/XxxYesterday.php +++ b/lib/User/XxxYesterday.php @@ -15,7 +15,7 @@ * * The official SeaTable API Reference (OpenAPI 3.0). * - * The version of the OpenAPI document: 6.0 + * The version of the OpenAPI document: 6.1 * Generated by: https://openapi-generator.tech */ @@ -494,11 +494,11 @@ public function setFilterTermModifier($filter_term_modifier) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -506,12 +506,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -536,11 +536,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/openapi_input/authentication.yaml b/openapi_input/authentication.yaml index 6dea57d5..ab829d4e 100644 --- a/openapi_input/authentication.yaml +++ b/openapi_input/authentication.yaml @@ -3,19 +3,13 @@ info: title: Authentication description: >- The official SeaTable API Reference (OpenAPI 3.0). - version: "6.0" + version: "6.1" servers: - url: "https://{server}" variables: server: default: cloud.seatable.io -## Questions for later: -# - why is the return value always 200 but only once 201? -# - create temporary token > why is this a GET request? -# - app_name is sometimes param, sometimes body, is there a reason for that? -# - return values of auth. varies: "get base-token with api-token delivers 8 values back", "Get base-token with account-token" delivers only 5 values back. Why not the same? - x-readme: explorer-enabled: true metrics-enabled: false @@ -71,7 +65,7 @@ components: workspace_id: name: workspace_id description: | - The id of the workspace. For an explanation how to get the *workspace_id*, check out this [help-article](https://seatable.com/help/workspace-id-einer-gruppe-ermitteln/). + The id of the workspace. For an explanation how to get the *workspace_id*, check out this [help-article](https://seatable.com/help/find-workspace-id-group/). Alternatively the API endpoint [get metadata](/reference/getmetadata) can be used. in: path schema: @@ -99,8 +93,8 @@ components: name: external_link_token description: | The random string from the external link. Eg: - - If the external link is https://cloud.seatable.io/dtable/external-links/c41cef71f5094827a786, the link token is *c41cef71f5094827a786*. - - If the external link is a custom link like https://cloud.seatable.io/dtable/external-links/custom/my-personal-link, the link token is only *my-personal-link*. + - If the external link is https://cloud.seatable.io/dtable/external-links/c41cef71f5094827a786/, the link token is *c41cef71f5094827a786*. + - If the external link is a custom link like https://cloud.seatable.io/dtable/external-links/custom/my-personal-link/, the link token is only *my-personal-link*. in: path schema: type: string @@ -110,7 +104,7 @@ components: schemas: AccountToken: type: object - description: account-token ... + description: The account token used for authenticating API requests. properties: token: type: string @@ -119,9 +113,10 @@ components: maxLength: 40 ApiTokenList: type: object - description: ... + description: List of API tokens for a base. properties: api_tokens: + type: array items: $ref: "#/components/schemas/ApiToken" ApiToken: @@ -149,7 +144,7 @@ components: example: app_name: Example api_token: 1234567f17157cd6c41fdb202813f8d9a9fi3yr7 - generated_by: 1234566569491ba42905bf1647fd3f@auth.local + generated_by: 123456600569491ba42905bf1647fd3f@auth.local generated_at: "2021-03-02T09:47:41+00:00" last_access: "2021-03-02T09:47:41+00:00" permission: rw @@ -174,7 +169,7 @@ components: format: uuid example: access_token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE2MTQzNTI1OTQsImR0YWJsZV91dWlkIjoiNjUwZDhhMGQtN2UyNy00NmE4LThiMTgtNmNjNmYzZGIyMDU3IiwidXNlcm5hbWUiOiIiLCJwZXJtaXNzaW9uIjoicnciLCJhcHBfbmFtZSI6InBvc3RtYW4ifQ.4aTmvBfFElyB3xg5jjF7zWCiyRZI17SZD980GdHT6e3 - dtable_uuid: 650d8a0d-7e27-46a8-8b18-6cc6f384ufy4 + dtable_uuid: 650d8a0d-7e27-46a8-8b18-6cc6f3db2057 authentication_permission: type: string @@ -219,7 +214,7 @@ paths: schema: $ref: "#/components/schemas/AccountToken" "400": - description: Forbidden + description: Bad Request content: application/json: example: @@ -249,6 +244,29 @@ paths: application/json: schema: $ref: "#/components/schemas/ApiTokenList" + example: + api_tokens: + - app_name: "My App" + api_token: "4ed751818b040c85a49a2aff29f0176d032269fb" + generated_by: "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6@auth.local" + generated_at: "2021-03-02T09:47:41+00:00" + last_access: "2021-03-02T09:47:41+00:00" + permission: "rw" + "401": + description: Unauthorized + content: + application/json: + example: { "detail": "Invalid token" } + "403": + description: Forbidden + content: + application/json: + example: { "detail": "Authentication credentials were not provided." } + "404": + description: Not Found + content: + application/json: + example: { "error_msg": "Workspace 99999 not found." } post: tags: - API-Token @@ -278,11 +296,26 @@ paths: - $ref: "#/components/parameters/base_name" responses: "201": - description: Ok + description: Created content: application/json: schema: $ref: "#/components/schemas/ApiToken" + "400": + description: Bad Request + content: + application/json: + example: { "error_msg": "app_name invalid." } + "401": + description: Unauthorized + content: + application/json: + example: { "detail": "Invalid token" } + "403": + description: Forbidden + content: + application/json: + example: { "detail": "Authentication credentials were not provided." } /api/v2.1/workspace/{workspace_id}/dtable/{base_name}/temp-api-token/: get: @@ -303,6 +336,21 @@ paths: application/json: schema: $ref: "#/components/schemas/ApiTokenTemporary" + "401": + description: Unauthorized + content: + application/json: + example: { "detail": "Invalid token" } + "403": + description: Forbidden + content: + application/json: + example: { "detail": "Authentication credentials were not provided." } + "404": + description: Not Found + content: + application/json: + example: { "error_msg": "Workspace 99999 not found." } /api/v2.1/workspace/{workspace_id}/dtable/{base_name}/api-tokens/{app_name}/: put: @@ -335,13 +383,28 @@ paths: application/json: schema: $ref: "#/components/schemas/ApiToken" + "401": + description: Unauthorized + content: + application/json: + example: { "detail": "Invalid token" } + "403": + description: Forbidden + content: + application/json: + example: { "detail": "Authentication credentials were not provided." } + "404": + description: Not Found + content: + application/json: + example: { "error_msg": "dtable not found." } delete: tags: - API-Token summary: Delete API-Token operationId: deleteApiToken description: >- - Delete one specific API token from a base. The token is identified by his *app_name*. + Delete one specific API token from a base. The token is identified by its *app_name*. security: - AccountTokenAuth: [] parameters: @@ -357,6 +420,21 @@ paths: type: object example: success: true + "401": + description: Unauthorized + content: + application/json: + example: { "detail": "Invalid token" } + "403": + description: Forbidden + content: + application/json: + example: { "detail": "Authentication credentials were not provided." } + "404": + description: Not Found + content: + application/json: + example: { "error_msg": "dtable not found." } /api/v2.1/dtable/app-access-token/: get: @@ -377,11 +455,26 @@ paths: application/json: schema: type: object + properties: + app_name: + type: string + access_token: + type: string + dtable_uuid: + type: string + dtable_server: + type: string + workspace_id: + type: integer + use_api_gateway: + type: boolean + dtable_name: + type: string example: app_name: postman access_token: >- eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE2MTQzNTI1OTQsImR0YWJsZV91dWlkIjoiNjUwZDhhMGQtN2UyNy00NmE4LThiMTgtNmNjNmYzZGIyMDU3IiwidXNlcm5hbWUiOiIiLCJwZXJtaXNzaW9uIjoicnciLCJhcHBfbmFtZSI6InBvc3RtYW4ifQ.4aTmvBfFElyB3xg5jjF7zWCiyRZI17SZD980GdHT6e3 - dtable_uuid: 650d8a0d-7e27-46a8-8b18-6cc6f384ufy4 + dtable_uuid: 650d8a0d-7e27-46a8-8b18-6cc6f3db2057 dtable_server: https://cloud.seatable.io/api-gateway/ workspace_id: 20 use_api_gateway: true @@ -417,30 +510,17 @@ paths: schema: $ref: "#/components/schemas/AccessToken" "401": - description: "Forbidden" + description: "Unauthorized" content: application/json: example: { "detail": "Invalid token" } + "403": + description: "Forbidden" + content: + application/json: + example: { "detail": "Authentication credentials were not provided." } "404": description: Not found content: application/json: example: { "error_msg": "dtable not found." } - - /api/v2.1/external-link-tokens/{external_link_token}/access-token/: - get: - tags: - - Base-Token - summary: Get Base-Token with External-Link - operationId: getBaseTokenWithExternLink - description: >- - Generate a Base-Token from an external link to this base. Because external links always grant read-only permissions, the Base-Token generated from a external link will only grant read permissions to the base. - parameters: - - $ref: "#/components/parameters/external_link_token" - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: "#/components/schemas/AccessToken" diff --git a/openapi_input/base_operations.yaml b/openapi_input/base_operations.yaml index f773e008..878bec3f 100644 --- a/openapi_input/base_operations.yaml +++ b/openapi_input/base_operations.yaml @@ -3,7 +3,7 @@ info: title: Base Operations description: >- The official SeaTable API Reference (OpenAPI 3.0). - version: "6.0" + version: "6.1" servers: - url: "https://{server}" variables: @@ -118,7 +118,7 @@ components: required: false description: | The name of the view to perform the operation on. Alternatively, you can use the `view_id` instead of `view_name`. If using `view_id`, ensure that the key in the request body is replaced accordingly. - **Example:** Instead of `view_name: Default View` you an use `view_id: 0000`. + **Example:** Instead of `view_name: Default View` you can use `view_id: 0000`. example: "Default View" order_by: name: order_by @@ -172,10 +172,11 @@ components: schema: type: integer description: | - offset is the beginning number of your query. 0 by default. If your record is linked to multiple records, use e.g. 0 to start quering from the 1st element or e.g. 5 to start querying from the 6th element, etc. **Attention:** The returned list of linked rows is not ordered by its original order on the web interface, but rather by created time (ctime). + offset is the beginning number of your query. 0 by default. If your record is linked to multiple records, use e.g. 0 to start querying from the 1st element or e.g. 5 to start querying from the 6th element, etc. **Attention:** The returned list of linked rows is not ordered by its original order on the web interface, but rather by created time (ctime). example: 0 days: name: days + description: Number of days to look back for comments. in: query schema: type: integer @@ -213,10 +214,10 @@ components: in: path schema: type: string - pattern: ^[A-Za-z0-9]{22}$ + pattern: ^[A-Za-z0-9\-\_]{22}$ required: true description: The id of the row. - example: Qtf7xPmoRaiFyQPO1aENTjb + example: Qtf7xPmoRaiFyQPO1aENTj view_name_path: name: view_name in: path @@ -257,9 +258,9 @@ components: schemas: row_id: type: string - pattern: '^[a-zA-Z0-9\-\_]{22}$' + pattern: ^[A-Za-z0-9\-\_]{22}$ description: The id of the row. The id of a row is unique inside a base and is often used to identify one specific row. - example: "Qtf7xPmoRaiFyQPO1aENTjb" + example: "Qtf7xPmoRaiFyQPO1aENTj" base: type: object description: base (database) in SeaTable @@ -458,7 +459,7 @@ components: insert_row: title: Insert a row (above or below another row) type: object - description: Insert a row below or above another row your specified by his row-ID. + description: Insert a row below or above another row you specified by its row ID. properties: table_name: $ref: "#/components/schemas/table_name" @@ -567,7 +568,7 @@ components: $ref: "#/components/schemas/table_name" row_ids: type: array - description: "Defines the rows which should be updated." + description: "Defines the rows which should be deleted." items: $ref: "#/components/schemas/row_id" required: @@ -645,7 +646,7 @@ components: $ref: "#/components/schemas/row_id" offset: type: integer - description: "Offset is the beginning number of your query. If your record is linked to multiple records, use e.g. 0 to start quering from the 1st element or e.g. 5 to start querying from the 6th element, etc. Attention: The returned list of linked rows is not ordered by its original order on the web interface, but rather by created time (ctime). Default is 0." + description: "Offset is the beginning number of your query. If your record is linked to multiple records, use e.g. 0 to start querying from the 1st element or e.g. 5 to start querying from the 6th element, etc. Attention: The returned list of linked rows is not ordered by its original order on the web interface, but rather by created time (ctime). Default is 0." limit: type: integer description: "Specify the maximum number of records to be returned. For example, use 20 to retrieve more than the default 10 records." @@ -658,7 +659,7 @@ components: match_link_columns: type: object - description: update multiple rows + description: Match and link rows from two tables based on matching column values. properties: link_id: $ref: "#/components/schemas/link_id" @@ -737,7 +738,7 @@ components: type: string description: | The name of the view to perform the operation on. Alternatively, you can use the `view_id` instead of `view_name`. If using `view_id`, ensure that the key in the request body is replaced accordingly. - **Example:** Instead of `view_name: Default View` you an use `view_id: 0000`. + **Example:** Instead of `view_name: Default View` you can use `view_id: 0000`. example: "Default View" view_name_only: @@ -889,7 +890,7 @@ components: date_filter_term: type: string - pattern: "^[0-9]{4}-((0[1-9])|(1[0-2]))?-(([0-2][0-9])|(3[01]))?$" # --> pattern für das Datum im Format 2012-03-30 + pattern: "^[0-9]{4}-((0[1-9])|(1[0-2]))?-(([0-2][0-9])|(3[01]))?$" filter_term_modifier: type: string @@ -913,7 +914,7 @@ components: filter_conjunction: type: string enum: ["And", "Or"] - description: "If your view has multiple filters you have to decide how the filters are should hang together." + description: "If your view has multiple filters you have to decide how the filters should hang together." sort_type: type: string @@ -945,7 +946,7 @@ components: type: array items: type: string - description: "IDs of the rows that should be hidden" + description: "IDs of the columns that should be hidden" filters_text: title: Text @@ -1055,7 +1056,7 @@ components: properties: column_key: $ref: "#/components/schemas/column_key" - email_filter_predicate: + filter_predicate: $ref: "#/components/schemas/email_filter_predicate" filter_term: $ref: "#/components/schemas/filter_term" @@ -1241,7 +1242,6 @@ components: - $ref: "#/components/schemas/filters_automatic" - $ref: "#/components/schemas/filters_percentage" - $ref: "#/components/schemas/filters_date-time" - - $ref: "#/components/schemas/filters_url" - $ref: "#/components/schemas/filters_geolocation" filter_conjunction: $ref: "#/components/schemas/filter_conjunction" @@ -1507,18 +1507,18 @@ components: description: The name of your option. color: type: string - description: select your code-code for the background. - pattern: "#([A-Za-z0-9]){6}" + description: select your color-code for the background. + pattern: "^#[A-Fa-f0-9]{6}$" example: #F4667C textColor: type: string description: select your color-code for the text. - pattern: "#([A-Za-z0-9]){6}" + pattern: "^#[A-Fa-f0-9]{6}$" example: #FFFFFF borderColor: type: string description: select your color-code for the text. - pattern: "#([A-Za-z0-9]){6}" + pattern: "^#[A-Fa-f0-9]{6}$" example: #7BC0D6 # multiple select (with column_data) @@ -1652,7 +1652,7 @@ components: properties: geo_format: type: string - enum: ["lng_lat", "county_region"] + enum: ["lng_lat", "country_region"] geolocation_column: title: Geolocation @@ -1663,7 +1663,7 @@ components: $ref: "#/components/schemas/column_name" column_type: type: string - enum: ["checkbox"] + enum: ["geolocation"] anchor_column: $ref: "#/components/schemas/anchor_column" column_data: @@ -1829,7 +1829,7 @@ components: description: | The formula of this column. enum: ["count_links"] - example: lookup + example: count_links link_column: type: string description: Name of the link column. @@ -1869,7 +1869,7 @@ components: description: | The formula of this column. enum: ["rollup"] - example: lookup + example: rollup link_column: type: string description: Name of the link column. @@ -1894,7 +1894,7 @@ components: description: | The formula of this column. enum: ["findmin"] - example: lookup + example: findmin link_column: type: string description: Name of the link column. @@ -1919,7 +1919,7 @@ components: description: | The formula of this column. enum: ["findmax"] - example: lookup + example: findmax link_column: type: string description: Name of the link column. @@ -2037,24 +2037,43 @@ components: - $ref: "#/components/schemas/table_name_object" - $ref: "#/components/schemas/autonumber_column" autonumber_column_format: - description: Specify the auto number column. + description: >- + Specify the auto number column. The `format` field defines the number + pattern (e.g. "0000" for 4 digits). Use `prefix_type` to add a prefix: + "string" for a custom text prefix, or "date" for a date-based prefix. type: object properties: format: type: string - example: "ID-0000" + description: The number format pattern. + example: "0000" + digits: + type: integer + description: Number of digits (must match the zeros in `format`). + example: 4 + prefix_type: + type: string + description: Type of prefix — "string" for a custom prefix, "date" for a date-based prefix (YYYYMMDD). + enum: ["string", "date"] + example: "string" + prefix: + type: string + description: The prefix value (only used when `prefix_type` is "string"). + example: "ID-" required: - format + - digits button_column: title: Button column + type: object description: Add a button column. properties: column_name: $ref: "#/components/schemas/column_name" column_type: type: string - enum: ["file"] + enum: ["button"] anchor_column: $ref: "#/components/schemas/anchor_column" column_data: @@ -2417,7 +2436,14 @@ paths: can_copy: false can_export: false can_print: false - # question: internal server error?? + "403": + description: Forbidden — missing or invalid base token + content: + application/json: + schema: + type: object + example: + error_message: invalid token /api-gateway/api/v2/dtables/{base_uuid}/related-users/: get: tags: @@ -2438,11 +2464,11 @@ paths: type: object example: user_list: - - email: 244b43hr6fy54bb4afa2c2cb7369d244@auth.local + - email: 244b430060f54bb4afa2c2cb7369d244@auth.local name: Ginger Ale contact_email: gingerale@example.com avatar_url: https://cloud.seatable.io/media/avatars/default.png - - email: 8cb2a6da656876hgf42905bf1647fd3f@auth.local + - email: 8cb2a6da65687600f42905bf1647fd3f@auth.local name: Jasmin Tee contact_email: jasmintee@example.com avatar_url: https://cloud.seatable.io/media/avatars/default.png @@ -2455,40 +2481,44 @@ paths: summary: Query SeaTable with SQL operationId: querySQL description: | - SeaTable offers a SQL like interface that supports `SELECT`, `INSERT`, `UPDATE` and `DELETE` statements. + This is the **recommended endpoint** for reading and modifying data in SeaTable. It supports `SELECT`, `INSERT`, `UPDATE`, and `DELETE` — giving you full access to filter, sort, group, join, and aggregate data in a single request. It works seamlessly across both normal and big data storage and returns column metadata alongside the results. - If you are familiar with SQL, you will have no difficulties to use this endpoint because typical SQL-statements are supported. - - This endpoint is the **most powerful** one that SeaTable can offer and it does not differentiate between the two SeaTable backend (normal and big data). Also the metadata of the table is returned. + SQL syntax is case insensitive and most common functions work as expected — including `now()`, `round()`, `upper()`, `trim()`, `abs()`, and many more. Some functions use SeaTable-specific names (e.g. `mid()` instead of `SUBSTR()`, `concatenate()` instead of `CONCAT()`). See the [function reference](https://developer.seatable.com/sql/functions/) for the complete list and a MySQL/MariaDB equivalents table. - > 📘 `INSERT` and big data - > - > New rows (INSERT statement) are always added to the **big data backend**. An error message will be returned, if the big data backend is not activated for the target base. - - The complete [SQL Reference](https://developer.seatable.com/scripts/sql/functions/) can be found documentation in the developer manual. + **Example queries** for a table *Contacts* with columns *Name*, *Age*, *City*: - Here are some example requests for a fictitious table *Family* with the columns *name*, *age* and *birthday*: + - `SELECT * FROM Contacts WHERE Age >= 18 ORDER BY Name LIMIT 100` + - `SELECT City, COUNT(*), AVG(Age) FROM Contacts GROUP BY City` + - `SELECT DISTINCT City FROM Contacts` + - `UPDATE Contacts SET City = 'Berlin' WHERE Name = 'Alice'` + - `DELETE FROM Contacts WHERE Age < 18` + - `SELECT * FROM Contacts WHERE Name = ? AND Age = ?` (parameterized query) - - `SELECT * FROM Family LIMIT 3` - - `SELECT name, age, birthday FROM Family` - - `SELECT name, age FROM Family ORDER BY name` - - `INSERT INTO Family (Name,Age) VALUES ('Name', 23)` - - `SELECT * FROM Family WHERE Name=? AND Age=?` + For the complete SQL reference, see the [SeaTable Developer Manual](https://developer.seatable.com/sql/): - SELECT does not support column keys. You can only limit the output by column names. + - [SELECT](https://developer.seatable.com/sql/select/) — retrieve, filter, sort, group, and join rows + - [INSERT](https://developer.seatable.com/sql/insert/) — append rows (big data storage only) + - [UPDATE](https://developer.seatable.com/sql/update/) — modify rows + - [DELETE](https://developer.seatable.com/sql/delete/) — remove rows + - [Functions](https://developer.seatable.com/sql/functions/) — all supported functions and MySQL/MariaDB equivalents + - [Limitations](https://developer.seatable.com/sql/limitations/) — column writability, NULL handling, list types > 📘 Avoid SQL injection - > - > If you use `?` in your SQL-statement, you have to provide values to replace the placeholders with parameters. This protects against SQL injections. + > + > Use `?` placeholders in your SQL statement and pass the actual values via the `parameters` array. This protects against SQL injection. Example: `SELECT * FROM T WHERE Name = ? AND Age = ?` with `parameters: ["Alice", 30]`. - > 🚧 Max and default return limit + > ❗ Limits > - > - The request returns a maximum of 10 000 rows, even if you specify a higher limit in your SQL-statement. - > - If you don't specify a limit, max 100 rows are returned. + > - **Default:** 100 rows. **Maximum:** 10,000 rows. Use `LIMIT` and `OFFSET` to paginate. + > - **Link columns** return a maximum of 50 linked records per row. + > - **INSERT** only works with bases that have big data storage enabled. - > 📘 Link Columns + > 🚧 Key restrictions > - > Link columns return a maximum of 50 records per row. + > - Functions and expressions are **not supported** in `UPDATE SET` or `INSERT VALUES` — only constant values are allowed. + > - `JOIN` keyword is not supported — use implicit joins: `SELECT ... FROM T1, T2 WHERE T1.col = T2.col`. + > - Subqueries and `UNION` are not supported. + > - `SELECT` uses column **names** by default. Set `convert_keys` to `false` to get column keys instead. requestBody: content: application/json: @@ -2506,6 +2536,16 @@ paths: application/json: schema: $ref: "#/components/schemas/sql_query_response" + "400": + description: Bad Request — invalid SQL syntax or non-existing table. + content: + application/json: + schema: + type: object + properties: + error_message: + type: string + example: "no such table: nonexistent_table" /api-gateway/api/v2/dtables/{base_uuid}/rows/: get: tags: @@ -2515,7 +2555,7 @@ paths: description: | Returns a list of rows contained in a table (or in a view if provided). - The usage of a view in SeaTable could be much more convenient then the usage of the complex SQL-syntax of the [SQL query endpoint](/reference/querysql). + The usage of a view in SeaTable could be much more convenient than the usage of the complex SQL-syntax of the [SQL query endpoint](/reference/querysql). > 👍 Big Data support added > @@ -2563,7 +2603,6 @@ paths: _mtime: "2021-03-10T16:11:11.176+00:00" Name: Matcha link: [] - # question: how to add multiple rows???? post: tags: - Rows @@ -2571,6 +2610,10 @@ paths: operationId: appendRows description: |- Append multiple rows to a table. Define the column:values pairs of each column in the [rows object](/reference/models). + + > 🚧 Column names only + > + > This endpoint always expects **column names** (e.g. `Name`) in the row object, not internal column keys (e.g. `0000`). The `convert_keys` parameter is not supported. Unknown keys are silently ignored without error. requestBody: content: application/json: @@ -2588,6 +2631,15 @@ paths: application/json: schema: type: object + properties: + inserted_row_count: + type: integer + row_ids: + type: array + items: + type: object + first_row: + type: object example: inserted_row_count: 3 row_ids: @@ -2610,6 +2662,10 @@ paths: > 📘 Structure of the row object > > The row object contains key:value pairs with the column name as key and the desired values. Check the page [Models](/reference/models) to get a better understanding of the row object. + + > 🚧 Column names only + > + > This endpoint always expects **column names** (e.g. `Name`) in the row object, not internal column keys (e.g. `0000`). The `convert_keys` parameter is not supported. Unknown keys are silently ignored without error. requestBody: content: application/json: @@ -2660,7 +2716,7 @@ paths: - Rows summary: Get Row operationId: getRow - description: Get the values of one row with all columns and values, according to the row id provided. Depending of `convert` the response will contain the column names or the column keys. + description: Get the values of one row with all columns and values, according to the row id provided. Depending on `convert_keys` the response will contain the column names or the column keys. security: - BaseTokenAuth: [] parameters: @@ -2675,13 +2731,44 @@ paths: application/json: schema: type: object + properties: + _id: + type: string + _mtime: + type: string + Name: + type: string + Date: + type: string + Content: + type: string + link: + type: array + items: + type: object example: - _id: Qtf7xPmoRaiFyQPO1aENTjb + _id: Qtf7xPmoRaiFyQPO1aENTj _mtime: "2021-03-10T16:19:31.761+00:00" Name: NewName Date: "2020-08-01" Content: "111" link: [] + "403": + description: Forbidden — missing or invalid base token + content: + application/json: + schema: + type: object + example: + error_message: invalid token + "404": + description: Not Found + content: + application/json: + schema: + type: object + example: + error_message: row _id not exits /api-gateway/api/v2/dtables/{base_uuid}/lock-rows/: put: @@ -2744,7 +2831,6 @@ paths: # Links /api-gateway/api/v2/dtables/{base_uuid}/query-links/: - # getestet: ok. post: tags: - Links @@ -2787,12 +2873,11 @@ paths: schema: type: object example: - Qtf7xPmoRaiFyQPO1aENTjb: + Qtf7xPmoRaiFyQPO1aENTj: - row_id: G5rbgqudTKKfAm1-cjnjbQ display_value: Orson /api-gateway/api/v2/dtables/{base_uuid}/links/: - # getestet: ok. (big data???) -> Eingabe ??? post: tags: - Links @@ -2826,14 +2911,13 @@ paths: type: object example: success: true - # getestet: ok put: tags: - Links summary: Update Row Link(s) operationId: updateRowLink description: | - Updates the link(s) between one column and many others (1:n relation). Existings links will be removed and replaced with this new mapping. + Updates the link(s) between one column and many others (1:n relation). Existing links will be removed and replaced with this new mapping. requestBody: content: application/json: @@ -2857,7 +2941,7 @@ paths: - Links summary: Delete Row Link(s) operationId: deleteRowLink - description: Deletes one or multiple links between two rows. Only the links between the row_ids mentioned in the mapping, will be removed. Other links will stay and not touched. + description: Deletes one or multiple links between two rows. Only the links between the row_ids mentioned in the mapping, will be removed. Other links will stay and not be touched. requestBody: content: application/json: @@ -2878,7 +2962,6 @@ paths: deleted_links_count: 1 /api-gateway/api/v2/dtables/{base_uuid}/auto-links/: - # getestet: ok. post: tags: - Links @@ -2888,8 +2971,8 @@ paths: Automatically create link relationships. The caller needs to create a link column before calling the API, supporting both archived and unarchived data. - It will return a task ID, by quering which you can get the status of the - link creation in the backend wihtin 5 minutes. + It will return a task ID, by querying which you can get the status of the + link creation in the backend within 5 minutes. The matched data in the link column in the 2 tables must have the similar data structure (not same column type). For example, the text column can match email, auto-number or url type column, and so on. @@ -2917,14 +3000,13 @@ paths: task_id: 19b3c803-051e-4c16-bf4d-682d24f7981e /api-gateway/api/v2/dtables/{base_uuid}/auto-link-task/: - # getestet: ok. get: tags: - Links summary: Auto Link task operationId: autoLinkTask description: | - Query the status of auto add links task.There are 3 different status: + Query the status of auto add links task. There are 3 different status: - success - failed - running @@ -3014,7 +3096,7 @@ paths: - Tables summary: Rename Table operationId: renameTable - description: Rename a table by providing it's original `table_name` and the desired `new_table_name`. + description: Rename a table by providing its original `table_name` and the desired `new_table_name`. requestBody: content: application/json: @@ -3085,6 +3167,25 @@ paths: application/json: schema: type: object + properties: + _id: + type: string + name: + type: string + columns: + type: array + items: + type: object + rows: + type: array + items: + type: object + id_row_map: + type: object + views: + type: array + items: + type: object example: _id: oW2Q name: Appointments @@ -3180,6 +3281,55 @@ paths: application/json: schema: type: object + properties: + _id: + type: string + name: + type: string + type: + type: string + is_locked: + type: boolean + filter_conjunction: + type: string + filters: + type: array + items: + type: object + sorts: + type: array + items: + type: object + groupbys: + type: array + items: + type: object + group_rows: + type: array + items: + type: object + groups: + type: array + items: + type: object + colorbys: + type: object + hidden_columns: + type: array + items: + type: object + rows: + type: array + items: + type: object + formula_rows: + type: object + link_rows: + type: object + summaries: + type: object + colors: + type: object example: _id: PeJE name: New view @@ -3218,6 +3368,55 @@ paths: application/json: schema: type: object + properties: + _id: + type: string + name: + type: string + type: + type: string + is_locked: + type: boolean + filter_conjunction: + type: string + filters: + type: array + items: + type: object + sorts: + type: array + items: + type: object + groupbys: + type: array + items: + type: object + group_rows: + type: array + items: + type: object + groups: + type: array + items: + type: object + colorbys: + type: object + hidden_columns: + type: array + items: + type: object + rows: + type: array + items: + type: object + formula_rows: + type: object + link_rows: + type: object + summaries: + type: object + colors: + type: object example: _id: r535 name: Default View @@ -3275,6 +3474,55 @@ paths: application/json: schema: type: object + properties: + _id: + type: string + name: + type: string + type: + type: string + is_locked: + type: boolean + filter_conjunction: + type: string + filters: + type: array + items: + type: object + sorts: + type: array + items: + type: object + groupbys: + type: array + items: + type: object + group_rows: + type: array + items: + type: object + groups: + type: array + items: + type: object + colorbys: + type: object + hidden_columns: + type: array + items: + type: object + rows: + type: array + items: + type: object + formula_rows: + type: object + link_rows: + type: object + summaries: + type: object + colors: + type: object example: _id: r535 name: View1234567 @@ -3411,6 +3659,30 @@ paths: application/json: schema: type: object + properties: + key: + type: string + type: + type: string + name: + type: string + editable: + type: boolean + width: + type: integer + resizable: + type: boolean + draggable: + type: boolean + data: + type: object + nullable: true + permission_type: + type: string + permitted_users: + type: array + items: + type: string example: key: e48W type: link-formula @@ -3443,7 +3715,7 @@ paths: - modify_column_type - resize_column - move_column - - freeze_column (eventuell weglassen) + - freeze_column `column` is the name or `key` of the target column. @@ -3466,6 +3738,30 @@ paths: application/json: schema: type: object + properties: + key: + type: string + type: + type: string + name: + type: string + editable: + type: boolean + width: + type: integer + resizable: + type: boolean + draggable: + type: boolean + data: + type: object + nullable: true + permission_type: + type: string + permitted_users: + type: array + items: + type: string example: key: cSDV type: number @@ -3701,7 +3997,7 @@ paths: operationId: deleteSelectOption description: >- Use this request to remove single select or multiple select options that - you don't need any more. Thes deleted options will be removed from the + you don't need any more. These deleted options will be removed from the entries containing them. @@ -3862,7 +4158,7 @@ paths: - $ref: "#/components/parameters/base_uuid" responses: "200": - description: Ok + description: OK content: application/json: schema: @@ -3875,7 +4171,7 @@ paths: tags: [Big Data] summary: Move Rows to Normal Backend operationId: moveRowsToNormalBackend - description: Moves the seleted rows into the big data backend. + description: Moves the selected rows from the big data backend to the normal backend. requestBody: content: application/json: @@ -3900,6 +4196,13 @@ paths: responses: "200": description: OK + content: + application/json: + schema: + type: object + example: + success: true + task_id: cdb7fcc6-d2fa-4bf7-ae08-0d767c38690c /api-gateway/api/v2/dtables/{base_uuid}/db-operations/: get: tags: [Big Data] @@ -3988,7 +4291,7 @@ paths: type: object example: - id: 1 - author: 28dhr6e7d1754bb4afa2c2cb7369d244@auth.local + author: 28d006e7d1754bb4afa2c2cb7369d244@auth.local comment: This is good! dtable_uuid: 650d8a0d-7e27-46a8-8b18-6cc6374yf557 row_id: NAu2B3OcRG6UrWagL-9naA @@ -3996,7 +4299,7 @@ paths: updated_at: "2021-01-15T13:35:26.000Z" resolved: 0 - id: 2 - author: 28dhr6e7d1754bb4afa2c2cb7369d244@auth.local + author: 28d006e7d1754bb4afa2c2cb7369d244@auth.local comment: Go online tomorrow? dtable_uuid: 650d8a0d-7e27-46a8-8b18-6cc6374yf557 row_id: NAu2B3OcRG6UrWagL-9naA @@ -4017,7 +4320,14 @@ paths: - Row Comments summary: Delete Comment operationId: deleteComment - description: Delete a certain comment by its ID. + deprecated: true + description: >- + Delete a certain comment by its ID. + + + > 🚧 Creating comments via the API Gateway is not yet supported. + This will be fixed in SeaTable 6.2. Until then, comments can only be + created via `POST /api/v2.1/dtables/{dtable_uuid}/comments/` (dtable-web). security: - BaseTokenAuth: [] parameters: @@ -4037,7 +4347,14 @@ paths: - Row Comments summary: Get Comment operationId: getComment - description: Get the details of a certain comment with its ID. + deprecated: true + description: >- + Get the details of a certain comment with its ID. + + + > 🚧 Creating comments via the API Gateway is not yet supported. + This will be fixed in SeaTable 6.2. Until then, comments can only be + created via `POST /api/v2.1/dtables/{dtable_uuid}/comments/` (dtable-web). security: - BaseTokenAuth: [] parameters: @@ -4050,9 +4367,26 @@ paths: application/json: schema: type: object + properties: + id: + type: integer + author: + type: string + comment: + type: string + dtable_uuid: + type: string + row_id: + type: string + created_at: + type: string + updated_at: + type: string + resolved: + type: integer example: id: 1 - author: 12345678d1757ey46fg3c2cb7369d244@auth.local + author: 12345678d17570046f03c2cb7369d244@auth.local comment: Here is my email address dtable_uuid: 12345678-7e27-46a8-8b18-6cc6374yf557 row_id: NAu2B3OcRG6UrWagL-9naA @@ -4182,7 +4516,7 @@ paths: seen: type: boolean description: true or false for read or unread. Otherwise invalid. - example: "true" + example: true security: - BaseTokenAuth: [] parameters: @@ -4231,7 +4565,7 @@ paths: seen: type: boolean description: '`true` to mark as "seen" and `false` as "unseen".' - example: "false" + example: false security: - BaseTokenAuth: [] parameters: @@ -4251,8 +4585,8 @@ paths: post: tags: - Notifications - summary: Send toast notification - operationId: SendToastNotification + summary: Send Toast Notification + operationId: sendToastNotification description: Send a toast notification requestBody: content: @@ -4415,7 +4749,6 @@ paths: total_count: 3 # Snapshots - # tested create: ok /api-gateway/api/v2/dtables/{base_uuid}/snapshot/: post: tags: [Snapshots] diff --git a/openapi_input/file_operations.yaml b/openapi_input/file_operations.yaml index 481b7360..3a9b7630 100644 --- a/openapi_input/file_operations.yaml +++ b/openapi_input/file_operations.yaml @@ -3,7 +3,7 @@ info: title: File Operations description: >- The official SeaTable API Reference (OpenAPI 3.0). - version: "6.0" + version: "6.1" servers: - url: "https://{server}" variables: @@ -138,9 +138,21 @@ paths: application/json: schema: type: object + properties: + upload_link: + type: string + workspace_id: + type: integer + parent_path: + type: string + img_relative_path: + type: string + file_relative_path: + type: string example: upload_link: >- - https://cloud.seafile.com/seafhttp/upload-api/83e701c8-84ba-498c-91b1-ddb3789edb7e + https://cloud.seatable.io/seafhttp/upload-api/83e701c8-84ba-498c-91b1-ddb3789edb7e + workspace_id: 42 parent_path: /asset/a275d870-fd55-48e4-8c4a-5fd6f2549765 img_relative_path: images/2021-08 file_relative_path: files/2021-08 @@ -184,7 +196,7 @@ paths: ``` # Example how to add an already uploaded image to a row: "row": { - "My Image Column": ["/workspace/24/asset/55f2f056-5da1-4095-b5f8-791bb51b991e/images/2023-07/party.png`"] + "My Image Column": ["/workspace/24/asset/55f2f056-5da1-4095-b5f8-791bb51b991e/images/2023-07/party.png"] } # Example how to add an already uploaded file to a row: @@ -251,12 +263,22 @@ paths: example: download_link: >- https://cloud.seatable.io/seafhttp/files/12345678-1234-4672-834c-4eca40dc104b/test.png + "400": + description: Bad Request — file not found at the given path. + content: + application/json: + schema: + type: object + properties: + error_msg: + type: string + example: "path /files/2020-01/nonexistent.txt not found." /api/v2.1/dtable/app-asset/: delete: tags: - Files & Images summary: Delete a Base Asset - operationId: DeleteBaseAsset + operationId: deleteBaseAsset description: | Delete a base's attachment. @@ -273,6 +295,16 @@ paths: type: object example: success: true + "404": + description: Not Found — file does not exist. + content: + application/json: + schema: + type: object + properties: + error_msg: + type: string + example: "File not found." # Files & Images (Custom Folder) /api/v2.1/dtable/custom/app-asset-dir/: @@ -280,6 +312,7 @@ paths: tags: [Files & Images (Custom Folder)] summary: Get Files from Folder operationId: getCustomFiles + description: List files and subdirectories in a custom folder of a base. security: - ApiTokenAuth: [] parameters: @@ -303,6 +336,7 @@ paths: tags: [Files & Images (Custom Folder)] summary: Get File Metadata operationId: getCustomFileMetadata + description: Get metadata (name, size, last update) of a file in a custom folder. security: - ApiTokenAuth: [] parameters: @@ -325,7 +359,7 @@ paths: delete: tags: [Files & Images (Custom Folder)] summary: Delete a Base Asset in Custom Folder - operationId: DeleteBaseCustomFolderAsset + operationId: deleteBaseCustomFolderAsset description: | Delete a base's attachment in custom folder. @@ -347,6 +381,7 @@ paths: tags: [Files & Images (Custom Folder)] summary: Get Upload Link operationId: getCustomUploadLink + description: Get a temporary upload link for uploading files to a custom folder. security: - ApiTokenAuth: [] parameters: @@ -361,13 +396,15 @@ paths: example: dirent: upload_link: "https://cloud.seatable.io/seafhttp/upload-api/e943a56a-c5b3-441a-ac1d-9199819dec71" + workspace_id: 42 parent_path: "/asset/1338f224-8482-4d71-b8be-63c8f37b896a/custom" - relative_path": "/" + relative_path: "/" /api/v2.1/dtable/custom/app-download-link/: get: tags: [Files & Images (Custom Folder)] summary: Get Download Link operationId: getCustomDownloadLink + description: Get a temporary download link for a file in a custom folder. security: - ApiTokenAuth: [] parameters: diff --git a/openapi_input/python-scheduler.yaml b/openapi_input/python-scheduler.yaml index 66fb56f1..f9f3acb4 100644 --- a/openapi_input/python-scheduler.yaml +++ b/openapi_input/python-scheduler.yaml @@ -3,7 +3,7 @@ info: title: Python Scheduler description: >- The official SeaTable API Reference (OpenAPI 3.0). - version: "6.0" + version: "6.1" servers: - url: "https://{server}" variables: @@ -70,10 +70,10 @@ components: in: query schema: type: string - pattern: ^[0-9]{4}-(0[1-9]|1[0-2]) + pattern: ^[0-9]{4}(0[1-9]|1[0-2])$ description: >- - For which month you'd like to list the statistics in the format of YYYY-MM. If you leave this value empty, - example: "2023-06" + For which month you'd like to list the statistics in the format of YYYYMM. If you leave this value empty, the current month is used. + example: "202306" required: false order_by: name: order_by @@ -119,7 +119,7 @@ paths: get: tags: - Statistics - summary: Script runs per user + summary: Script Runs per User operationId: scriptRunsPerUser description: | > 📘 Requires Self-Hosted Installation @@ -141,6 +141,15 @@ paths: application/json: schema: type: object + properties: + month: + type: string + results: + type: array + items: + type: object + total_count: + type: integer example: month: "2023-02" results: @@ -156,7 +165,7 @@ paths: get: tags: - Statistics - summary: Script runs per team + summary: Script Runs per Team operationId: scriptRunsPerTeam description: | > 📘 Requires Self-Hosted Installation @@ -178,6 +187,15 @@ paths: application/json: schema: type: object + properties: + month: + type: string + results: + type: array + items: + type: object + total_count: + type: integer example: month: "2023-02" results: @@ -193,7 +211,7 @@ paths: get: tags: - Statistics - summary: Script runs per base + summary: Script Runs per Base operationId: scriptRunsPerBase description: | > 📘 Requires Self-Hosted Installation @@ -215,6 +233,15 @@ paths: application/json: schema: type: object + properties: + month: + type: string + results: + type: array + items: + type: object + total_count: + type: integer example: month: "2023-02" results: diff --git a/openapi_input/system_admin_account_operations.yaml b/openapi_input/system_admin_account_operations.yaml index 99adad68..e5ca341d 100644 --- a/openapi_input/system_admin_account_operations.yaml +++ b/openapi_input/system_admin_account_operations.yaml @@ -3,7 +3,7 @@ info: title: "Account Operations: System admin" description: >- The official SeaTable API Reference (OpenAPI 3.0). - version: "6.0" + version: "6.1" servers: - url: "https://{server}" variables: @@ -15,11 +15,6 @@ x-readme: metrics-enabled: false proxy-enabled: false -# why uses /api/v2.1/admin/organizations-basic-info/ query_params? Why not using a body? -# why sometimes base_uuid, sometimes base_id? -# the auth.local has many different descriptions: owner, user_id, username or email. Keeping to the same description would be great. -# is there a possibility to get "internal-links"? - tags: - name: Users description: Manage users @@ -111,9 +106,10 @@ components: return_ancestors: name: return_ancestors in: query + description: Whether to include ancestor groups in the response. schema: type: boolean - example: "true" + example: true starting_time: name: start in: query @@ -153,7 +149,7 @@ components: users who are not in any teams (`true`) or by teams (`false`). The usage of `true` here is seldom meaningful for cloud.seatable.io as all the users in the SeaTable Cloud are team users. - example: "false" + example: false month: name: month in: query @@ -174,7 +170,7 @@ components: description: >- The ID of the user you are querying. Optional. If you don't define a user, all the users are queried. - example: 123abc456def789ghi123jkl456mno789@auth.local + example: 12abc456def789abc123def456abc789@auth.local role: name: role in: query @@ -193,17 +189,20 @@ components: parent_dir: name: parent_dir in: query + description: The parent directory path. schema: type: string example: /asset/ query: name: query in: query + description: Search query string. schema: type: string org_id_query: name: org_id in: query + description: Filter by team ID. schema: type: integer minimum: 1 @@ -234,8 +233,25 @@ components: in: query schema: type: boolean - example: "false" + example: false description: Set this to `true` to export the base without assets. Default is `false`. + group_by: + name: group_by + in: query + schema: + type: string + enum: [owner, org_id] + required: true + description: Query by owner or organization + example: "owner" + date_YYYY_MM_DD: + name: date + in: query + schema: + type: string + required: true + description: A date string in YYYY-MM-DD format + example: "2025-01-01" #=======================Path parameters=======================# base_uuid: @@ -255,7 +271,7 @@ components: type: string pattern: "^[a-f0-9]{32}(@auth.local)$" required: true - example: 23abc456def789ghi123jkl456mno789@auth.local + example: 2abc456def789abc123def456abc789a@auth.local org_id: name: org_id in: path @@ -274,10 +290,11 @@ components: schema: type: string required: true - example: base_id + example: 123 automation_rule_id: name: automation_rule_id in: path + description: The ID of the automation rule. schema: type: integer minimum: 1 @@ -286,6 +303,7 @@ components: notification_rule_id: name: notification_rule_id in: path + description: The ID of the notification rule. schema: type: integer minimum: 1 @@ -294,6 +312,7 @@ components: collection_table_token: name: collection_table_token in: path + description: The token of the collection table. schema: type: string pattern: ^[0-9]{8}(-[a-f0-9]{4}){3}-[a-f0-9]{12}$ @@ -321,6 +340,7 @@ components: department_id: name: department_id in: path + description: The ID of the department. schema: type: integer minimum: 1 @@ -329,6 +349,7 @@ components: external_link_token: name: external_link_token in: path + description: The token of the external link. schema: type: string required: true @@ -336,14 +357,15 @@ components: view_external_link_token: name: view_external_link_token in: path + description: The token of the view external link. schema: type: string - pattern: ^[a-f0-9]{20}$ required: true example: "1f0447eab4df4343ab6d" form_token: name: form_token in: path + description: The token of the form. schema: type: string pattern: ^[0-9]{8}(-[a-f0-9]{4}){3}-[a-f0-9]{12}$ @@ -352,6 +374,7 @@ components: plugin_id: name: plugin_id in: path + description: The ID of the plugin. schema: type: integer minimum: 1 @@ -360,6 +383,7 @@ components: sys_notification_id: name: sys_notification_id in: path + description: The ID of the system notification. schema: type: integer required: true @@ -367,6 +391,7 @@ components: group_id: name: group_id in: path + description: The ID of the group. schema: type: integer minimum: 1 @@ -375,6 +400,7 @@ components: abuse_report_id: name: abuse_report_id in: path + description: The ID of the abuse report. schema: type: integer minimum: 1 @@ -383,6 +409,7 @@ components: task_id: name: task_id in: path + description: The ID of the task. schema: type: string required: true @@ -394,7 +421,7 @@ components: example: "Hello user!" username: type: string - example: "123abc456def789ghi123jkl456mno789@auth.local" + example: "12abc456def789abc123def456abc789@auth.local" system_admin_force_2fa: type: boolean description: Enforce Two Factor for all accounts @@ -461,13 +488,16 @@ components: row_limit: type: integer description: User's total row limit in number. For example 10000. - example: "50000" + example: 50000 quota_total: type: string description: Update their total quota in MB. asset_quota_mb: type: string description: The asset quota in MB. + monthly_automation_limit_per_user: + type: integer + description: Monthly limit on the number of automation rules per user. file: type: string format: binary @@ -490,7 +520,7 @@ components: description: >- If a workspace should be automatically created for the user. Optional. `false` by default. - example: "true" + example: true max_user_number: type: string description: The maximum user number. @@ -504,13 +534,13 @@ components: parent_group: type: string description: The ID of the parent department. Optional. -1 by default. - example: parent_department_id + example: -1 handled: type: boolean description: >- Required. Use `true` or `false` to mark the status of the report. - example: "true" + example: true plugin: type: string description: Path and file name to the plugin file. @@ -533,7 +563,7 @@ components: description: >- If a custom CSS should be used. Optional, `0` by default. If set to `1`, paste your CSS into the param `CUSTOM_CSS`. - example: "0" + example: 0 CUSTOM_CSS: type: string description: The content of your custom CSS. Optional. Empty by default. @@ -545,49 +575,49 @@ components: registration. Optional, `1` by default. If `0`, then the user need to be activated by the administrator or via the activation email. - example: "1" + example: 1 REGISTRATION_SEND_MAIL: type: integer description: >- If an activation email should be sent after the user has registered. Optional, `0` by default. - example: "0" + example: 0 LOGIN_REMEMBER_DAYS: type: integer description: >- How many default days a user could be kept signed in. Optional, `7` by default. - example: "7" + example: 7 LOGIN_ATTEMPT_LIMIT: type: integer description: >- The maximum number of failed login attempts before showing CAPTCHA. Optional, `5` by default. - example: "5" + example: 5 FREEZE_USER_ON_LOGIN_FAILED: type: integer description: >- If the user's account should be frozen when they exceed the login attempts limit. Optional, `0` by default. - example: "0" + example: 0 USER_STRONG_PASSWORD_REQUIRED: type: integer description: >- Force the users to use a strong password when signing up or changing password. Optional, `0` by default. - example: "0" + example: 0 FORCE_PASSWORD_CHANGE: type: integer description: >- Force newly added users to change their password, or when the admin resets their password. Optional, `1` by default. - example: "1" + example: 1 USER_PASSWORD_MIN_LENGTH: type: integer description: >- The minimum length of user passwords. Optional, `6` by default. - example: "6" + example: 6 USER_PASSWORD_STRENGTH_LEVEL: type: integer description: >- @@ -595,19 +625,19 @@ components: `3` means password must have at least 3 of the following: a number, an upper letter, a lower letter and a special symbol. Optional, `3` by default. - example: "3" + example: 3 ENABLE_TWO_FACTOR_AUTH: type: integer description: >- If two factor authentication should be activated for the system. Optional, `0` by default. - example: "0" + example: 0 ENABLE_SIGNUP: type: integer description: >- If registration on the web interface is allowed. Optional, `0` by default. - example: "1" + example: 1 logo: type: string description: The path and filename of the image file of your logo. @@ -622,7 +652,7 @@ components: Leave this param as its default (`false`) to upload your favicon, and use this param as `true` to upload a favicon with a notification sign. - example: "true" + example: true login_bg_image: type: string description: The path and filename of the background image. @@ -653,6 +683,7 @@ paths: - Users summary: List Users operationId: listUsers + description: List all users in the system with pagination support. security: - AccountTokenAuth: [] parameters: @@ -690,6 +721,14 @@ paths: storage_usage: 1721496 rows_count: 142 total_count: 2000 + "403": + description: Forbidden + content: + application/json: + schema: + type: object + example: + detail: You do not have permission to perform this action. post: tags: - Users @@ -701,6 +740,9 @@ paths: application/json: schema: type: object + required: + - email + - password properties: email: $ref: "#/components/schemas/email" @@ -721,6 +763,27 @@ paths: application/json: schema: type: object + properties: + email: + type: string + name: + type: string + contact_email: + type: string + login_id: + type: string + id_in_org: + type: string + is_staff: + type: boolean + is_active: + type: boolean + create_time: + type: string + role: + type: string + add_user_tip: + type: string example: email: 12345678219d4067816452757a850b61@auth.local name: Example User @@ -740,6 +803,7 @@ paths: - Users summary: Get User operationId: getUser + description: Get the details of a specific user by their user ID. security: - AccountTokenAuth: [] parameters: @@ -751,8 +815,41 @@ paths: application/json: schema: type: object + properties: + org_id: + type: integer + org_name: + type: string + email: + type: string + name: + type: string + contact_email: + type: string + unit: + type: string + login_id: + type: string + id_in_org: + type: string + is_staff: + type: boolean + is_active: + type: boolean + phone: + type: string + create_time: + type: string + role: + type: string + avatar_url: + type: string + has_default_device: + type: boolean + is_force_2fa: + type: boolean example: - org_id: 1, + org_id: 1 org_name: "Team 1" email: "6196ab3dacef4e539ae8da4844b58a1f@auth.local" name: "John Doe" @@ -808,6 +905,8 @@ paths: $ref: "#/components/schemas/quota_total" asset_quota_mb: $ref: "#/components/schemas/asset_quota_mb" + monthly_automation_limit_per_user: + $ref: "#/components/schemas/monthly_automation_limit_per_user" security: - AccountTokenAuth: [] parameters: @@ -819,6 +918,37 @@ paths: application/json: schema: type: object + properties: + email: + type: string + name: + type: string + contact_email: + type: string + unit: + type: string + login_id: + type: string + id_in_org: + type: string + is_staff: + type: boolean + is_active: + type: boolean + phone: + type: string + org_id: + type: integer + org_name: + type: string + create_time: + type: string + role: + type: string + update_status_tip: + type: string + monthly_automation_limit_per_user: + type: integer example: email: 876543216569491ba42905bf1647fd3f@auth.local name: Michael Jackson @@ -834,6 +964,7 @@ paths: create_time: "2020-11-18T12:30:31+00:00" role: default update_status_tip: "" + monthly_automation_limit_per_user: 1000 delete: tags: - Users @@ -1060,6 +1191,8 @@ paths: application/json: schema: type: object + required: + - force_2fa properties: force_2fa: $ref: "#/components/schemas/system_admin_force_2fa" @@ -1159,8 +1292,7 @@ paths: - Users summary: Search User by Org-ID operationId: searchUserByOrgId - description: >- - Hier muss noch eine Beschreibung ergänzt werden + description: Search for a user by their organization ID. security: - AccountTokenAuth: [] parameters: @@ -1178,21 +1310,21 @@ paths: [ { "email": "148768b50bb44c9d9d04f101a2b34a49@auth.local", - "avatar_url": "http://127.0.0.1:8000/media/avatars/default.png", + "avatar_url": "https://cloud.seatable.io/media/avatars/default.png", "name": "org_guest1", - "contact_email": "org_guest1@qq.com", + "contact_email": "org_guest1@example.com", }, { "email": "4919f22fa6e14a538b47428b5589ec60@auth.local", - "avatar_url": "http://127.0.0.1:8000/media/avatars/default.png", + "avatar_url": "https://cloud.seatable.io/media/avatars/default.png", "name": "org_guest2", - "contact_email": "org_guest2@qq.com", + "contact_email": "org_guest2@example.com", }, { "email": "53f1af67b0dd492491264dd8143040b3@auth.local", - "avatar_url": "http://127.0.0.1:8000/media/avatars/default.png", + "avatar_url": "https://cloud.seatable.io/media/avatars/default.png", "name": "org_guest", - "contact_email": "org_guest@qq.com", + "contact_email": "org_guest@example.com", }, ], } @@ -1200,7 +1332,7 @@ paths: post: tags: - Users - summary: Import users + summary: Import Users operationId: importUsers description: >- As system administrator, you can batch import users with an Excel file, @@ -1224,6 +1356,8 @@ paths: multipart/form-data: schema: type: object + required: + - file properties: file: $ref: "#/components/schemas/file" @@ -1348,7 +1482,7 @@ paths: obj_name: 650d8a0d-7e27-46a8-8b18-6cc6f3db2057 file_size: "" last_update: "2021-03-11T13:36:37+00:00" - email: 123abc456def789ghi123jkl456mno789@auth.local + email: 12abc456def789abc123def456abc789@auth.local /api/v2.1/admin/users/{user_id}/dtables/: get: tags: @@ -1416,6 +1550,7 @@ paths: - Bases summary: List All Bases operationId: listAllBases + description: List all bases in the system with pagination support. security: - AccountTokenAuth: [] parameters: @@ -1673,6 +1808,7 @@ paths: tags: [Groups] summary: Create Group operationId: createGroup + description: Create a new group with a specified name and owner. security: - AccountTokenAuth: [] requestBody: @@ -1680,6 +1816,9 @@ paths: application/json: schema: type: object + required: + - group_name + - group_owner properties: group_name: $ref: "#/components/schemas/system_admin_group_name" @@ -1693,22 +1832,23 @@ paths: schema: type: object example: - - success: "?" + - success: true /api/v2.1/admin/groups/{group_id}/: put: tags: [Groups] summary: Transfer Group operationId: transferGroup + description: Transfer the ownership of a group to a new owner. requestBody: content: application/json: schema: type: object + required: + - new_owner properties: new_owner: $ref: "#/components/schemas/username" - #quota: - # $ref: "#/components/schemas/group_quota" security: - AccountTokenAuth: [] parameters: @@ -1720,11 +1860,28 @@ paths: application/json: schema: type: object + properties: + id: + type: integer + parent_group_id: + type: integer + name: + type: string + owner: + type: string + created_at: + type: string + avatar_url: + type: string + admins: + type: array + items: + type: string example: id: 1 parent_group_id: 0 name: Group New - owner: 123abc456def789ghi123jkl456mno789@auth.local + owner: 12abc456def789abc123def456abc789@auth.local created_at: "2020-11-19T08:14:52+00:00" avatar_url: "http://cloud.seatable.io/media/avatars/groups/default.png" admins: @@ -1733,7 +1890,13 @@ paths: tags: [Groups] summary: Delete Group operationId: deleteGroup - description: Delete a group with its ID. + description: >- + Delete a group with its ID. + + + > 🚧 Group must be empty + > + > A group can only be deleted if it contains no bases. Delete or move all bases out of the group first, otherwise the API returns `400` with `"Cannot delete group with bases"`. security: - AccountTokenAuth: [] parameters: @@ -1856,6 +2019,35 @@ paths: application/json: schema: type: object + properties: + org_id: + type: integer + org_name: + type: string + ctime: + type: string + org_url_prefix: + type: string + role: + type: string + creator_email: + type: string + creator_name: + type: string + creator_contact_email: + type: string + quota: + type: integer + storage_usage: + type: integer + storage_quota: + type: integer + max_user_number: + type: integer + rows_count: + type: integer + row_limit: + type: integer example: org_id: 2937 org_name: SeaTable Testing @@ -1929,11 +2121,13 @@ paths: - Teams summary: Get Organization Names operationId: getOrganizationNames + description: Retrieve the names of one or more organizations by their IDs. security: - AccountTokenAuth: [] parameters: - name: org_ids in: query + description: Comma-separated list of organization IDs to look up. schema: type: array items: @@ -1941,7 +2135,15 @@ paths: example: "2" responses: "200": - description: ok + description: OK + content: + application/json: + schema: + type: object + example: + organization_list: + - org_id: 1 + org_name: "My Team" /api/v2.1/admin/organizations/{org_id}/: put: tags: @@ -1969,6 +2171,8 @@ paths: $ref: "#/components/schemas/max_user_number" asset_quota_mb: $ref: "#/components/schemas/asset_quota_mb" + monthly_automation_limit_per_user: + $ref: "#/components/schemas/monthly_automation_limit_per_user" security: - AccountTokenAuth: [] parameters: @@ -1980,6 +2184,37 @@ paths: application/json: schema: type: object + properties: + org_id: + type: integer + org_name: + type: string + ctime: + type: string + org_url_prefix: + type: string + role: + type: string + creator_email: + type: string + creator_name: + type: string + creator_contact_email: + type: string + quota: + type: integer + storage_usage: + type: integer + storage_quota: + type: integer + max_user_number: + type: integer + rows_count: + type: integer + row_limit: + type: integer + monthly_automation_limit_per_user: + type: integer example: org_id: 176 org_name: Team SeaTable @@ -1995,6 +2230,7 @@ paths: max_user_number: 3 rows_count: 7185 row_limit: -1 + monthly_automation_limit_per_user: 1000 get: tags: - Teams @@ -2014,13 +2250,48 @@ paths: application/json: schema: type: object + properties: + org_id: + type: integer + org_name: + type: string + ctime: + type: string + org_url_prefix: + type: string + role: + type: string + creator_email: + type: string + creator_name: + type: string + creator_contact_email: + type: string + quota: + type: integer + storage_usage: + type: integer + storage_quota: + type: integer + max_user_number: + type: integer + rows_count: + type: integer + row_limit: + type: integer + users_count: + type: integer + active_users_count: + type: integer + groups_count: + type: integer example: org_id: 1 org_name: SeaTable ctime: "2020-11-18T12:30:31+00:00" org_url_prefix: org_d0hfk6jeupd72ab2nxnh role: org_enterprise - creator_email: 87654321569491ba42905bf1647fd3f@auth.local + creator_email: 876543210569491ba42905bf1647fd3f@auth.local creator_name: Michael Jackson creator_contact_email: test@example.com quota: -2 @@ -2152,6 +2423,29 @@ paths: application/json: schema: type: object + properties: + org_id: + type: integer + workspace_id: + type: integer + email: + type: string + name: + type: string + contact_email: + type: string + is_org_admin: + type: boolean + quota_total: + type: integer + quota_usage: + type: integer + create_time: + type: string + last_login: + type: string + active: + type: boolean example: org_id: 1 workspace_id: 357 @@ -2199,6 +2493,29 @@ paths: application/json: schema: type: object + properties: + org_id: + type: integer + workspace_id: + type: integer + email: + type: string + name: + type: string + contact_email: + type: string + is_org_admin: + type: boolean + quota_total: + type: integer + quota_usage: + type: integer + create_time: + type: string + last_login: + type: string + active: + type: boolean example: org_id: 1 workspace_id: 357 @@ -2290,7 +2607,7 @@ paths: /api/v2.1/admin/dtables/{base_uuid}/synchronous-export/export-dtable/: get: tags: [Export] - summary: Export base + summary: Export Base operationId: exportBase description: | Use this request to export a base as System Admin. @@ -2302,6 +2619,9 @@ paths: responses: "200": description: OK + content: + # Actually application/x-zip-compressed, but dtable-web does not accept this in Accept header + application/json: {} # Common Dataset /api/v2.1/admin/common-datasets/: @@ -2376,7 +2696,7 @@ paths: get: tags: - Common Dataset - summary: List invalid Syncs + summary: List Invalid Syncs operationId: listInvalidSyncs description: >- In some cases, a common dataset synchronization configuration becomes @@ -2419,7 +2739,7 @@ paths: - AccountTokenAuth: [] responses: "200": - description: "ok" + description: OK content: application/json: schema: @@ -2448,7 +2768,7 @@ paths: - $ref: "#/components/parameters/sync_id" responses: "200": - description: "ok" + description: OK content: application/json: schema: @@ -2480,6 +2800,31 @@ paths: application/json: schema: type: object + properties: + id: + type: integer + name: + type: string + owner: + type: string + created_at: + type: string + parent_group_id: + type: integer + quota: + type: integer + groups: + type: array + items: + type: object + members: + type: array + items: + type: object + ancestor_groups: + type: array + items: + type: object example: id: 1 name: Sys Dev @@ -2530,6 +2875,19 @@ paths: application/json: schema: type: object + properties: + id: + type: integer + name: + type: string + owner: + type: string + created_at: + type: string + parent_group_id: + type: integer + quota: + type: integer example: id: 2 name: Test Department @@ -2556,6 +2914,31 @@ paths: application/json: schema: type: object + properties: + id: + type: integer + name: + type: string + owner: + type: string + created_at: + type: string + parent_group_id: + type: integer + quota: + type: integer + groups: + type: array + items: + type: object + members: + type: array + items: + type: object + ancestor_groups: + type: array + items: + type: object example: id: 2 name: Test department @@ -2620,7 +3003,7 @@ paths: base_external_links: - id: 72 from_dtable: Example - creator: 123abc456def789ghi123jkl456mno789@auth.local + creator: 12abc456def789abc123def456abc789@auth.local creator_name: Jasmin Tee token: fleischkaesebroetchen permission: r @@ -2630,7 +3013,7 @@ paths: https://cloud.seatable.io/dtable/external-links/custom/fleischkaesebroetchen/ - id: 73 from_dtable: Example - creator: 123abc456def789ghi123jkl456mno789@auth.local + creator: 12abc456def789abc123def456abc789@auth.local creator_name: Jasmin Tee token: 42a42b34f97745948765 permission: r @@ -2641,7 +3024,7 @@ paths: view_external_links: - id: 12 from_dtable: Example - creator: 123abc456def789ghi123jkl456mno789@auth.local + creator: 12abc456def789abc123def456abc789@auth.local creator_name: Jasmin Tee token: 922008ae1f1742f788f8 permission: r @@ -2655,7 +3038,7 @@ paths: expire_date: "" - id: 13 from_dtable: Example - creator: 123abc456def789ghi123jkl456mno789@auth.local + creator: 12abc456def789abc123def456abc789@auth.local creator_name: Jasmin Tee token: 35967f61163848b29c44 permission: r @@ -3127,7 +3510,7 @@ paths: dtable_uuid: 88b0e65a-18f1-4b08-9e6f-fe63d6199c87 run_condition: per_update trigger: - rule_name: wd的提醒规则 + rule_name: My notification rule table_id: clk6 view_id: "0000" condition: rows_modified @@ -3135,7 +3518,7 @@ paths: watch_all_columns: true action: type: notify - default_msg: 呜呜呜 + default_msg: A row has been modified. users: - 3d3ef49e927a4ff99e605763355027e2@auth.local users_column_key: "" @@ -3147,7 +3530,7 @@ paths: dtable_uuid: 88b0e65a-18f1-4b08-9e6f-fe63d6199c87 run_condition: per_update trigger: - rule_name: wd的提醒规则2 + rule_name: My notification rule 2 table_id: clk6 view_id: "0000" condition: rows_modified @@ -3155,7 +3538,7 @@ paths: watch_all_columns: true action: type: notify - default_msg: 呜呜呜 + default_msg: A row has been modified. users: - 3d3ef49e927a4ff99e605763355027e2@auth.local users_column_key: "" @@ -3246,17 +3629,17 @@ paths: - Logs summary: List Registration Logs operationId: listRegistrationLogs + description: List all registration and invitation logs in the system. security: - AccountTokenAuth: [] responses: "200": - description: Successful response + description: OK content: application/json: schema: type: object example: - # FIXME: Should actually be registration_logs... invitation_logs: [] /api/v2.1/admin/abuse-reports/: get: @@ -3308,6 +3691,8 @@ paths: application/json: schema: type: object + required: + - handled properties: handled: $ref: "#/components/schemas/handled" @@ -3322,6 +3707,25 @@ paths: application/json: schema: type: object + properties: + id: + type: integer + dtable_uuid: + type: string + reporter: + type: string + external_link_token: + type: string + create_time: + type: string + abuse_type: + type: string + description: + type: string + handled: + type: boolean + dtable_name: + type: string example: id: 1 dtable_uuid: 12345678-ebe8-466c-89f6-492a0f956af9 @@ -3346,7 +3750,7 @@ paths: - $ref: "#/components/parameters/per_page" responses: "200": - description: Successful response with the queried audit logs. + description: OK content: application/json: schema: @@ -3399,6 +3803,17 @@ paths: type: integer description: The total number of logs available. example: 15 + example: + audit_log_list: + - username: "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6@auth.local" + name: "John Smith" + operation: "group_delete" + org_id: -1 + detail: + id: 250 + name: "My Group" + created_at: "2024-03-19T01:25:25+00:00" + org_name: "" /api/v2.1/admin/group-member-audit/: get: tags: @@ -3422,12 +3837,12 @@ paths: group_member_log_list: - user_email: 493524d94e7e467da506e30c24898555@auth.local user_name: 123 - user_contact_email: 123@qq.com + user_contact_email: user@example.com group_id: 3 group_name: g2 operator_email: 8d597a4a971c43afa8926a2dede58231@auth.local operator_name: admin - operator_contact_email: zwfxiaxue@163.com + operator_contact_email: admin@example.com date: 2025-05-27T06:59:43+00:00 operation: group_member_add count: 1 @@ -3457,12 +3872,12 @@ paths: "device": "", "user": "af57b7dda06b4928b255339d92294853@auth.local", "name": "org_admin1", - "contact_email": "org_admin1@qq.com", + "contact_email": "org_admin1@example.com", "ip": "172.18.0.1", "org_id": 1, "dtable_uuid": "8e7ad4a8-73dc-4be4-abae-057fd5203a0e", "file_path": "/custom/aaa (1) (1).md", - "dtable_name": "1\u5bfc\u5165\u534f\u4f5c\u4eba", + "dtable_name": "Example Base", "org_name": "org1", "file_or_dir_name": "aaa (1) (1).md" }, @@ -3472,12 +3887,12 @@ paths: "device": "", "user": "fc7043070b1d40878570f666de8d3481@auth.local", "name": "view", - "contact_email": "yangtong1009@163.com", + "contact_email": "viewer@example.com", "ip": "172.18.0.1", "org_id": -1, "dtable_uuid": "96908687-8713-4b81-9856-77f9d96af4b3", "file_path": "/custom/aaa.md", - "dtable_name": "\u5bfc\u5165\u4f18\u5316", + "dtable_name": "Test Base", "org_name": "", "file_or_dir_name": "aaa.md" } @@ -3501,6 +3916,7 @@ paths: - $ref: "#/components/parameters/per_page" - in: query name: has_handled + description: Filter by handling status. Use `true` for handled, `false` for unhandled, or `null` for all. schema: type: string enum: [true, false, null] @@ -3514,9 +3930,9 @@ paths: - repo_id: 696b27df-173e-4628-8ac2-10347c58a428 file_path: /asset/af5fa655-ef97-4573-8f2d-c3812e17a548/files/2024-08/eicar.com.txt has_deleted: true - has_ignored": false, + has_ignored: false virus_id: 1 - group_id: 1, + group_id: 1 group_name: group-11 org_id: 1 org_name: org-1 @@ -3526,7 +3942,7 @@ paths: file_path: /asset/af5fa655-ef97-4573-8f2d-c3812e17a548/files/2024-08/eicar.com (1).txt has_deleted: false has_ignored: false - virus_id: 2, + virus_id: 2 username: ac8961c4118f4400ad71bada398675b7@auth.local nickname: test@demo.com org_id: 1 @@ -3631,15 +4047,9 @@ paths: version: 0.1.33 display_type: overlay display_name: - de: Galerie en: Gallery - fr: Galerie - zh-cn: 图库 description: - de: Zeigen Sie Ihre Datensätze in einer Galerie an. en: Display your records in a gallery. - fr: Affichez vos enregistrements dans une galerie. - zh-cn: 用图库的方式展示你的记录。 last_modified: "2021-03-12T12:04:33+08:00" has_css: true has_icon: true @@ -3653,19 +4063,9 @@ paths: version: 0.4.29 display_type: overlay display_name: - de: "" en: Timeline - fr: "" - zh-cn: 时间线 description: - de: >- - Visualisieren Sie die aufgezeichneten Informationen - auf der Timeline. en: Visualize the recorded information on the timeline. - fr: >- - Visualisez les informations enregistrées sur la - chronologie. - zh-cn: 在时间线上可视化展现记录信息。 last_modified: "2021-03-08T10:29:27+08:00" has_css: true has_icon: true @@ -3678,23 +4078,9 @@ paths: name: map-en version: 0.0.16 display_name: - cs: Mapy - de: Karten en: Map - es: Mapas - fr: Les cartes - it: mappa - ru: карта - zh-cn: 地图 description: - de: >- - Das Karten-Plugin kann Datensätze auf der Karte - anzeigen en: Map plugin can display records on the map - fr: >- - Le plugin de carte peut afficher des enregistrements - sur la carte - zh-cn: 地图插件能把记录显示到地图上 last_modified: "2020-12-08T11:04:56+08:00" has_css: true has_icon: true @@ -3707,15 +4093,9 @@ paths: name: deduplication version: 0.0.18 display_name: - de: Datendeduplizierung en: Deduplication - fr: Déduplication des données - zh-cn: 数据去重 description: - de: Entfernen Sie doppelte Datensätze in einer Tabelle en: Remove duplicated records in a table - fr: Supprimer les enregistrements dupliqués dans une table - zh-cn: 删除表格中的重复数据 last_modified: "2021-02-04T11:55:26+08:00" has_css: true has_icon: true @@ -3729,13 +4109,14 @@ paths: operationId: addPlugin description: >- Add a plugin with a .zip file. This file could be retrieved from the - internet, for example, from the [SeaTable Plugins - Market](https://cloud.seatable.io/dtable/view-external-links/custom/plugins/). + internet, for example, from the [SeaTable Plugins Market](https://cloud.seatable.io/apps/custom/plugin-archive/). requestBody: content: multipart/form-data: schema: type: object + required: + - plugin properties: plugin: $ref: "#/components/schemas/plugin" @@ -3748,6 +4129,17 @@ paths: application/json: schema: type: object + properties: + id: + type: integer + plugin_name: + type: string + info: + type: object + added_by: + type: string + added_time: + type: string example: id: 6 plugin_name: deduplication @@ -3755,15 +4147,9 @@ paths: name: deduplication version: 0.0.18 display_name: - de: Datendeduplizierung en: Deduplication - fr: Déduplication des données - zh-cn: 数据去重 description: - de: Entfernen Sie doppelte Datensätze in einer Tabelle en: Remove duplicated records in a table - fr: Supprimer les enregistrements dupliqués dans une table - zh-cn: 删除表格中的重复数据 last_modified: "2021-02-04T11:55:26+08:00" has_css: true has_icon: true @@ -3827,6 +4213,17 @@ paths: application/json: schema: type: object + properties: + id: + type: integer + plugin_name: + type: string + info: + type: object + added_by: + type: string + added_time: + type: string example: id: 6 plugin_name: deduplication @@ -3834,15 +4231,9 @@ paths: name: deduplication version: 0.0.18 display_name: - de: Datendeduplizierung en: Deduplication - fr: Déduplication des données - zh-cn: 数据去重 description: - de: Entfernen Sie doppelte Datensätze in einer Tabelle en: Remove duplicated records in a table - fr: Supprimer les enregistrements dupliqués dans une table - zh-cn: 删除表格中的重复数据 last_modified: "2021-02-04T11:55:26+08:00" has_css: true has_icon: true @@ -3920,6 +4311,15 @@ paths: application/json: schema: type: object + properties: + active_user_list: + type: array + items: + type: object + page: + type: integer + total_count: + type: integer example: active_user_list: - avatar_url: https://cloud.seatable.io/media/avatars/default.png @@ -3928,7 +4328,7 @@ paths: name: Hannah Lustig reg_date: "2020-06-09T19:58:47.228413" - avatar_url: https://cloud.seatable.io/media/avatars/default.png - email: kdjfhgls5f1e4c8d8e1c42d95867317c@auth.local + email: cd0f00a5f1e4c8d8e1c42d958673170c@auth.local contact_email: pan@example.com name: Peter Pan reg_date: "2019-11-14T02:25:39.929507" @@ -4096,6 +4496,51 @@ paths: latest_visit_at: "2022-07-02T14:09:37+00:00" org_name: SeaTable GmbH count: 1 + /api/v2.1/admin/statistics/ai/: + get: + tags: + - Statistics + summary: Get AI Statistics by Owner/Team + operationId: getOwnerOrTeamAIStatistics + description: Get AI usage statistics monthly by owner/team. + security: + - AccountTokenAuth: [] + parameters: + - $ref: "#/components/parameters/group_by" + - $ref: "#/components/parameters/date_YYYY_MM_DD" + - $ref: "#/components/parameters/page" + - $ref: "#/components/parameters/per_page" + responses: + "200": + description: OK + content: + application/json: + schema: + type: object + examples: + group_by_owner: + summary: Query group by owner + value: + results: + - org_id: 176 + org_name: SeaTable + owner: 1@seafile_group + group_name: group-11 + total_cost: 0.25 + is_department_v2_group: false + - org_id: 176 + org_name: SeaTable + owner: d15ebe61bd684b868344498c73bdeac4@auth.local + nickname: test + count: 2 + group_by_team: + summary: Query group by organization + value: + results: + - org_id: 176 + org_name: SeaTable + total_cost: 0.25 + count: 1 # Maintenance /api/v2.1/admin/dtable/{base_uuid}/repair/: @@ -4111,7 +4556,7 @@ paths: - $ref: "#/components/parameters/base_uuid" responses: "200": - description: Successful response indicating that the dtable was repaired. + description: OK content: application/json: schema: @@ -4120,6 +4565,8 @@ paths: success: type: boolean example: true + example: + success: true # System Notifications /api/v2.1/admin/sys-user-notifications/: @@ -4164,6 +4611,9 @@ paths: application/json: schema: type: object + required: + - msg + - username properties: msg: $ref: "#/components/schemas/msg" @@ -4215,7 +4665,7 @@ paths: get: tags: - System Info & Customizing - summary: Get system information + summary: Get System Information operationId: getSystemInformation description: >- Get the general system information with this request as system @@ -4229,6 +4679,47 @@ paths: application/json: schema: type: object + properties: + version: + type: string + users_count: + type: integer + active_users_count: + type: integer + groups_count: + type: integer + org_count: + type: integer + dtables_count: + type: integer + multi_tenancy_enabled: + type: boolean + is_pro: + type: boolean + with_license: + type: boolean + license_expiration: + type: string + license_mode: + type: string + license_maxusers: + type: integer + license_to: + type: string + dtable_server_info: + type: array + items: + type: object + dtable_server_info_in_etcd: + type: array + items: + type: object + archived_base_count: + type: integer + archived_row_count: + type: integer + archived_base_storage: + type: integer example: version: 3.3.7 users_count: 417 @@ -4316,6 +4807,37 @@ paths: application/json: schema: type: object + properties: + ENABLE_SIGNUP: + type: integer + ACTIVATE_AFTER_REGISTRATION: + type: integer + REGISTRATION_SEND_MAIL: + type: integer + LOGIN_REMEMBER_DAYS: + type: integer + USER_STRONG_PASSWORD_REQUIRED: + type: integer + USER_PASSWORD_MIN_LENGTH: + type: integer + USER_PASSWORD_STRENGTH_LEVEL: + type: integer + FORCE_PASSWORD_CHANGE: + type: integer + LOGIN_ATTEMPT_LIMIT: + type: integer + FREEZE_USER_ON_LOGIN_FAILED: + type: integer + ENABLE_TWO_FACTOR_AUTH: + type: integer + ENABLE_BRANDING_CSS: + type: integer + SITE_NAME: + type: string + SITE_TITLE: + type: string + CUSTOM_CSS: + type: string example: ENABLE_SIGNUP: 1 ACTIVATE_AFTER_REGISTRATION: 1 @@ -4346,6 +4868,8 @@ paths: multipart/form-data: schema: type: object + required: + - logo properties: logo: $ref: "#/components/schemas/logo" @@ -4380,6 +4904,8 @@ paths: multipart/form-data: schema: type: object + required: + - favicon properties: favicon: $ref: "#/components/schemas/favicon" @@ -4408,6 +4934,8 @@ paths: multipart/form-data: schema: type: object + required: + - login_bg_image properties: login_bg_image: $ref: "#/components/schemas/login_bg_image" diff --git a/openapi_input/team_admin_account_operations.yaml b/openapi_input/team_admin_account_operations.yaml index a1e234b5..9020ae06 100644 --- a/openapi_input/team_admin_account_operations.yaml +++ b/openapi_input/team_admin_account_operations.yaml @@ -3,7 +3,7 @@ info: title: Account Operations - Team admin description: >- The official SeaTable API Reference (OpenAPI 3.0). - version: "6.0" + version: "6.1" servers: - url: "https://{server}" variables: @@ -30,6 +30,8 @@ tags: description: Retrieve team info and update team settings - name: Activities & Logs description: Retrieve team activities and logs + - name: Statistics + description: Retrieve statistics about system activities - name: Customizing description: Customize team appearance - name: SAML @@ -69,13 +71,73 @@ components: type: string description: Exact name or a part of the name of the base, case insensitive. example: "Example" + dtable_uuid: + name: dtable_uuid + in: query + schema: + type: string + pattern: '^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$' + description: The unique identifier of a base. + example: 5c264e76-0e5a-448a-9f34-580b551364ca ignore_asset: name: ignore_asset in: query schema: type: boolean - example: "false" + example: false description: Set this to `true` to export the base without assets. Default is `false`. + login_status: + name: status + in: query + schema: + type: string + enum: [success, failure] + example: success + description: Set this to `success` to only return successful logins. By default, all logins are returned. + start: + name: start + in: query + schema: + type: string + format: date-time + description: Start date in ISO format. + example: "2025-11-01T06:00:00+01:00" + required: false + end: + name: end + in: query + schema: + type: string + format: date-time + description: End date in ISO format. + example: "2025-11-30T18:00:00+01:00" + required: false + operation_group: + name: operation_group + in: query + schema: + type: string + enum: [user, group, base] + example: user + description: Filter by a specific operation group. By default, all operations are returned. + required: false + group_by: + name: group_by + in: query + schema: + type: string + enum: [owner, dtable_uuid] + required: true + description: Query by owner or Base + example: "owner" + date: + name: date + in: query + schema: + type: string + required: true + description: A date string in YYYY-MM-DD format + example: "2025-01-01" #=======================Path parameters=======================# org_id: @@ -108,28 +170,29 @@ components: example: 5c264e76-0e5a-448a-9f34-580b551364ca external_link_token: name: external_link_token + description: The token of the external link. in: path schema: type: string - pattern: "^[0-9a-f]{20}$" required: true example: "d6d006b319ca4d2aa060" view_external_link_token: name: view_external_link_token + description: The token of the view external link. in: path schema: type: string - pattern: "^[0-9a-f]{20}$" required: true example: "d6d006b319ca4d2aa060" invite_link_token: name: invite_link_token + description: The token of the invite link. in: path schema: type: string pattern: "^[0-9a-f]{20}$" required: true - example: "0366b8995d7f47d8eu3t" + example: "0366b8995d7f47d8ae3c" group_id: name: group_id in: path @@ -149,6 +212,14 @@ components: pattern: "^[a-f0-9]{32}(@auth.local)$" required: true example: 123456789f1e4c8d8e1c31415867317c@auth.local + app_name: + name: app_name + description: The name of your app. Every API-Token has a name to identify the purpose. The name of the app must be unique for every base. + in: path + schema: + type: string + required: true + example: "My App" schemas: team_admin_permission: @@ -173,11 +244,11 @@ components: The `user_id` of the owner of the group. Optional. If left blank, the newly added group will not be visible to anyone but still operatable. - example: "123abc456def789ghi123jkl456mno789@auth.local" + example: "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6@auth.local" team_admin_user_id: type: string description: The unique `user_id` in the form ...@auth.local. This is not the email address of the user. - example: "123abc456def789ghi123jkl456mno789@auth.local" + example: "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6@auth.local" team_admin_email: type: string description: User's contact email to login. @@ -201,7 +272,7 @@ components: description: >- If a workspace should be automatically created for the user. Optional. `false` by default. - example: "true" + example: true team_admin_id_in_org: type: string description: >- @@ -211,7 +282,7 @@ components: team_admin_quota_total: type: integer description: Update their total quota in MB. - example: "3" + example: 3 team_admin_group_id: type: string description: The ID of the group you'd like to move. @@ -227,13 +298,13 @@ components: description: >- Whether you'd like to move your group to the bottom of the list (`true`). `false` by default. - example: "true" + example: true enable_force_2fa: type: boolean description: >- if the 2-factor-authentication is forced (`true` or `false`). - example: "true" + example: true enable_force_sso_login: type: boolean description: Whether login via SSO is enforced for all team members (`true` or `false`). @@ -243,19 +314,19 @@ components: description: >- if newly added users will get a system email (`true` or `false`). - example: "true" + example: true enable_external_user_access_invite_link: type: boolean description: >- if external users can access bases via invite links (`true` or `false`). - example: "false" + example: false enable_member_modify_name: type: boolean description: >- if members are allowed to change their names (`true` or `false`). - example: "false" + example: false upload_file: type: object properties: @@ -365,6 +436,27 @@ paths: application/json: schema: type: object + properties: + id: + type: integer + is_active: + type: boolean + ctime: + type: string + name: + type: string + email: + type: string + contact_email: + type: string + last_login: + type: string + self_usage: + type: integer + quota: + type: integer + workspace_id: + type: integer example: id: 125 is_active: true @@ -396,6 +488,29 @@ paths: application/json: schema: type: object + properties: + email: + type: string + name: + type: string + contact_email: + type: string + quota_usage: + type: integer + quota_total: + type: integer + avatar_url: + type: string + id_in_org: + type: string + has_default_device: + type: boolean + is_force_2fa: + type: boolean + is_active: + type: boolean + is_org_admin: + type: boolean example: email: "6196ab3dacef4e539ae8da4844b58a1f@auth.local" name: "John Doe" @@ -406,6 +521,8 @@ paths: id_in_org: "" has_default_device: false is_force_2fa: true + is_active: true + is_org_admin: false put: tags: - Users @@ -444,6 +561,31 @@ paths: application/json: schema: type: object + properties: + email: + type: string + name: + type: string + contact_email: + type: string + quota_usage: + type: integer + quota_total: + type: integer + is_active: + type: boolean + id: + type: integer + ctime: + type: string + id_in_org: + type: string + last_login: + type: string + self_usage: + type: integer + quota: + type: integer example: email: 23456789d1754bb4afa2c2cb7369d244@auth.local name: Stefan @@ -520,7 +662,7 @@ paths: This request is to be distinguished from the next request, because - cancelling the enforcement doesn't necesssarily [Disable 2FA for A User + cancelling the enforcement doesn't necessarily [Disable 2FA for A User in Team](/reference/disabletwofactor-1), which serves a different purpose. requestBody: content: @@ -610,14 +752,14 @@ paths: updated_at: "2021-03-02T10:29:03+00:00" color: null text_color: null - icon: null, - is_encrypted: false, - in_storage: true, - org_id: 1, - email: c882391bfa0144c4af64e4e0cde50b6c@auth.local, - group_id: -1, - owner: Jasmin Tee, - owner_deleted: false, + icon: null + is_encrypted: false + in_storage: true + org_id: 1 + email: c882391bfa0144c4af64e4e0cde50b6c@auth.local + group_id: -1 + owner: Jasmin Tee + owner_deleted: false rows_count: 2 - id: 159 workspace_id: 304 @@ -627,16 +769,74 @@ paths: updated_at: "2021-03-02T10:29:03+00:00" color: null text_color: null - icon: null, - is_encrypted: false, - in_storage: true, - org_id: 1, - email: c882391bfa0144c4af64e4e0cde50b6c@auth.local, - group_id: -1, - owner: TeamAdmin, - owner_deleted: false, + icon: null + is_encrypted: false + in_storage: true + org_id: 1 + email: c882391bfa0144c4af64e4e0cde50b6c@auth.local + group_id: -1 + owner: TeamAdmin + owner_deleted: false rows_count: 20 count: 16 + /api/v2.1/org/{org_id}/admin/users/{user_id}/dtables/: + get: + tags: + - Bases + summary: List User's Bases + operationId: listUsersBases + description: List all the bases of a certain user by the user's ID. + security: + - AccountTokenAuth: [] + parameters: + - $ref: "#/components/parameters/org_id" + - $ref: "#/components/parameters/user_id" + - $ref: "#/components/parameters/page" + - $ref: "#/components/parameters/per_page" + responses: + "200": + description: OK + content: + application/json: + schema: + type: object + example: + dtable_list: + - id: 6 + workspace_id: 2 + uuid: 3c899a81-6a0c-4111-bb19-288ebf8442fd + name: CRM + created_at: '2025-11-28T14:16:30+01:00' + updated_at: '2025-11-28T14:17:04+01:00' + color: "#E91E63" + text_color: null + icon: icon-user-interview + is_encrypted: false + in_storage: true + org_id: 2 + email: e38487b4357e40c8b1359223ba87a1af@auth.local + group_id: -1 + owner: org-1-admin + owner_deleted: false + rows_count: 7 + - id: 7 + workspace_id: 2 + uuid: e97bb668-da36-484c-8ac9-8aa9e0564f4c + name: Finances + created_at: '2025-11-28T14:18:31+01:00' + updated_at: '2025-11-28T14:18:31+01:00' + color: "#00C9C7" + text_color: null + icon: icon-dollar + is_encrypted: false + in_storage: true + org_id: 2 + email: e38487b4357e40c8b1359223ba87a1af@auth.local + group_id: -1 + owner: org-1-admin + owner_deleted: false + rows_count: 0 + count: 2 /api/v2.1/org/{org_id}/admin/dtables/{base_uuid}/: get: tags: @@ -657,6 +857,41 @@ paths: application/json: schema: type: object + properties: + id: + type: integer + workspace_id: + type: integer + uuid: + type: string + name: + type: string + created_at: + type: string + updated_at: + type: string + color: + type: string + text_color: + type: string + icon: + type: string + is_encrypted: + type: boolean + in_storage: + type: boolean + org_id: + type: integer + owner: + type: string + email: + type: string + group_id: + type: integer + owner_deleted: + type: boolean + rows_count: + type: integer example: id: 158 workspace_id: 304 @@ -666,14 +901,14 @@ paths: updated_at: "2021-03-02T10:29:03+00:00" color: null text_color: null - icon: null, - is_encrypted: false, - in_storage: true, - org_id: 1, + icon: null + is_encrypted: false + in_storage: true + org_id: 1 owner: JiweRan - email: c882391bfa0144c4af64e4e0cde50b6c@auth.local, - group_id: -1, - owner_deleted: false, + email: c882391bfa0144c4af64e4e0cde50b6c@auth.local + group_id: -1 + owner_deleted: false rows_count: 2 delete: tags: @@ -842,6 +1077,17 @@ paths: application/json: schema: type: object + properties: + groups: + type: array + items: + type: object + page: + type: integer + per_page: + type: integer + page_next: + type: boolean example: groups: - id: 51 @@ -890,6 +1136,19 @@ paths: application/json: schema: type: object + properties: + id: + type: integer + group_name: + type: string + ctime: + type: string + creator_email: + type: string + creator_name: + type: string + creator_contact_email: + type: string example: id: 3 group_name: Test group @@ -916,6 +1175,19 @@ paths: application/json: schema: type: object + properties: + id: + type: integer + group_name: + type: string + ctime: + type: string + creator_email: + type: string + creator_name: + type: string + creator_contact_email: + type: string example: id: 1 group_name: Test Group @@ -940,7 +1212,7 @@ paths: "User xxx is already group owner". * `new_group_name` is the new name of your group. If you don't want to - change the name, remove shi parameter because if you enter the current + change the name, remove this parameter because if you enter the current group name here you'll get an error "There is already a group with that name". requestBody: @@ -965,11 +1237,26 @@ paths: application/json: schema: type: object + properties: + id: + type: integer + group_name: + type: string + ctime: + type: string + creator_email: + type: string + creator_name: + type: string + creator_contact_email: + type: string + size: + type: integer example: id: 1 group_name: Group New ctime: "2020-11-19T08:14:52+00:00" - creator_email: 123abc456def789ghi123jkl456mno789@auth.local + creator_email: a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6@auth.local creator_name: Michael Jackson creator_contact_email: michael@example.com size: 98842 @@ -978,7 +1265,13 @@ paths: - Groups summary: Delete Group operationId: deleteGroup - description: Delete a group with its ID. + description: >- + Delete a group with its ID. + + + > 🚧 Group must be empty + > + > A group can only be deleted if it contains no bases. Delete or move all bases out of the group first, otherwise the API returns `400` with `"Cannot delete group with bases"`. security: - AccountTokenAuth: [] parameters: @@ -1086,6 +1379,15 @@ paths: application/json: schema: type: object + properties: + group_id: + type: integer + group_name: + type: string + members: + type: array + items: + type: object example: group_id: 1 group_name: Sample Group @@ -1179,6 +1481,8 @@ paths: application/json: schema: type: object + example: + success: true delete: tags: - Groups @@ -1221,8 +1525,190 @@ paths: application/json: schema: type: object + example: + share_list: [] + /api/v2.1/org/{org_id}/admin/dtables/{base_uuid}/api-tokens/: + get: + tags: + - Bases + summary: List API-Tokens + operationId: listApiTokens + description: List API tokens of a single base. + security: + - AccountTokenAuth: [] + parameters: + - $ref: "#/components/parameters/org_id" + - $ref: "#/components/parameters/base_uuid" + responses: + "200": + description: OK + content: + application/json: + schema: + type: object + example: + api_tokens: + - app_name: n8n + api_token: c1a7a416280ab3f9b0b632edbb58a69a771783f0 + generated_by: e38487b4357e40c8b1359223ba87a1af@auth.local + creator: user1 + avatar_url: https://cloud.seatable.io/media/avatars/default.png + generated_at: '2025-11-28T14:18:39+01:00' + last_access: '2025-11-28T14:18:39+01:00' + permission: rw + /api/v2.1/org/{org_id}/admin/dtables/{base_uuid}/api-tokens/{app_name}/: + delete: + tags: + - Bases + summary: Delete API-Token + operationId: deleteApiToken + description: Delete a specific API token from a base. The token is identified by its *app_name*. + security: + - AccountTokenAuth: [] + parameters: + - $ref: "#/components/parameters/org_id" + - $ref: "#/components/parameters/base_uuid" + - $ref: "#/components/parameters/app_name" + responses: + "200": + description: OK + content: + application/json: + schema: + type: object + example: + success: true + /api/v2.1/org/{org_id}/admin/api-tokens/: + get: + tags: + - Bases + summary: List API-Tokens of All Bases + operationId: listApiTokensOfAllBases + description: List API tokens of all bases inside the team/organization. + security: + - AccountTokenAuth: [] + parameters: + - $ref: "#/components/parameters/org_id" + - $ref: "#/components/parameters/page" + - $ref: "#/components/parameters/per_page" + responses: + "200": + description: OK + content: + application/json: + schema: + type: object + example: + api_tokens: + - app_name: n8n + api_token: c1a7a416280ab3f9b0b632edbb58a69a771783f0 + generated_by: e38487b4357e40c8b1359223ba87a1af@auth.local + creator: user1 + avatar_url: https://cloud.seatable.io/media/avatars/default.png + generated_at: '2025-11-28T14:18:39+01:00' + last_access: '2025-11-28T14:18:39+01:00' + permission: rw + dtable_uuid: 3c899a81-6a0c-4111-bb19-288ebf8442fd + dtable_name: CRM + dtable_icon: icon-user-interview + dtable_color: "#E91E63" + - app_name: API + api_token: 89913c6509062bbd24efe42a509cf9c5bb843018 + generated_by: e38487b4357e40c8b1359223ba87a1af@auth.local + creator: user1 + avatar_url: https://cloud.seatable.io/media/avatars/default.png + generated_at: '2025-11-28T14:18:54+01:00' + last_access: '2025-11-28T14:18:54+01:00' + permission: rw + dtable_uuid: e97bb668-da36-484c-8ac9-8aa9e0564f4c + dtable_name: Finances + dtable_icon: icon-dollar + dtable_color: "#00C9C7" + total_count: 2 # Sharing Links + /api/v2.1/org/{org_id}/admin/shares/: + get: + tags: + - Sharing Links + summary: List Shares + operationId: listShares + description: | + List all shares inside the given team/organization. + + This includes the following: + - Bases shared to individual users + - Bases shared to groups + - Views shared to individual users + - Views shared to groups + security: + - AccountTokenAuth: [] + parameters: + - $ref: "#/components/parameters/org_id" + responses: + "200": + description: OK + content: + application/json: + schema: + type: object + properties: + dtable_user_shares: + type: array + items: + type: object + dtable_group_shares: + type: array + items: + type: object + view_user_shares: + type: array + items: + type: object + view_group_shares: + type: array + items: + type: object + example: + dtable_user_shares: + - dtable_uuid: 3c899a81-6a0c-4111-bb19-288ebf8442fd + email: 97f45993fc174280b939976c9b9256eb@auth.local + name: org-1-user-1 + avatar_url: https://cloud.seatable.io/media/avatars/default.png + contact_email: org-1-user-1@seatable.io + permission: rw + share_id: 1 + dtable_group_shares: + - dtable_uuid: 3c899a81-6a0c-4111-bb19-288ebf8442fd + group_id: 1 + group_name: Marketing + permission: rw + share_id: 1 + view_user_shares: + - dtable_uuid: 3c899a81-6a0c-4111-bb19-288ebf8442fd + id: 1 + dtable_name: CRM + from_user: e38487b4357e40c8b1359223ba87a1af@auth.local + to_user: 97f45993fc174280b939976c9b9256eb@auth.local + permission: r + table_id: '0000' + view_id: '0000' + shared_name: User share + from_user_name: org-1-admin + to_user_name: org-1-user-1 + avatar_url: https://cloud.seatable.io/media/avatars/default.png + view_group_shares: + - dtable_uuid: 3c899a81-6a0c-4111-bb19-288ebf8442fd + id: 1 + dtable_name: CRM + from_user: e38487b4357e40c8b1359223ba87a1af@auth.local + to_group_id: 1 + permission: r + table_id: '0000' + view_id: '0000' + shared_name: Group share + from_user_name: org-1-admin + to_group_name: Marketing /api/v2.1/org/{org_id}/admin/external-links/: get: tags: @@ -1384,7 +1870,7 @@ paths: - dtable_name: All types username: 876543216569491ba42905bf1647fd3f@auth.local token: >- - https://cloud.seatable.io/dtable/links/9167cdbd67574226a72e + https://cloud.seatable.io/dtable/links/9167cdbd67574226a72e/ ctime: "2021-12-15T13:11:54.083636" password: null expire_date: null @@ -1395,7 +1881,7 @@ paths: - dtable_name: All types username: 876543216569491ba42905bf1647fd3f@auth.local token: >- - https://cloud.seatable.io/dtable/links/b7ea0a4269234565998e + https://cloud.seatable.io/dtable/links/b7ea0a4269234565998e/ ctime: "2021-12-15T13:11:55.058965" password: null expire_date: null @@ -1435,11 +1921,30 @@ paths: application/json: schema: type: object + properties: + username: + type: string + permission: + type: string + token: + type: string + link: + type: string + dtable: + type: string + dtable_id: + type: integer + workspace_id: + type: integer + expire_date: + type: string + ctime: + type: string example: username: 876543216569491ba42905bf1647fd3f@auth.local permission: rw token: 9167cdbd67574226a72e - link: https://cloud.seatable.io/dtable/links/9167cdbd67574226a72e + link: https://cloud.seatable.io/dtable/links/9167cdbd67574226a72e/ dtable: All types dtable_id: 2 workspace_id: 2 @@ -1469,23 +1974,6 @@ paths: example: success: true - # Base Export (asynchron, deshalb bieten wir das nicht mehr an.) - #/api/v2.1/org/{org_id}/admin/dtables/{base_uuid}/export-dtable/: - # get: - # tags: [Export] - # summary: Export base - # description: | - # Use this request to export a base as Team Admin. - # security: - # - AccountTokenAuth: [] - # parameters: - # - $ref: "#/components/parameters/org_id" - # - $ref: "#/components/parameters/base_uuid" - # - $ref: "#/components/parameters/ignore_asset" - # responses: - # "200": - # description: OK - # Info & Settings /api/v2.1/org/admin/info/: get: @@ -1505,6 +1993,37 @@ paths: application/json: schema: type: object + properties: + org_id: + type: integer + org_name: + type: string + storage_quota: + type: integer + storage_usage: + type: integer + member_quota: + type: integer + member_usage: + type: integer + active_members: + type: integer + row_usage: + type: integer + row_total: + type: integer + role: + type: string + big_data_row_limit: + type: integer + big_data_total_rows: + type: integer + big_data_total_storage: + type: integer + scripts_running_total: + type: integer + scripts_running_count: + type: integer example: org_id: 1 org_name: SeaTable GmbH @@ -1582,6 +2101,13 @@ paths: application/json: schema: type: object + properties: + enable_force_2fa: + type: boolean + enable_new_user_email: + type: boolean + enable_external_user_access_invite_link: + type: boolean example: enable_force_2fa: false enable_new_user_email: true @@ -1617,10 +2143,39 @@ paths: application/json: schema: type: object + properties: + enable_force_2fa: + type: boolean + enable_new_user_email: + type: boolean + enable_external_user_access_invite_link: + type: boolean example: enable_force_2fa: true enable_new_user_email: true enable_external_user_access_invite_link: false + /api/v2.1/org/admin/: + delete: + tags: + - Info & Settings + summary: Delete Team + operationId: deleteTeam + description: >- + Delete a team (organization) with its ID. This will eliminate the team! + + However, this won't delete the team users - but all its members will + become team-less users in the system. + security: + - AccountTokenAuth: [] + responses: + "200": + description: OK + content: + application/json: + schema: + type: object + example: + success: true /api/v2.1/org/{org_id}/admin/admin-logs/: get: @@ -1635,6 +2190,9 @@ paths: - $ref: "#/components/parameters/page" - $ref: "#/components/parameters/per_page" - $ref: "#/components/parameters/org_id" + - $ref: "#/components/parameters/operation_group" + - $ref: "#/components/parameters/start" + - $ref: "#/components/parameters/end" responses: "200": description: OK @@ -1709,12 +2267,12 @@ paths: group_member_log_list: - user_email: 70e6e6be77dc4afeb1d6786f1e3d14e2@auth.local user_name: org_user - user_contact_email: org_user@qq.com + user_contact_email: org_user@example.com group_id: 2 group_name: org-t1 operator_email: ecd40dcfcdd041a98d51bdde2a05612e@auth.local operator_name: org_admin - operator_contact_email: org_admin@qq.com + operator_contact_email: org_admin@example.com date: 2025-05-27T06:57:03+00:00 operation: group_member_add count: 1 @@ -1731,6 +2289,9 @@ paths: - $ref: "#/components/parameters/page" - $ref: "#/components/parameters/per_page" - $ref: "#/components/parameters/org_id" + - $ref: "#/components/parameters/login_status" + - $ref: "#/components/parameters/start" + - $ref: "#/components/parameters/end" responses: "200": description: OK @@ -1842,12 +2403,12 @@ paths: "device": "", "user": "af57b7dda06b4928b255339d92294853@auth.local", "name": "org_admin1", - "contact_email": "org_admin1@qq.com", + "contact_email": "org_admin1@example.com", "ip": "172.18.0.1", "org_id": 1, "dtable_uuid": "8e7ad4a8-73dc-4be4-abae-057fd5203a0e", "file_path": "custom/aaa (1) (1).md", - "dtable_name": "1\u5bfc\u5165\u534f\u4f5c\u4eba", + "dtable_name": "Example Base", "file_or_dir_name": "aaa (1) (1).md" }, { @@ -1856,17 +2417,374 @@ paths: "device": "", "user": "af57b7dda06b4928b255339d92294853@auth.local", "name": "org_admin1", - "contact_email": "org_admin1@qq.com", + "contact_email": "org_admin1@example.com", "ip": "172.18.0.1", "org_id": 1, "dtable_uuid": "8e7ad4a8-73dc-4be4-abae-057fd5203a0e", "file_path": "/custom/aaa (1) (1).md", - "dtable_name": "1\u5bfc\u5165\u534f\u4f5c\u4eba", + "dtable_name": "Example Base", "file_or_dir_name": "aaa (1) (1).md" } ], "count": 2 } + /api/v2.1/org/{org_id}/admin/automation-logs/: + get: + tags: + - Activities & Logs + summary: List Automation Logs + operationId: listAutomationLogs + description: Returns a list of automation logs inside a specific team. + security: + - AccountTokenAuth: [] + parameters: + - $ref: "#/components/parameters/org_id" + - $ref: "#/components/parameters/dtable_uuid" + - $ref: "#/components/parameters/start" + - $ref: "#/components/parameters/end" + - $ref: "#/components/parameters/page" + - $ref: "#/components/parameters/per_page" + responses: + "200": + description: OK + content: + application/json: + schema: + type: object + example: + logs: + - id: 43543 + rule_id: 454 + rule_name: Send Email + trigger_time: "2025-11-28T14:05:52+01:00" + run_condition: per_update + success: true + org_id: -1 + dtable_uuid: 8fc3fbc2-d8d2-4a23-965d-33cbf511d780 + owner: 314bd2ed8d9741b08852916907dc7dd5@auth.local + warnings: null + - id: 43544 + rule_id: 454 + rule_name: Send Email + trigger_time: "2025-11-28T14:05:55+01:00" + run_condition: per_update + success: true + org_id: -1 + dtable_uuid: 8fc3fbc2-d8d2-4a23-965d-33cbf511d780 + owner: 314bd2ed8d9741b08852916907dc7dd5@auth.local + warnings: null + total_count: 2 + /api/v2.1/org/{org_id}/admin/python-runs/: + get: + tags: + - Activities & Logs + summary: List Python Runs + operationId: listPythonRuns + description: Returns a list of python runs inside a specific team. + security: + - AccountTokenAuth: [] + parameters: + - $ref: "#/components/parameters/org_id" + - $ref: "#/components/parameters/dtable_uuid" + - $ref: "#/components/parameters/start" + - $ref: "#/components/parameters/end" + - $ref: "#/components/parameters/page" + - $ref: "#/components/parameters/per_page" + responses: + "200": + description: OK + content: + application/json: + schema: + type: object + example: + runs: + - dtable_uuid: 306acc83-5305-45b4-b34b-528f6f51d7b8 + finished_at: "2026-01-06T11:57:11+01:00" + id: 3 + operate_from: manualy + owner: 2a609b47d6254449a7f042a42ef02d09@auth.local + return_code: 0 + script_name: DDx0.py + started_at: "2026-01-06T11:57:10+01:00" + success: true + script_display_name: "Hello World" + - dtable_uuid: 149cd597-dcbc-4e2a-8344-91651a1b4853 + finished_at: "2026-01-06T12:11:18+01:00" + id: 4 + operate_from: manualy + owner: 2a609b47d6254449a7f042a42ef02d09@auth.local + return_code: 0 + script_name: O60m.py + started_at: "2026-01-06T12:11:18+01:00" + success: true + script_display_name: "Base 2 Script" + total_count: 2 + + # Statistics + /api/v2.1/org/{org_id}/admin/statistics/admin-logs/by-day/: + get: + tags: + - Statistics + summary: Admin Logs (by Day) + operationId: getAdminLogStatisticsByDay + description: Returns statistics about admin logs grouped by day. + security: + - AccountTokenAuth: [] + parameters: + - $ref: "#/components/parameters/org_id" + - $ref: "#/components/parameters/start" + - $ref: "#/components/parameters/end" + - $ref: "#/components/parameters/page" + - $ref: "#/components/parameters/per_page" + responses: + "200": + description: OK + content: + application/json: + schema: + type: object + example: + results: + - date: '2025-10-29' + number_of_operations: 2 + base_operations: 1 + group_operations: 0 + user_operations: 1 + - date: '2025-10-30' + number_of_operations: 5 + base_operations: 3 + group_operations: 1 + user_operations: 1 + - date: '2025-10-31' + number_of_operations: 2 + base_operations: 0 + group_operations: 1 + user_operations: 1 + total_count: 3 + /api/v2.1/org/{org_id}/admin/statistics/automation-logs/by-day/: + get: + tags: + - Statistics + summary: Automation Logs (by Day) + operationId: getAutomationLogStatisticsByDay + description: Returns statistics about automation logs grouped by day. + security: + - AccountTokenAuth: [] + parameters: + - $ref: "#/components/parameters/org_id" + - $ref: "#/components/parameters/dtable_uuid" + - $ref: "#/components/parameters/start" + - $ref: "#/components/parameters/end" + - $ref: "#/components/parameters/page" + - $ref: "#/components/parameters/per_page" + responses: + "200": + description: OK + content: + application/json: + schema: + type: object + example: + results: + - trigger_date: '2025-11-27' + number_of_executions: 10 + successful_executions: 9 + unsuccessful_executions: 1 + - trigger_date: '2025-11-28' + number_of_executions: 2 + successful_executions: 2 + unsuccessful_executions: 0 + total_count: 2 + /api/v2.1/org/{org_id}/admin/statistics/automation-logs/by-base/: + get: + tags: + - Statistics + summary: Automation Logs (by Base) + operationId: getAutomationLogStatisticsByBase + description: Returns statistics about automation logs grouped by base. + security: + - AccountTokenAuth: [] + parameters: + - $ref: "#/components/parameters/org_id" + - $ref: "#/components/parameters/start" + - $ref: "#/components/parameters/end" + - $ref: "#/components/parameters/page" + - $ref: "#/components/parameters/per_page" + responses: + "200": + description: OK + content: + application/json: + schema: + type: object + example: + results: + - dtable_uuid: 3c899a81-6a0c-4111-bb19-288ebf8442fd + number_of_executions: 2 + successful_executions: 2 + unsuccessful_executions: 0 + - dtable_uuid: e97bb668-da36-484c-8ac9-8aa9e0564f4c + number_of_executions: 5 + successful_executions: 4 + unsuccessful_executions: 1 + total_count: 2 + /api/v2.1/org/{org_id}/admin/statistics/login-logs/by-day/: + get: + tags: + - Statistics + summary: Login Logs (by Day) + operationId: getLoginLogStatisticsByDay + description: Returns statistics about login logs grouped by day. + security: + - AccountTokenAuth: [] + parameters: + - $ref: "#/components/parameters/org_id" + - $ref: "#/components/parameters/start" + - $ref: "#/components/parameters/end" + - $ref: "#/components/parameters/page" + - $ref: "#/components/parameters/per_page" + responses: + "200": + description: OK + content: + application/json: + schema: + type: object + example: + results: + - date: '2025-11-27' + number_of_attempts: 15 + successful_attempts: 14 + unsuccessful_attempts: 1 + - date: '2025-11-28' + number_of_attempts: 2 + successful_attempts: 1 + unsuccessful_attempts: 1 + total_count: 2 + /api/v2.1/org/{org_id}/admin/statistics/python-runs/by-day/: + get: + tags: + - Statistics + summary: Python Runs (by Day) + operationId: getPythonRunStatisticsByDay + description: Returns statistics about python runs grouped by day. + security: + - AccountTokenAuth: [] + parameters: + - $ref: "#/components/parameters/org_id" + - $ref: "#/components/parameters/dtable_uuid" + - $ref: "#/components/parameters/start" + - $ref: "#/components/parameters/end" + - $ref: "#/components/parameters/page" + - $ref: "#/components/parameters/per_page" + responses: + "200": + description: OK + content: + application/json: + schema: + type: object + example: + results: + - date: '2025-11-27' + number_of_runs: 8 + total_run_time: 5 + triggered_by_automation_rule: 0 + triggered_manually: 8 + successful_runs: 3 + unsuccessful_runs: 5 + - date: '2025-11-28' + number_of_runs: 4 + total_run_time: 22 + triggered_by_automation_rule: 0 + triggered_manually: 4 + successful_runs: 4 + unsuccessful_runs: 0 + total_count: 2 + /api/v2.1/org/{org_id}/admin/statistics/python-runs/by-base/: + get: + tags: + - Statistics + summary: Python Runs (by Base) + operationId: getPythonRunStatisticsByBase + description: Returns statistics about python runs grouped by base. + security: + - AccountTokenAuth: [] + parameters: + - $ref: "#/components/parameters/org_id" + - $ref: "#/components/parameters/start" + - $ref: "#/components/parameters/end" + - $ref: "#/components/parameters/page" + - $ref: "#/components/parameters/per_page" + responses: + "200": + description: OK + content: + application/json: + schema: + type: object + example: + results: + - base_uuid: 4202f7ad-3168-4bf4-b1e4-01aee6782f94 + number_of_runs: 8 + total_run_time: 5 + triggered_by_automation_rule: 0 + triggered_manually: 8 + successful_runs: 3 + unsuccessful_runs: 5 + - base_uuid: ca490121-cea3-4a04-8e25-ac72b03a61e0 + number_of_runs: 4 + total_run_time: 22 + triggered_by_automation_rule: 0 + triggered_manually: 4 + successful_runs: 4 + unsuccessful_runs: 0 + total_count: 2 + /api/v2.1/org/{org_id}/admin/statistics/ai/: + get: + tags: + - Statistics + summary: Get AI Statistics by User/Base + operationId: getUserOrBaseAIStatistics + description: Get AI usage statistics monthly by user/base. + security: + - AccountTokenAuth: [] + parameters: + - $ref: "#/components/parameters/group_by" + - $ref: "#/components/parameters/date" + - $ref: "#/components/parameters/page" + - $ref: "#/components/parameters/per_page" + - $ref: "#/components/parameters/org_id" + responses: + "200": + description: OK + content: + application/json: + schema: + type: object + examples: + group_by_owner: + summary: Query group by owner + value: + results: + - owner: 1@seafile_group + total_cost: 0.15 + group_name: group-11 + - owner: d15ebe61bd684b868344498c73bdeac4@auth.local + total_cost: 0.2 + nickname: test + count: 2 + group_by_base: + summary: Query group by base + value: + results: + - dtable_uuid: f0e6f53caee749b1a5eb65cb2991d6bb + owner: 1@seafile_group + total_cost: 0.04 + group_name: group-11 + count: 1 + /api/v2.1/org/{org_id}/admin/org-logo/: post: tags: diff --git a/openapi_input/user_account_operations.yaml b/openapi_input/user_account_operations.yaml index 718e446b..4134ae4c 100644 --- a/openapi_input/user_account_operations.yaml +++ b/openapi_input/user_account_operations.yaml @@ -3,7 +3,7 @@ info: title: Account Operations - User description: >- The official SeaTable API Reference (OpenAPI 3.0). - version: "6.0" + version: "6.1" servers: - url: "https://{server}" variables: @@ -132,6 +132,7 @@ components: example: 5c264e76-0e5a-448a-9f34-580b551364ca dtable_name_query: name: dtable_name + description: The name of the base to search for. in: query schema: type: string @@ -139,6 +140,7 @@ components: example: Example page: name: page + description: Page number of results to return. Default is 1. in: query schema: type: integer @@ -146,6 +148,7 @@ components: example: 1 per_page: name: per_page + description: Number of results per page. in: query schema: type: integer @@ -153,6 +156,7 @@ components: example: 2 tz: name: to_tz + description: Timezone offset for date/time conversion. in: query schema: type: string @@ -166,15 +170,17 @@ components: description: >- `true` or `false`, optional, `true` by default. When `false`, only the ID, name and type of each workspace is listed. - example: "false" + example: false parent_dir: name: parent_dir + description: The parent directory path. in: query schema: type: string example: / path: name: path + description: The file path relative to the asset directory. in: query schema: type: string @@ -192,6 +198,7 @@ components: example: "3" account_name: name: account_name + description: The name of the third-party email account. in: query schema: type: string @@ -204,7 +211,7 @@ components: description: >- The ID of the task, returned when you **Send An Email via 3rd Party Email Account**. - example: "1616585864320" + example: 1616585864320 base_password: name: password in: query @@ -219,6 +226,7 @@ components: description: Whether return the list of datasets by groups when dtable_uuid is not given, default false, optional op_date: name: op_date + description: Filter by operation date. in: query schema: type: string @@ -234,6 +242,7 @@ components: description: "Search string. Substrings are allowed and capitalization does not matter." query_type: name: query_type + description: Filter the search by type. Use `base` to search only bases or `app` to search only apps. in: query schema: type: string @@ -243,12 +252,13 @@ components: in: query schema: type: boolean - example: "false" + example: false description: Set this to `true` to export the base without assets. Default is `false`. #=======================Path parameters=======================# user_id: name: user_id + description: The unique user ID in the format `xxx@auth.local`. in: path schema: type: string @@ -283,12 +293,14 @@ components: example: 5c264e76-0e5a-448a-9f34-580b551364ca folder_id: name: folder_id + description: The ID of the folder. in: path schema: type: string required: true commit_id: name: commit_id + description: The commit ID for a base snapshot. in: path schema: type: string @@ -297,6 +309,7 @@ components: example: 7ee107a4eadb9561e8ce7699494939015f0d101b external_link_token: name: external_link_token + description: The token of the external link. in: path schema: type: string @@ -304,6 +317,7 @@ components: example: f84903f9aa454a2481f3 form_token: name: form_token + description: The token of the form. in: path schema: type: string @@ -312,6 +326,7 @@ components: example: 12345678-d378-4c12-8d7a-6da0fb48ee83 collection_token: name: collection_token + description: The token of the collection table. in: path schema: type: string @@ -338,6 +353,7 @@ components: example: "1" 3rd_party_account_id: name: 3rd_party_account_id + description: The ID of the third-party account. in: path schema: type: string @@ -345,6 +361,7 @@ components: example: "5" group_id: name: group_id + description: The ID of the group. in: path schema: type: integer @@ -353,14 +370,16 @@ components: example: 1 group_member: name: group_member + description: The unique user ID of the group member. in: path schema: type: string pattern: "^[a-f0-9]{32}(@auth.local)$" required: true - example: 12345678-d378-4c12-8d7a-6da0fb48ee83 + example: 12345678d3784c128d7a6da0fb48ee83@auth.local webhook_id: name: webhook_id + description: The ID of the webhook. in: path schema: type: integer @@ -369,6 +388,7 @@ components: example: 1 notification_rule_id: name: notification_rule_id + description: The ID of the notification rule. in: path schema: type: string @@ -386,6 +406,7 @@ components: example: 7 app_token: name: app_token + description: The token of the universal app. in: path schema: type: string @@ -394,6 +415,7 @@ components: example: 8254d58e-6a67-45ab-be37-87939d80e99f group_view_share_id: name: group_view_share_id + description: The ID of the group view share. in: path schema: type: integer @@ -402,6 +424,7 @@ components: example: 6 user_view_share_id: name: user_view_share_id + description: The ID of the user view share. in: path schema: type: integer @@ -410,14 +433,15 @@ components: example: 15 view_external_link_token: name: view_external_link_token + description: The token of the view external link. in: path schema: type: string - pattern: "^[0-9a-f]{20}$" required: true example: f234baec8ce44028978a invite_link_token: name: invite_link_token + description: The token of the invite link. in: path schema: type: string @@ -446,6 +470,7 @@ components: example: 10 automation_rule_id: name: automation_rule_id + description: The ID of the automation rule. in: path schema: type: integer @@ -517,13 +542,13 @@ components: dtable_uuid: type: string description: The UUID of the base. - example: 650d8a0d-7e27-46a8-8b18-6cc6f3dbvh46 + example: 650d8a0d-7e27-46a8-8b18-6cc6f3db2046 required: - dtable_uuid dst_dtable_uuid: type: string description: The UUID of the destination base. - example: 650d8a0d-7e27-46a8-8b18-6cc6f3dbvh46 + example: 650d8a0d-7e27-46a8-8b18-6cc6f3db2046 dst_table_id: type: string example: pzoO @@ -550,12 +575,12 @@ components: type: array items: type: integer - example: "52" + example: 52 user_id_list: type: array items: type: string - example: "123abc456def789ghi123jkl456mno789@auth.local" + example: "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6@auth.local" account_name: type: string example: "Email Server2" @@ -605,7 +630,7 @@ components: type: array items: type: string - example: c7fh3rda6569491ba42905bf1647fd3f@auth.local + example: b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7@auth.local is_admin: type: string enum: ["", "true", "false"] @@ -2104,7 +2129,7 @@ components: item_id: type: string description: When moving a base, use its `UUID`. Required. - example: "650d8a0d-7e27-46a8-8b18-6cc6f3dbvh46" + example: "650d8a0d-7e27-46a8-8b18-6cc6f3db2046" from: type: string description: >- @@ -2118,7 +2143,7 @@ components: src_workspace_id: type: integer description: Source workspace's ID. - example: "1" + example: 1 base_name: type: string description: Name of the base. @@ -2126,7 +2151,7 @@ components: dst_workspace_id: type: integer description: Destination workspace's ID. - example: "80" + example: 80 is_copy_dataset_syncs: type: boolean description: Select whether common datasets should be synchronous too. False by default. @@ -2171,7 +2196,7 @@ components: user_account_email: type: string description: The user ID ending with @auth.local - example: 123abc456def789ghi123jkl456mno789@auth.local + example: a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6@auth.local table_id: type: string example: "0000" @@ -2181,7 +2206,7 @@ components: expire_days: type: integer description: Add expiration period in days. Optional. - example: "30" + example: 30 token: type: string description: >- @@ -2189,7 +2214,7 @@ components: it'll appear as "https://cloud.seatable.io/dtable/view-external-links/custom/example/". If not given, SeaTable will give a random token to the link. - example: fleischkaesebroetchen + example: my-custom-link dataset_name: type: string description: The name of the common dataset. @@ -2289,6 +2314,45 @@ paths: application/json: schema: type: object + properties: + org_id: + type: integer + is_org_staff: + type: integer + space_usage: + type: string + total: + type: integer + usage: + type: integer + row_usage_rate: + type: string + row_total: + type: integer + row_usage: + type: integer + avatar_url: + type: string + email: + type: string + name: + type: string + login_id: + type: string + contact_email: + type: string + institution: + type: string + is_staff: + type: boolean + enable_chargebee: + type: boolean + enable_subscription: + type: boolean + dtable_updates_email_interval: + type: integer + dtable_collaborate_email_interval: + type: integer example: org_id: 4 is_org_staff: 0 @@ -2299,7 +2363,7 @@ paths: row_total: -1 row_usage: 88 avatar_url: https://cloud.seatable.io/media/avatars/default.png - email: 7fhe63g949b946a3b200555db5de1d23@auth.local + email: 7f0e63a949b946a3b200555db5de1d23@auth.local name: Robert Teamplayer login_id: "" contact_email: teamplayer@example.com @@ -2309,6 +2373,22 @@ paths: enable_subscription: false dtable_updates_email_interval: 0 dtable_collaborate_email_interval: 0 + "401": + description: Unauthorized — invalid token + content: + application/json: + schema: + type: object + example: + detail: Invalid token + "403": + description: Forbidden — no token provided + content: + application/json: + schema: + type: object + example: + detail: Authentication credentials were not provided. /api/v2.1/user/contact-email/: put: tags: @@ -2389,6 +2469,15 @@ paths: application/json: schema: type: object + properties: + email: + type: string + name: + type: string + avatar_url: + type: string + contact_email: + type: string example: email: 123456786569491ba42905bf1647fd3f@auth.local name: Jasmin Tee @@ -2421,10 +2510,10 @@ paths: type: object example: user_list: - - email: 244b43hr6fy54bb4afa2c2cb7369d244@auth.local + - email: 244b430060f54bb4afa2c2cb7369d244@auth.local name: Ginger Ale avatar_url: https://cloud.seatable.io/media/avatars/default.png - - email: 8cb2a6da656876hgf42905bf1647fd3f@auth.local + - email: 8cb2a6da65687600f42905bf1647fd3f@auth.local name: Jasmin Tee avatar_url: https://cloud.seatable.io/media/avatars/default.png @@ -2444,6 +2533,7 @@ paths: parameters: - name: q in: query + description: Search query string. Matches against email, name, or contact email. schema: type: string example: Micha @@ -2541,7 +2631,7 @@ paths: /api/v2.1/dtable/items-search/: get: tags: [Bases] - summary: Search base or apps + summary: Search Base or Apps operationId: searchBaseOrApps description: Search the base or apps of a user. Capitalization is irrelevant for the search and substrings are also allowed. security: @@ -2557,7 +2647,7 @@ paths: schema: type: object example: - result: + results: - id: 514 workspace_id: 3 uuid: f5a8bbe1-2a2e-44a4-b993-4b599fd5e837 @@ -3140,7 +3230,7 @@ paths: type: integer required: true description: The ID of the trashed base. - example: "497" + example: 497 responses: "200": description: OK @@ -3242,6 +3332,7 @@ paths: tags: [Groups & Workspaces] summary: Create Group operationId: createGroup + description: Create a new group. The user who creates the group becomes its owner. security: - AccountTokenAuth: [] requestBody: @@ -3267,6 +3358,7 @@ paths: tags: [Groups & Workspaces] summary: Get Group operationId: getGroup + description: Get the details of a specific group including its name, owner, and admins. security: - AccountTokenAuth: [] parameters: @@ -3302,7 +3394,7 @@ paths: "User xxx is already group owner". * `name` is the new name of your group. If you don't want to - change the name, remove shi parameter because if you enter the current + change the name, remove this parameter because if you enter the current group name here you'll get an error "There is already a group with that name". requestBody: @@ -3326,11 +3418,28 @@ paths: application/json: schema: type: object + properties: + id: + type: integer + parent_group_id: + type: integer + name: + type: string + owner: + type: string + created_at: + type: string + avatar_url: + type: string + admins: + type: array + items: + type: string example: id: 1 parent_group_id: 0 name: Group New - owner: 123abc456def789ghi123jkl456mno789@auth.local + owner: a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6@auth.local created_at: "2020-11-19T08:14:52+00:00" avatar_url: "http://cloud.seatable.io/media/avatars/groups/default.png" admins: @@ -3339,7 +3448,13 @@ paths: tags: [Groups & Workspaces] summary: Delete Group operationId: deleteGroup - description: Delete a group with its ID. + description: >- + Delete a group with its ID. + + + > 🚧 Group must be empty + > + > A group can only be deleted if it contains no bases. Delete or move all bases out of the group first, otherwise the API returns `400` with `"Cannot delete group with bases"`. security: - AccountTokenAuth: [] parameters: @@ -3366,6 +3481,7 @@ paths: parameters: - name: q in: query + description: Search query string. Matches against group name. schema: type: string example: Micha @@ -3375,7 +3491,19 @@ paths: content: application/json: schema: - type: object + type: array + items: + type: object + properties: + id: + type: integer + name: + type: string + owner: + type: string + created_at: + type: string + format: date-time example: - id: 92 name: Production @@ -3387,6 +3515,7 @@ paths: tags: [Groups & Workspaces] summary: Get Group Members operationId: getGroupMembers + description: List all members of a group along with their roles. security: - AccountTokenAuth: [] parameters: @@ -3397,10 +3526,25 @@ paths: content: application/json: schema: - type: object + type: array + items: + type: object + properties: + name: + type: string + email: + type: string + contact_email: + type: string + is_admin: + type: integer + role: + type: string + group_id: + type: integer example: - name: Production - email: 123abc456def789ghi123jkl456mno789@auth.local + email: a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6@auth.local contact_email: hans@example.com is_admin: 1 role: owner @@ -3409,6 +3553,7 @@ paths: tags: [Groups & Workspaces] summary: Add Group Member operationId: addGroupMember + description: Add a user to a group as a member. security: - AccountTokenAuth: [] parameters: @@ -3422,16 +3567,31 @@ paths: email: $ref: "#/components/schemas/user_id" responses: - "200": - description: OK + "201": + description: Created content: application/json: schema: type: object + properties: + group_id: + type: integer + name: + type: string + email: + type: string + contact_email: + type: string + login_id: + type: string + is_admin: + type: boolean + role: + type: string example: group_id: 1 name: Production - email: 123abc456def789ghi123jkl456mno789@auth.local + email: a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6@auth.local contact_email: "hans@example.com" login_id: "" is_admin: false @@ -3441,6 +3601,7 @@ paths: tags: [Groups & Workspaces] summary: Update Group Role operationId: updateGroupRole + description: Update the role of a group member, for example to promote or demote an admin. security: - AccountTokenAuth: [] parameters: @@ -3456,7 +3617,7 @@ paths: $ref: "#/components/schemas/is_admin" responses: "200": - description: Ok + description: OK content: application/json: schema: @@ -3476,7 +3637,7 @@ paths: - $ref: "#/components/parameters/group_member" responses: "200": - description: Ok + description: OK content: application/json: schema: @@ -3496,7 +3657,7 @@ paths: Just give a search keyword in the `q` param. Attention: Although a - fussy search is allowed, unlike the web interface, the search via API + fuzzy search is allowed, unlike the web interface, the search via API is still case sensitive! A successful search will return each member's details that fit to your @@ -3506,6 +3667,7 @@ paths: parameters: - name: q in: query + description: Search query string. Matches against member name or email. schema: type: string example: Micha @@ -3784,9 +3946,9 @@ paths: - id: 424 workspace_id: 204 uuid: 8d29d6fc-1f00-46af-98df-4007b3635e1c - name: 1. Templates-Übersicht - creator: Jasmin Tee - modifier: Jasmin Tee + name: 1. Templates Overview + creator: Jane Doe + modifier: Jane Doe created_at: "2021-01-08T15:09:03+00:00" updated_at: "2021-01-21T16:06:26+00:00" color: null @@ -3911,6 +4073,15 @@ paths: application/json: schema: type: object + properties: + upload_link: + type: string + parent_path: + type: string + img_relative_path: + type: string + file_relative_path: + type: string example: upload_link: >- https://cloud.seatable.io/seafhttp/upload-api/5d2b06ba-ec8d-4efb-a62e-3ae6ac84a67c @@ -4247,7 +4418,7 @@ paths: post: tags: - Import & Export - summary: Update from xlsx or csv + summary: Update from XLSX or CSV description: | This API call allows you to update a SeaTable database table by uploading an Excel (xlsx) or CSV file. The uploaded file contains rows with data that should be either matched against existing rows in the table for updates or inserted as new rows if no match is found. Matching is performed based on the columns specified in the `selected_columns` parameter. For each row in the uploaded file, the system checks whether there are existing rows where the values in these selected columns match exactly. If a match is found, the existing row is updated with the new data from the file. If no match exists, the row is added as a new entry. @@ -4296,6 +4467,7 @@ paths: - Import & Export summary: Export Base operationId: exportBase + description: Export a base as a .dtable file. Optionally exclude assets or provide a base password for encrypted bases. security: - AccountTokenAuth: [] parameters: @@ -4305,7 +4477,7 @@ paths: - $ref: "#/components/parameters/ignore_asset" responses: "200": - description: Successful response + description: OK content: # TODO: Actually "application/x-zip-compressed", but dtable-web does not accept this when specified inside an "Accept" header application/json: {} @@ -4315,6 +4487,7 @@ paths: - Import & Export summary: Export Table operationId: exportTable + description: Export a single table from a base to an Excel file. security: - AccountTokenAuth: [] parameters: @@ -4324,7 +4497,7 @@ paths: - $ref: "#/components/parameters/workspace_id" responses: "200": - description: Successful response + description: OK content: # TODO: Actually "application/ms-excel", but dtable-web does not accept this when specified inside an "Accept" header application/json: {} @@ -4334,6 +4507,7 @@ paths: - Import & Export summary: Export View operationId: exportView + description: Export a specific view of a table from a base to an Excel file. security: - AccountTokenAuth: [] parameters: @@ -4345,7 +4519,7 @@ paths: - $ref: "#/components/parameters/workspace_id" responses: "200": - description: Successful response + description: OK content: # TODO: Actually "application/ms-excel", but dtable-web does not accept this when specified inside an "Accept" header application/json: {} @@ -4362,7 +4536,7 @@ paths: - $ref: "#/components/parameters/external_link_token" responses: "200": - description: Successful response + description: OK content: # TODO: Actually "application/x-zip-compressed", but dtable-web does not accept this when specified inside an "Accept" header application/json: {} @@ -4374,7 +4548,7 @@ paths: summary: Export Big Data View to Excel operationId: exportBigDataView description: >- - Hier muss noch eine Beschreibung ergänzt werden + Exports a big data view as an Excel file. Returns a task ID that can be used to track the export progress. security: - AccountTokenAuth: [] parameters: @@ -4384,7 +4558,7 @@ paths: - $ref: "#/components/parameters/view_id" responses: "200": - description: Successful response + description: OK content: application/json: example: { "task_id": "1680694429195" } @@ -4395,7 +4569,7 @@ paths: - Import & Export summary: Append Excel CSV operationId: appendToTableFromFile - description: Hier muss noch eine Beschreibung ergänzt werden. + description: Appends rows from an uploaded Excel or CSV file to an existing table. requestBody: content: multipart/form-data: @@ -4465,7 +4639,7 @@ paths: description: >- List all the users sharing a base (except the current user). This request only lists off all the individual users sharing the base, which - does not includ groups and group members sharing this base. + does not include groups and group members sharing this base. To see which groups are sharing this base, use the request [List Groups Base is Shared To](/reference/listgroupshares). @@ -4483,7 +4657,7 @@ paths: type: object example: user_list: - - email: oe3jr7v949b946a3b200555db5de1d23@auth.local + - email: 0e30070949b946a3b200555db5de1d23@auth.local name: Robert Teamplayer contact_email: teamplayer@example.com avatar_url: https://cloud.seatable.io/media/avatars/default.png @@ -4556,6 +4730,16 @@ paths: summary: Delete User Share operationId: deleteUserShare description: Stop sharing a base to a user. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + required: + - email + properties: + email: + $ref: "#/components/schemas/user_account_email" security: - AccountTokenAuth: [] parameters: @@ -4624,7 +4808,7 @@ paths: "165": - id: 355 workspace_id: 377 - uuid: 03d8b71c-84c7-4a16-b314-94c886dc170p + uuid: 03d8b71c-84c7-4a16-b314-94c886dc170a name: Surveys creator: Robert Teamplayer modifier: Robert Teamplayer @@ -4873,15 +5057,34 @@ paths: - $ref: "#/components/parameters/base_name" responses: "200": - description: "ok" + description: OK content: application/json: schema: type: object + properties: + id: + type: integer + dtable_name: + type: string + from_user: + type: string + from_user_name: + type: string + to_group_id: + type: string + to_group_name: + type: string + permission: + type: string + table_id: + type: string + view_id: + type: string example: id: 0 dtable_name: Example - from_user: 123abc456def789ghi123jkl456mno789@auth.local + from_user: a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6@auth.local from_user_name: John Doe to_group_id: "1" to_group_name: Group One @@ -4938,10 +5141,29 @@ paths: application/json: schema: type: object + properties: + id: + type: integer + dtable_name: + type: string + from_user: + type: string + from_user_name: + type: string + to_group_id: + type: string + to_group_name: + type: string + permission: + type: string + table_id: + type: string + view_id: + type: string example: id: 0 dtable_name: Example - from_user: 123abc456def789ghi123jkl456mno789@auth.local + from_user: a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6@auth.local from_user_name: John Doe to_group_id: "1" to_group_name: Group One @@ -5083,6 +5305,27 @@ paths: application/json: schema: type: object + properties: + id: + type: integer + dtable_name: + type: string + from_user: + type: string + from_user_name: + type: string + to_user: + type: string + to_user_name: + type: string + permission: + type: string + table_id: + type: string + view_id: + type: string + shared_name: + type: string example: id: 15 dtable_name: Example @@ -5146,6 +5389,27 @@ paths: application/json: schema: type: object + properties: + id: + type: integer + dtable_name: + type: string + from_user: + type: string + from_user_name: + type: string + to_user: + type: string + to_user_name: + type: string + permission: + type: string + table_id: + type: string + view_id: + type: string + shared_name: + type: string example: id: 15 dtable_name: Example @@ -5226,10 +5490,10 @@ paths: type: object example: user_list: - - email: 244b43hr6fy54bb4afa2c2cb7369d244@auth.local + - email: 244b430060f54bb4afa2c2cb7369d244@auth.local name: Ginger Ale avatar_url: https://cloud.seatable.io/media/avatars/default.png - - email: 8cb2a6da656876hgf42905bf1647fd3f@auth.local + - email: 8cb2a6da65687600f42905bf1647fd3f@auth.local name: Jasmin Tee avatar_url: https://cloud.seatable.io/media/avatars/default.png @@ -5240,6 +5504,7 @@ paths: - Sharing Links summary: List Base External Links operationId: listBaseExternalLinks + description: List all external links that have been created for a specific base. security: - AccountTokenAuth: [] parameters: @@ -5298,6 +5563,19 @@ paths: application/json: schema: type: object + properties: + url: + type: string + token: + type: string + is_custom: + type: boolean + permission: + type: string + is_expired: + type: boolean + expire_date: + type: string example: url: >- https://cloud.seatable.io/dtable/external-links/custom/fleischkaesebroetchen/ @@ -5401,6 +5679,33 @@ paths: application/json: schema: type: object + properties: + id: + type: integer + from_dtable: + type: string + creator: + type: string + creator_name: + type: string + token: + type: string + permission: + type: string + create_at: + type: string + view_cnt: + type: integer + table_id: + type: string + view_id: + type: string + url: + type: string + is_custom: + type: boolean + expire_date: + type: string example: id: 14 from_dtable: Example @@ -5486,11 +5791,30 @@ paths: application/json: schema: type: object + properties: + username: + type: string + permission: + type: string + token: + type: string + link: + type: string + dtable: + type: string + dtable_id: + type: integer + workspace_id: + type: integer + expire_date: + type: string + ctime: + type: string example: username: 876543216569491ba42905bf1647fd3f@auth.local permission: rw token: 65432148a9074901923d - link: https://cloud.seatable.io/dtable/links/65432148a9074901923d + link: https://cloud.seatable.io/dtable/links/65432148a9074901923d/ dtable: Example dtable_id: 562 workspace_id: 2 @@ -5568,6 +5892,25 @@ paths: application/json: schema: type: object + properties: + id: + type: integer + org_id: + type: integer + group_id: + type: integer + dtable_uuid: + type: string + table_id: + type: string + view_id: + type: string + created_at: + type: string + creator: + type: string + dataset_name: + type: string example: id: 9 org_id: 1 @@ -5627,7 +5970,7 @@ paths: type: object properties: dst_dtable_uuid: - $ref: "#/components/schemas/dtable_name" + $ref: "#/components/schemas/dtable_uuid" security: - AccountTokenAuth: [] parameters: @@ -5687,6 +6030,19 @@ paths: application/json: schema: type: object + properties: + rows: + type: array + items: + type: object + columns: + type: array + items: + type: object + related_user_list: + type: array + items: + type: object example: rows: - _id: Sn7svBUYTTmup7WuMsJhGw @@ -5829,7 +6185,7 @@ paths: - $ref: "#/components/parameters/dataset_id" responses: "200": - description: Successful response + description: OK content: application/json: schema: @@ -6713,6 +7069,29 @@ paths: application/json: schema: type: object + properties: + id: + type: integer + dtable_uuid: + type: string + run_condition: + type: string + trigger: + type: object + actions: + type: array + items: + type: object + creator: + type: string + ctime: + type: string + last_trigger_time: + type: string + is_valid: + type: boolean + trigger_count: + type: integer example: id: 12 dtable_uuid: a275d870-fd55-48e4-8c4a-5fd6f2549765 @@ -6728,7 +7107,7 @@ paths: actions: - type: notify users: - - 123456a6569491ba42905bf1647fd3f@auth.local + - 1234560a6569491ba42905bf1647fd3f@auth.local default_msg: Take a look at this! _id: "365729" users_column_key: "" @@ -6772,6 +7151,29 @@ paths: application/json: schema: type: object + properties: + id: + type: integer + dtable_uuid: + type: string + run_condition: + type: string + trigger: + type: object + actions: + type: array + items: + type: object + creator: + type: string + ctime: + type: string + last_trigger_time: + type: string + is_valid: + type: boolean + trigger_count: + type: integer example: id: 20 dtable_uuid: a275d870-fd55-48e4-8c4a-5fd6f2549765 @@ -6832,7 +7234,7 @@ paths: - $ref: "#/components/parameters/base_uuid" responses: "200": - description: Successful response indicating that the dtable was repaired. + description: OK indicating that the dtable was repaired. content: application/json: schema: @@ -6841,6 +7243,8 @@ paths: success: type: boolean example: true + example: + success: true # Notifications /api/v2.1/workspace/{workspace_id}/dtable/{base_name}/notification-rules/: @@ -7005,6 +7409,21 @@ paths: application/json: schema: type: object + properties: + id: + type: integer + run_condition: + type: string + trigger: + type: object + action: + type: object + creator: + type: string + ctime: + type: string + last_trigger_time: + type: string example: id: 24 run_condition: per_update @@ -7064,6 +7483,21 @@ paths: application/json: schema: type: object + properties: + id: + type: integer + run_condition: + type: string + trigger: + type: object + action: + type: object + creator: + type: string + ctime: + type: string + last_trigger_time: + type: string example: id: 19 run_condition: per_day @@ -7344,8 +7778,8 @@ paths: - $ref: "#/components/parameters/account_name" - $ref: "#/components/parameters/base_uuid" responses: - "400": - description: Bad Request + "200": + description: OK content: application/json: schema: @@ -7496,7 +7930,7 @@ paths: webhook: id: 1 dtable_uuid: 12345678-7e27-46a8-8b18-6cc6f3db2057 - url: https://www.seatable.io + url: https://seatable.com creator: 123456786569491ba42905bf1647fd3f@auth.local created_at: "2021-03-16T14:27:58.873621" settings: @@ -7621,7 +8055,7 @@ paths: - Snapshots summary: List Big Data Backups operationId: listBigDataBackups - description: List all all available big data backups. + description: List all available big data backups. security: - AccountTokenAuth: [] parameters: @@ -7667,7 +8101,7 @@ paths: - Apps summary: List Apps operationId: listApps - description: Hier muss noch eine Beschreibung ergänzt werden + description: Lists all universal apps that you manage or have access to. security: - AccountTokenAuth: [] responses: @@ -7686,7 +8120,7 @@ paths: "app_id": 20, "app_name": "test", "app_token": "5863cf72-a3fa-488a-84cd-d02d2c578660", - "app_config": '{"app_type": "universal-app", "app_name": "test", "settings": {"pages": [{"id": "XtTu", "name": "test", "type": "custom_page", "icon": "app-gallery", "content_url": "https://stage.seatable.io/workspace/3/asset/2d0d0c32-5e79-4437-a414-766ade7618a5/external-apps/XtTu/XtTu.json", "trigger_workflow_option": {"can_trigger_workflow": false}}], "navigation": [{"id": "XtTu", "type": "page"}]}, "use_custom_icon": false, "icon_class_name": "customer-contract-management", "app_icon": "", "app_theme_mode": "dark", "icon_color_index": 0, "app_theme_color": "#FF8000"}', + "app_config": '{"app_type": "universal-app", "app_name": "test", "settings": {"pages": [{"id": "XtTu", "name": "test", "type": "custom_page", "icon": "app-gallery", "content_url": "https://cloud.seatable.io/workspace/3/asset/2d0d0c32-5e79-4437-a414-766ade7618a5/external-apps/XtTu/XtTu.json", "trigger_workflow_option": {"can_trigger_workflow": false}}], "navigation": [{"id": "XtTu", "type": "page"}]}, "use_custom_icon": false, "icon_class_name": "customer-contract-management", "app_icon": "", "app_theme_mode": "dark", "icon_color_index": 0, "app_theme_color": "#FF8000"}', "role_name": "admin", "permission": "rw", "dtable_uuid": "2d0d0c325e794437a414766ade7618a5", @@ -7701,7 +8135,7 @@ paths: "app_id": 23, "app_name": "app", "app_token": "00252a1e-6b47-4df6-bfe7-c69eb8a9f905", - "app_config": '{"app_type": "universal-app", "app_name": "app", "settings": {"pages": [{"id": "IpvJ", "name": "test", "type": "custom_page", "icon": "app-form", "content_url": "https://stage.seatable.io/workspace/3/asset/a81922f3-ead6-4904-942e-4617402b8006/external-apps/IpvJ/IpvJ.json", "trigger_workflow_option": {"can_trigger_workflow": false}}], "navigation": [{"id": "IpvJ", "type": "page"}]}, "use_custom_icon": false, "icon_class_name": "customer-contract-management", "app_icon": "", "app_theme_mode": "dark", "icon_color_index": 0, "app_theme_color": "#FF8000"}', + "app_config": '{"app_type": "universal-app", "app_name": "app", "settings": {"pages": [{"id": "IpvJ", "name": "test", "type": "custom_page", "icon": "app-form", "content_url": "https://cloud.seatable.io/workspace/3/asset/a81922f3-ead6-4904-942e-4617402b8006/external-apps/IpvJ/IpvJ.json", "trigger_workflow_option": {"can_trigger_workflow": false}}], "navigation": [{"id": "IpvJ", "type": "page"}]}, "use_custom_icon": false, "icon_class_name": "customer-contract-management", "app_icon": "", "app_theme_mode": "dark", "icon_color_index": 0, "app_theme_color": "#FF8000"}', "role_name": "admin", "permission": "rw", "dtable_uuid": "f80260f70ad246aca54ffa1a17bc9db6", @@ -7736,7 +8170,7 @@ paths: - Apps summary: Import Users to App operationId: importUsersToApp - description: Hier muss noch eine Beschreibung ergänzt werden + description: Imports multiple users to a universal app in a single batch operation. security: - AccountTokenAuth: [] parameters: @@ -7765,11 +8199,11 @@ paths: "created_at": "2022-08-05T16:58:33+08:00", "is_active": true, "name": "org_guest", - "app_name": "\u901a\u7528\u5e94\u7528-a", + "app_name": "My App", "role_id": 21, "role_name": "default", "role_permission": "rw", - "avatar_url": "http://127.0.0.1:8000/media/avatars/default.png", + "avatar_url": "https://cloud.seatable.io/media/avatars/default.png", }, ] @@ -7779,7 +8213,7 @@ paths: - Apps summary: List Universal App Users operationId: listUniversalAppUsers - description: Hier muss noch eine Beschreibung ergänzt werden + description: Lists all users of a specific universal app. security: - AccountTokenAuth: [] parameters: @@ -7815,7 +8249,7 @@ paths: - Apps summary: List App Invite Links operationId: listAppInviteLinks - description: Hier muss noch eine Beschreibung ergänzt werden + description: Lists all invite links for a specific universal app. security: - AccountTokenAuth: [] parameters: @@ -7832,7 +8266,7 @@ paths: { "username": "145504ae043c438cbb55f2afb084d586@auth.local", "token": "a3ec5042d7ae47f18c2e", - "link": "https://cloud.seatable.io/dtable/universal-app/links/a3ec5042d7ae47f18c2e", + "link": "https://cloud.seatable.io/dtable/universal-app/links/a3ec5042d7ae47f18c2e/", "app_name": "Dgdfh", "app_id": 72, "expire_date": "", @@ -7880,7 +8314,7 @@ paths: "settings": { "pages": ["..."] }, }, "created_at": "2023-04-02T21:23:21+00:00", - "external_app_url": "https://cloud.seatable.io/dtable/universal-app/links/a3ec5042d7ae47f18c2e", + "external_app_url": "https://cloud.seatable.io/dtable/universal-app/links/a3ec5042d7ae47f18c2e/", "visit_times": 3, "creator": "Hulk", "can_anonymous_access": false, @@ -7953,8 +8387,8 @@ paths: row_id: TMtyvDMNROq-dOJJqaqq9w op_type: modify_row author_email: "2d67c225c64f4305ada3e5820ce6d660@auth.local" - author_name: "Hans Müller" - author_contact_email: "hans@seatable.io" + author_name: "John Smith" + author_contact_email: "john@example.com" op_time: "2023-06-29T15:21:19+02:00" table_id: 0000 table_name: SeaTable API Docs @@ -7979,7 +8413,7 @@ paths: - $ref: "#/components/parameters/per_page" responses: "200": - description: Successful response with the queried big data operation logs. + description: OK with the queried big data operation logs. content: application/json: schema: @@ -8053,3 +8487,5 @@ paths: _id: "SQNJkddjSDGBdWBtdLZC6g" _last_modifier: "509fe338ed4f44099158d7143e4e4de3@auth.local" _mtime: "2024-08-19T11:53:13.103871879+08:00" + example: + operations: []