diff --git a/openapi/schemas/identity.openapi.json b/openapi/schemas/identity.openapi.json index 111c084c7..dfcb8dd06 100644 --- a/openapi/schemas/identity.openapi.json +++ b/openapi/schemas/identity.openapi.json @@ -948,20 +948,31 @@ } } }, - "/organizations/mine": { - "get": { + "/organizations/accept-invitation": { + "post": { "tags": [ "Organization" ], - "summary": "Returns the organization resolved from the calling customer's email domain.", - "description": "Responds with 404 when the caller's email domain does not match a registered organization.", + "summary": "Accepts the invitation identified by the token.", + "description": "Responds with 409 when the invitation is expired, already used, or was issued to a different\n email than the calling customer's.", + "requestBody": { + "description": "The invitation token.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptOrgInvitationEndpoint_Input" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetMyOrganizationEndpoint_Output" + "$ref": "#/components/schemas/AcceptOrgInvitationEndpoint_Output" } } } @@ -986,6 +997,52 @@ } }, "/organizations": { + "post": { + "tags": [ + "Organization" + ], + "summary": "Creates an organization and makes the calling customer its owner.", + "description": "The calling customer becomes both the owner and the billing customer. Responds with 400 when\n the slug is already taken.", + "requestBody": { + "description": "The organization to create.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateOrganizationEndpoint_Input" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateOrganizationEndpoint_Output" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthenticated" + }, + "403": { + "description": "Forbidden" + } + } + }, "get": { "tags": [ "Organization" @@ -1218,6 +1275,247 @@ } } }, + "/organizations/mine": { + "get": { + "tags": [ + "Organization" + ], + "summary": "Returns the organization resolved from the calling customer's email domain.", + "description": "Responds with 404 when the caller's email domain does not match a registered organization.", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetMyOrganizationEndpoint_Output" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthenticated" + }, + "403": { + "description": "Forbidden" + } + } + } + }, + "/organizations/{organizationId}": { + "get": { + "tags": [ + "Organization" + ], + "summary": "Returns the organization with the given id.", + "parameters": [ + { + "name": "organizationId", + "in": "path", + "description": "The id of the organization to retrieve.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetOrganizationEndpoint_Output" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthenticated" + }, + "403": { + "description": "Forbidden" + } + } + } + }, + "/organizations/{organizationId}/invitations": { + "post": { + "tags": [ + "Organization" + ], + "summary": "Creates an invitation to join the organization.", + "description": "Returns a single-use token the invitee presents to the accept-invitation endpoint.", + "parameters": [ + { + "name": "organizationId", + "in": "path", + "description": "The id of the organization to invite into.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "The invitee email and role.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InviteOrgMemberEndpoint_Input" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InviteOrgMemberEndpoint_Output" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthenticated" + }, + "403": { + "description": "Forbidden" + } + } + } + }, + "/organizations/{organizationId}/members": { + "get": { + "tags": [ + "Organization" + ], + "summary": "Returns the members of the given organization.", + "parameters": [ + { + "name": "organizationId", + "in": "path", + "description": "The id of the organization whose members to list.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListOrgMembersEndpoint_Output" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthenticated" + }, + "403": { + "description": "Forbidden" + } + } + } + }, + "/organizations/{organizationId}/members/{customerId}": { + "delete": { + "tags": [ + "Organization" + ], + "summary": "Removes the given customer's membership from the organization.", + "description": "Responds with 404 when the customer is not a member and 409 when removing the organization's\n last owner.", + "parameters": [ + { + "name": "organizationId", + "in": "path", + "description": "The id of the organization.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "customerId", + "in": "path", + "description": "The id of the customer to remove.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthenticated" + }, + "403": { + "description": "Forbidden" + } + } + } + }, "/organizations/{owner}/support-slack-channel": { "put": { "tags": [ @@ -1314,6 +1612,35 @@ }, "components": { "schemas": { + "AcceptOrgInvitationEndpoint_Input": { + "required": [ + "token" + ], + "type": "object", + "properties": { + "token": { + "type": "string", + "description": "The single-use invitation token." + } + } + }, + "AcceptOrgInvitationEndpoint_Output": { + "required": [ + "organizationId", + "membershipId" + ], + "type": "object", + "properties": { + "organizationId": { + "type": "string", + "description": "The organization the customer joined." + }, + "membershipId": { + "type": "string", + "description": "The id of the created membership." + } + } + }, "ClientModel": { "required": [ "client_id", @@ -1479,6 +1806,40 @@ } } }, + "CreateOrganizationEndpoint_Input": { + "required": [ + "name", + "slug" + ], + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The human-readable name of the organization." + }, + "slug": { + "type": "string", + "description": "A URL-safe unique identifier for the organization." + }, + "primaryDomain": { + "type": "string", + "description": "The primary email domain associated with the organization, if any.", + "nullable": true + } + } + }, + "CreateOrganizationEndpoint_Output": { + "required": [ + "organizationId" + ], + "type": "object", + "properties": { + "organizationId": { + "type": "string", + "description": "The id of the created organization." + } + } + }, "DynamicClientRegistrationRequest": { "type": "object", "properties": { @@ -1577,6 +1938,40 @@ } } }, + "GetOrganizationEndpoint_Output": { + "required": [ + "id", + "name", + "slug", + "billingCustomerId", + "primaryDomain" + ], + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The id of the organization." + }, + "name": { + "type": "string", + "description": "The human-readable name of the organization." + }, + "slug": { + "type": "string", + "description": "The URL-safe unique identifier of the organization." + }, + "billingCustomerId": { + "type": "string", + "description": "The customer that owns billing for the organization.", + "format": "uuid" + }, + "primaryDomain": { + "type": "string", + "description": "The primary email domain associated with the organization, if any.", + "nullable": true + } + } + }, "GoogleOneTapLoginEndpoint_Input": { "required": [ "idToken" @@ -1606,6 +2001,50 @@ } } }, + "InviteOrgMemberEndpoint_Input": { + "required": [ + "email", + "role" + ], + "type": "object", + "properties": { + "email": { + "type": "string", + "description": "The email address to invite." + }, + "role": { + "allOf": [ + { + "$ref": "#/components/schemas/OrgRole" + } + ], + "description": "The org-scoped role the resulting membership will confer." + } + } + }, + "InviteOrgMemberEndpoint_Output": { + "required": [ + "invitationId", + "token", + "expiresAt" + ], + "type": "object", + "properties": { + "invitationId": { + "type": "string", + "description": "The id of the created invitation." + }, + "token": { + "type": "string", + "description": "The single-use token used to accept the invitation." + }, + "expiresAt": { + "type": "string", + "description": "The instant after which the invitation can no longer be accepted.", + "format": "date-time" + } + } + }, "JsonWebKey": { "type": "object", "properties": { @@ -1728,6 +2167,64 @@ } } }, + "ListOrgMembersEndpoint_Output": { + "required": [ + "members" + ], + "type": "object", + "properties": { + "members": { + "allOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/ListOrgMembersEndpoint_Output_Member" + } + } + ], + "description": "The members of the organization." + } + } + }, + "ListOrgMembersEndpoint_Output_Member": { + "required": [ + "customerId", + "email", + "role", + "status" + ], + "type": "object", + "properties": { + "customerId": { + "type": "string", + "format": "uuid" + }, + "email": { + "type": "string", + "nullable": true + }, + "role": { + "$ref": "#/components/schemas/OrgRole" + }, + "status": { + "$ref": "#/components/schemas/MembershipStatus" + } + } + }, + "MembershipStatus": { + "enum": [ + "Active", + "Suspended" + ] + }, + "OrgRole": { + "enum": [ + "Owner", + "Admin", + "Editor", + "Viewer" + ] + }, "QueryClientsEndpoint_Output": { "required": [ "clientId", diff --git a/openapi/schemas/leaderboard.openapi.json b/openapi/schemas/leaderboard.openapi.json index 3872d0af1..297865f9a 100644 --- a/openapi/schemas/leaderboard.openapi.json +++ b/openapi/schemas/leaderboard.openapi.json @@ -6451,118 +6451,6 @@ "deprecated": true } }, - "/leaderboard/{leaderboardId}/participant/{participantId}": { - "get": { - "tags": [ - "Leaderboard" - ], - "summary": "Gets a participant by its id.", - "parameters": [ - { - "name": "leaderboardId", - "in": "path", - "description": "The id of the leaderboard the participant belongs to.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "participantId", - "in": "path", - "description": "The id of the participant to retrieve.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetParticipantByIdObsoleteEndpoint_Output" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ValidationProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthenticated" - }, - "403": { - "description": "Forbidden" - } - } - } - }, - "/benchmark/standing/{leaderboardId}/{participantId}": { - "get": { - "tags": [ - "Leaderboard" - ], - "summary": "Gets a standing by leaderboard id and participant id.", - "parameters": [ - { - "name": "leaderboardId", - "in": "path", - "description": "The id of the leaderboard the standing belongs to.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "participantId", - "in": "path", - "description": "The id of the participant whose standing should be retrieved.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetStandingByIdEndpoint_Output" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ValidationProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthenticated" - }, - "403": { - "description": "Forbidden" - } - } - } - }, "/leaderboard/combined-matrix/query": { "get": { "tags": [ @@ -12752,42 +12640,6 @@ } } }, - "GetParticipantByIdObsoleteEndpoint_Output": { - "required": [ - "id", - "name", - "benchmarkId", - "status", - "isDisabled" - ], - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "The unique identifier of the standing." - }, - "name": { - "type": "string", - "description": "The name of the participant." - }, - "benchmarkId": { - "type": "string", - "description": "The id of the benchmark this standing belongs to." - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/StandingStatus" - } - ], - "description": "The status of the standing." - }, - "isDisabled": { - "type": "boolean", - "description": "Whether the participant is disabled." - } - } - }, "GetPromptsByBenchmarkEndpoint_Output": { "required": [ "id", @@ -13721,42 +13573,6 @@ } } }, - "GetStandingByIdEndpoint_Output": { - "required": [ - "id", - "name", - "benchmarkId", - "status", - "isDisabled" - ], - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "The unique identifier of the standing." - }, - "name": { - "type": "string", - "description": "The name of the participant." - }, - "benchmarkId": { - "type": "string", - "description": "The id of the benchmark this standing belongs to." - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/StandingStatus" - } - ], - "description": "The status of the standing." - }, - "isDisabled": { - "type": "boolean", - "description": "Whether the participant is disabled." - } - } - }, "IAssetInput": { "required": [ "_t" diff --git a/openapi/schemas/order.openapi.json b/openapi/schemas/order.openapi.json index 26db30652..8144cdfd7 100644 --- a/openapi/schemas/order.openapi.json +++ b/openapi/schemas/order.openapi.json @@ -4393,6 +4393,28 @@ }, "description": "The result when a job definition has been created." }, + "CreateJobEndpoint_CostWarningModel": { + "required": [ + "estimatedCost", + "availableBalance", + "shortfall" + ], + "type": "object", + "properties": { + "estimatedCost": { + "type": "number", + "format": "double" + }, + "availableBalance": { + "type": "number", + "format": "double" + }, + "shortfall": { + "type": "number", + "format": "double" + } + } + }, "CreateJobEndpoint_Input": { "required": [ "jobDefinitionId", @@ -4450,6 +4472,14 @@ "recruitingStarted": { "type": "boolean", "description": "Whether recruiting was automatically started for the audience." + }, + "costWarning": { + "allOf": [ + { + "$ref": "#/components/schemas/CreateJobEndpoint_CostWarningModel" + } + ], + "description": "Present only when the job's estimated cost exceeds the owner's remaining balance.\n Advisory — the job is created and runs regardless; it may pause for funds mid-run." } }, "description": "The result when a job has been created." @@ -4926,6 +4956,14 @@ "description": "The failure message.", "nullable": true }, + "reviewReason": { + "allOf": [ + { + "$ref": "#/components/schemas/ReviewReasonModel" + } + ], + "description": "Why the job was routed to manual review, when it is (or was) in\n ManualApproval. Null when no customer-facing reason\n applies." + }, "createdAt": { "type": "string", "description": "The creation timestamp.", @@ -7526,6 +7564,15 @@ "Sequential" ] }, + "ReviewReasonModel": { + "enum": [ + "ContentFlagged", + "UnsupportedContentType", + "CheckErrored", + "ClassificationTimedOut", + null + ] + }, "StickyConfig": { "required": [ "dimension" diff --git a/openapi/schemas/rapid.openapi.json b/openapi/schemas/rapid.openapi.json index b2ceb7d57..5e010cdc0 100644 --- a/openapi/schemas/rapid.openapi.json +++ b/openapi/schemas/rapid.openapi.json @@ -1120,6 +1120,47 @@ } } }, + "/rapid/compare-ab-summary/{correlationId}/recalculate": { + "post": { + "tags": [ + "Rapid" + ], + "summary": "Recalculates the compare AB summary counters of a correlation from scratch.", + "description": "Admin-only verification/repair tool. The counters are normally maintained by rapid\n completion and rejection events; this overwrites them with freshly aggregated values.", + "parameters": [ + { + "name": "correlationId", + "in": "path", + "description": "The correlation (workflow) id to recalculate.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthenticated" + }, + "403": { + "description": "Forbidden" + } + } + } + }, "/rapid/{rapidId}/reject": { "post": { "tags": [ diff --git a/openapi/schemas/rapidata.filtered.openapi.json b/openapi/schemas/rapidata.filtered.openapi.json index d0924152c..5f513265b 100644 --- a/openapi/schemas/rapidata.filtered.openapi.json +++ b/openapi/schemas/rapidata.filtered.openapi.json @@ -7631,20 +7631,31 @@ ] } }, - "/organizations/mine": { - "get": { + "/organizations/accept-invitation": { + "post": { "tags": [ "Organization" ], - "summary": "Returns the organization resolved from the calling customer's email domain.", - "description": "Responds with 404 when the caller's email domain does not match a registered organization.", + "summary": "Accepts the invitation identified by the token.", + "description": "Responds with 409 when the invitation is expired, already used, or was issued to a different\n email than the calling customer's.", + "requestBody": { + "description": "The invitation token.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptOrgInvitationEndpoint_Input" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetMyOrganizationEndpoint_Output" + "$ref": "#/components/schemas/AcceptOrgInvitationEndpoint_Output" } } } @@ -7679,6 +7690,62 @@ } }, "/organizations": { + "post": { + "tags": [ + "Organization" + ], + "summary": "Creates an organization and makes the calling customer its owner.", + "description": "The calling customer becomes both the owner and the billing customer. Responds with 400 when\n the slug is already taken.", + "requestBody": { + "description": "The organization to create.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateOrganizationEndpoint_Input" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateOrganizationEndpoint_Output" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthenticated" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "OpenIdConnect": [ + "openid", + "profile", + "email", + "offline_access" + ] + } + ] + }, "get": { "tags": [ "Organization" @@ -7921,6 +7988,297 @@ ] } }, + "/organizations/mine": { + "get": { + "tags": [ + "Organization" + ], + "summary": "Returns the organization resolved from the calling customer's email domain.", + "description": "Responds with 404 when the caller's email domain does not match a registered organization.", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetMyOrganizationEndpoint_Output" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthenticated" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "OpenIdConnect": [ + "openid", + "profile", + "email", + "offline_access" + ] + } + ] + } + }, + "/organizations/{organizationId}": { + "get": { + "tags": [ + "Organization" + ], + "summary": "Returns the organization with the given id.", + "parameters": [ + { + "name": "organizationId", + "in": "path", + "description": "The id of the organization to retrieve.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetOrganizationEndpoint_Output" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthenticated" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "OpenIdConnect": [ + "openid", + "profile", + "email", + "offline_access" + ] + } + ] + } + }, + "/organizations/{organizationId}/invitations": { + "post": { + "tags": [ + "Organization" + ], + "summary": "Creates an invitation to join the organization.", + "description": "Returns a single-use token the invitee presents to the accept-invitation endpoint.", + "parameters": [ + { + "name": "organizationId", + "in": "path", + "description": "The id of the organization to invite into.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "The invitee email and role.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InviteOrgMemberEndpoint_Input" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InviteOrgMemberEndpoint_Output" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthenticated" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "OpenIdConnect": [ + "openid", + "profile", + "email", + "offline_access" + ] + } + ] + } + }, + "/organizations/{organizationId}/members": { + "get": { + "tags": [ + "Organization" + ], + "summary": "Returns the members of the given organization.", + "parameters": [ + { + "name": "organizationId", + "in": "path", + "description": "The id of the organization whose members to list.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListOrgMembersEndpoint_Output" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthenticated" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "OpenIdConnect": [ + "openid", + "profile", + "email", + "offline_access" + ] + } + ] + } + }, + "/organizations/{organizationId}/members/{customerId}": { + "delete": { + "tags": [ + "Organization" + ], + "summary": "Removes the given customer's membership from the organization.", + "description": "Responds with 404 when the customer is not a member and 409 when removing the organization's\n last owner.", + "parameters": [ + { + "name": "organizationId", + "in": "path", + "description": "The id of the organization.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "customerId", + "in": "path", + "description": "The id of the customer to remove.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthenticated" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "OpenIdConnect": [ + "openid", + "profile", + "email", + "offline_access" + ] + } + ] + } + }, "/organizations/{owner}/support-slack-channel": { "put": { "tags": [ @@ -13540,138 +13898,6 @@ "/leaderboard/combined-matrix": {}, "/leaderboard/combined-standings": {}, "/leaderboard/{leaderboardId}/matrix": {}, - "/leaderboard/{leaderboardId}/participant/{participantId}": { - "get": { - "tags": [ - "Leaderboard" - ], - "summary": "Gets a participant by its id.", - "parameters": [ - { - "name": "leaderboardId", - "in": "path", - "description": "The id of the leaderboard the participant belongs to.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "participantId", - "in": "path", - "description": "The id of the participant to retrieve.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetParticipantByIdObsoleteEndpoint_Output" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ValidationProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthenticated" - }, - "403": { - "description": "Forbidden" - } - }, - "security": [ - { - "OpenIdConnect": [ - "openid", - "profile", - "email", - "offline_access" - ] - } - ] - } - }, - "/benchmark/standing/{leaderboardId}/{participantId}": { - "get": { - "tags": [ - "Leaderboard" - ], - "summary": "Gets a standing by leaderboard id and participant id.", - "parameters": [ - { - "name": "leaderboardId", - "in": "path", - "description": "The id of the leaderboard the standing belongs to.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "participantId", - "in": "path", - "description": "The id of the participant whose standing should be retrieved.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetStandingByIdEndpoint_Output" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ValidationProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthenticated" - }, - "403": { - "description": "Forbidden" - } - }, - "security": [ - { - "OpenIdConnect": [ - "openid", - "profile", - "email", - "offline_access" - ] - } - ] - } - }, "/leaderboard/combined-matrix/query": { "get": { "tags": [ @@ -28114,6 +28340,57 @@ ] } }, + "/rapid/compare-ab-summary/{correlationId}/recalculate": { + "post": { + "tags": [ + "Rapid" + ], + "summary": "Recalculates the compare AB summary counters of a correlation from scratch.", + "description": "Admin-only verification/repair tool. The counters are normally maintained by rapid\n completion and rejection events; this overwrites them with freshly aggregated values.", + "parameters": [ + { + "name": "correlationId", + "in": "path", + "description": "The correlation (workflow) id to recalculate.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthenticated" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "OpenIdConnect": [ + "openid", + "profile", + "email", + "offline_access" + ] + } + ] + } + }, "/rapid/{rapidId}/reject": { "post": { "tags": [ @@ -39379,6 +39656,35 @@ } } }, + "AcceptOrgInvitationEndpoint_Input": { + "required": [ + "token" + ], + "type": "object", + "properties": { + "token": { + "type": "string", + "description": "The single-use invitation token." + } + } + }, + "AcceptOrgInvitationEndpoint_Output": { + "required": [ + "organizationId", + "membershipId" + ], + "type": "object", + "properties": { + "organizationId": { + "type": "string", + "description": "The organization the customer joined." + }, + "membershipId": { + "type": "string", + "description": "The id of the created membership." + } + } + }, "ClientModel": { "required": [ "client_id", @@ -39544,6 +39850,40 @@ } } }, + "CreateOrganizationEndpoint_Input": { + "required": [ + "name", + "slug" + ], + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The human-readable name of the organization." + }, + "slug": { + "type": "string", + "description": "A URL-safe unique identifier for the organization." + }, + "primaryDomain": { + "type": "string", + "description": "The primary email domain associated with the organization, if any.", + "nullable": true + } + } + }, + "CreateOrganizationEndpoint_Output": { + "required": [ + "organizationId" + ], + "type": "object", + "properties": { + "organizationId": { + "type": "string", + "description": "The id of the created organization." + } + } + }, "DynamicClientRegistrationRequest": { "type": "object", "properties": { @@ -39642,6 +39982,40 @@ } } }, + "GetOrganizationEndpoint_Output": { + "required": [ + "id", + "name", + "slug", + "billingCustomerId", + "primaryDomain" + ], + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The id of the organization." + }, + "name": { + "type": "string", + "description": "The human-readable name of the organization." + }, + "slug": { + "type": "string", + "description": "The URL-safe unique identifier of the organization." + }, + "billingCustomerId": { + "type": "string", + "description": "The customer that owns billing for the organization.", + "format": "uuid" + }, + "primaryDomain": { + "type": "string", + "description": "The primary email domain associated with the organization, if any.", + "nullable": true + } + } + }, "GoogleOneTapLoginEndpoint_Input": { "required": [ "idToken" @@ -39671,6 +40045,50 @@ } } }, + "InviteOrgMemberEndpoint_Input": { + "required": [ + "email", + "role" + ], + "type": "object", + "properties": { + "email": { + "type": "string", + "description": "The email address to invite." + }, + "role": { + "allOf": [ + { + "$ref": "#/components/schemas/OrgRole" + } + ], + "description": "The org-scoped role the resulting membership will confer." + } + } + }, + "InviteOrgMemberEndpoint_Output": { + "required": [ + "invitationId", + "token", + "expiresAt" + ], + "type": "object", + "properties": { + "invitationId": { + "type": "string", + "description": "The id of the created invitation." + }, + "token": { + "type": "string", + "description": "The single-use token used to accept the invitation." + }, + "expiresAt": { + "type": "string", + "description": "The instant after which the invitation can no longer be accepted.", + "format": "date-time" + } + } + }, "JsonWebKey": { "type": "object", "properties": { @@ -39793,6 +40211,64 @@ } } }, + "ListOrgMembersEndpoint_Output": { + "required": [ + "members" + ], + "type": "object", + "properties": { + "members": { + "allOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/ListOrgMembersEndpoint_Output_Member" + } + } + ], + "description": "The members of the organization." + } + } + }, + "ListOrgMembersEndpoint_Output_Member": { + "required": [ + "customerId", + "email", + "role", + "status" + ], + "type": "object", + "properties": { + "customerId": { + "type": "string", + "format": "uuid" + }, + "email": { + "type": "string", + "nullable": true + }, + "role": { + "$ref": "#/components/schemas/OrgRole" + }, + "status": { + "$ref": "#/components/schemas/MembershipStatus" + } + } + }, + "MembershipStatus": { + "enum": [ + "Active", + "Suspended" + ] + }, + "OrgRole": { + "enum": [ + "Owner", + "Admin", + "Editor", + "Viewer" + ] + }, "QueryClientsEndpoint_Output": { "required": [ "clientId", @@ -41125,42 +41601,6 @@ } } }, - "GetParticipantByIdObsoleteEndpoint_Output": { - "required": [ - "id", - "name", - "benchmarkId", - "status", - "isDisabled" - ], - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "The unique identifier of the standing." - }, - "name": { - "type": "string", - "description": "The name of the participant." - }, - "benchmarkId": { - "type": "string", - "description": "The id of the benchmark this standing belongs to." - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/StandingStatus" - } - ], - "description": "The status of the standing." - }, - "isDisabled": { - "type": "boolean", - "description": "Whether the participant is disabled." - } - } - }, "GetPromptsByBenchmarkEndpoint_Output": { "required": [ "id", @@ -42059,42 +42499,6 @@ } } }, - "GetStandingByIdEndpoint_Output": { - "required": [ - "id", - "name", - "benchmarkId", - "status", - "isDisabled" - ], - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "The unique identifier of the standing." - }, - "name": { - "type": "string", - "description": "The name of the participant." - }, - "benchmarkId": { - "type": "string", - "description": "The id of the benchmark this standing belongs to." - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/StandingStatus" - } - ], - "description": "The status of the standing." - }, - "isDisabled": { - "type": "boolean", - "description": "Whether the participant is disabled." - } - } - }, "IFaucetInput": { "required": [ "_t" @@ -44489,6 +44893,28 @@ }, "description": "The result when a job definition has been created." }, + "CreateJobEndpoint_CostWarningModel": { + "required": [ + "estimatedCost", + "availableBalance", + "shortfall" + ], + "type": "object", + "properties": { + "estimatedCost": { + "type": "number", + "format": "double" + }, + "availableBalance": { + "type": "number", + "format": "double" + }, + "shortfall": { + "type": "number", + "format": "double" + } + } + }, "CreateJobEndpoint_Input": { "required": [ "jobDefinitionId", @@ -44546,6 +44972,14 @@ "recruitingStarted": { "type": "boolean", "description": "Whether recruiting was automatically started for the audience." + }, + "costWarning": { + "allOf": [ + { + "$ref": "#/components/schemas/CreateJobEndpoint_CostWarningModel" + } + ], + "description": "Present only when the job's estimated cost exceeds the owner's remaining balance.\n Advisory — the job is created and runs regardless; it may pause for funds mid-run." } }, "description": "The result when a job has been created." @@ -44957,6 +45391,14 @@ "description": "The failure message.", "nullable": true }, + "reviewReason": { + "allOf": [ + { + "$ref": "#/components/schemas/ReviewReasonModel" + } + ], + "description": "Why the job was routed to manual review, when it is (or was) in\n ManualApproval. Null when no customer-facing reason\n applies." + }, "createdAt": { "type": "string", "description": "The creation timestamp.", @@ -47350,6 +47792,15 @@ } } }, + "ReviewReasonModel": { + "enum": [ + "ContentFlagged", + "UnsupportedContentType", + "CheckErrored", + "ClassificationTimedOut", + null + ] + }, "StickyConfig": { "required": [ "dimension" diff --git a/openapi/schemas/rapidata.openapi.json b/openapi/schemas/rapidata.openapi.json index 80d02d8f9..d77ea18e7 100644 --- a/openapi/schemas/rapidata.openapi.json +++ b/openapi/schemas/rapidata.openapi.json @@ -7681,20 +7681,31 @@ ] } }, - "/organizations/mine": { - "get": { + "/organizations/accept-invitation": { + "post": { "tags": [ "Organization" ], - "summary": "Returns the organization resolved from the calling customer's email domain.", - "description": "Responds with 404 when the caller's email domain does not match a registered organization.", + "summary": "Accepts the invitation identified by the token.", + "description": "Responds with 409 when the invitation is expired, already used, or was issued to a different\n email than the calling customer's.", + "requestBody": { + "description": "The invitation token.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptOrgInvitationEndpoint_Input" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetMyOrganizationEndpoint_Output" + "$ref": "#/components/schemas/AcceptOrgInvitationEndpoint_Output" } } } @@ -7729,6 +7740,62 @@ } }, "/organizations": { + "post": { + "tags": [ + "Organization" + ], + "summary": "Creates an organization and makes the calling customer its owner.", + "description": "The calling customer becomes both the owner and the billing customer. Responds with 400 when\n the slug is already taken.", + "requestBody": { + "description": "The organization to create.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateOrganizationEndpoint_Input" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateOrganizationEndpoint_Output" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthenticated" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "OpenIdConnect": [ + "openid", + "profile", + "email", + "offline_access" + ] + } + ] + }, "get": { "tags": [ "Organization" @@ -7971,6 +8038,297 @@ ] } }, + "/organizations/mine": { + "get": { + "tags": [ + "Organization" + ], + "summary": "Returns the organization resolved from the calling customer's email domain.", + "description": "Responds with 404 when the caller's email domain does not match a registered organization.", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetMyOrganizationEndpoint_Output" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthenticated" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "OpenIdConnect": [ + "openid", + "profile", + "email", + "offline_access" + ] + } + ] + } + }, + "/organizations/{organizationId}": { + "get": { + "tags": [ + "Organization" + ], + "summary": "Returns the organization with the given id.", + "parameters": [ + { + "name": "organizationId", + "in": "path", + "description": "The id of the organization to retrieve.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetOrganizationEndpoint_Output" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthenticated" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "OpenIdConnect": [ + "openid", + "profile", + "email", + "offline_access" + ] + } + ] + } + }, + "/organizations/{organizationId}/invitations": { + "post": { + "tags": [ + "Organization" + ], + "summary": "Creates an invitation to join the organization.", + "description": "Returns a single-use token the invitee presents to the accept-invitation endpoint.", + "parameters": [ + { + "name": "organizationId", + "in": "path", + "description": "The id of the organization to invite into.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "The invitee email and role.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InviteOrgMemberEndpoint_Input" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InviteOrgMemberEndpoint_Output" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthenticated" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "OpenIdConnect": [ + "openid", + "profile", + "email", + "offline_access" + ] + } + ] + } + }, + "/organizations/{organizationId}/members": { + "get": { + "tags": [ + "Organization" + ], + "summary": "Returns the members of the given organization.", + "parameters": [ + { + "name": "organizationId", + "in": "path", + "description": "The id of the organization whose members to list.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListOrgMembersEndpoint_Output" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthenticated" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "OpenIdConnect": [ + "openid", + "profile", + "email", + "offline_access" + ] + } + ] + } + }, + "/organizations/{organizationId}/members/{customerId}": { + "delete": { + "tags": [ + "Organization" + ], + "summary": "Removes the given customer's membership from the organization.", + "description": "Responds with 404 when the customer is not a member and 409 when removing the organization's\n last owner.", + "parameters": [ + { + "name": "organizationId", + "in": "path", + "description": "The id of the organization.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "customerId", + "in": "path", + "description": "The id of the customer to remove.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthenticated" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "OpenIdConnect": [ + "openid", + "profile", + "email", + "offline_access" + ] + } + ] + } + }, "/organizations/{owner}/support-slack-channel": { "put": { "tags": [ @@ -14914,138 +15272,6 @@ ] } }, - "/leaderboard/{leaderboardId}/participant/{participantId}": { - "get": { - "tags": [ - "Leaderboard" - ], - "summary": "Gets a participant by its id.", - "parameters": [ - { - "name": "leaderboardId", - "in": "path", - "description": "The id of the leaderboard the participant belongs to.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "participantId", - "in": "path", - "description": "The id of the participant to retrieve.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetParticipantByIdObsoleteEndpoint_Output" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ValidationProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthenticated" - }, - "403": { - "description": "Forbidden" - } - }, - "security": [ - { - "OpenIdConnect": [ - "openid", - "profile", - "email", - "offline_access" - ] - } - ] - } - }, - "/benchmark/standing/{leaderboardId}/{participantId}": { - "get": { - "tags": [ - "Leaderboard" - ], - "summary": "Gets a standing by leaderboard id and participant id.", - "parameters": [ - { - "name": "leaderboardId", - "in": "path", - "description": "The id of the leaderboard the standing belongs to.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "participantId", - "in": "path", - "description": "The id of the participant whose standing should be retrieved.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetStandingByIdEndpoint_Output" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ValidationProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthenticated" - }, - "403": { - "description": "Forbidden" - } - }, - "security": [ - { - "OpenIdConnect": [ - "openid", - "profile", - "email", - "offline_access" - ] - } - ] - } - }, "/leaderboard/combined-matrix/query": { "get": { "tags": [ @@ -29822,6 +30048,57 @@ ] } }, + "/rapid/compare-ab-summary/{correlationId}/recalculate": { + "post": { + "tags": [ + "Rapid" + ], + "summary": "Recalculates the compare AB summary counters of a correlation from scratch.", + "description": "Admin-only verification/repair tool. The counters are normally maintained by rapid\n completion and rejection events; this overwrites them with freshly aggregated values.", + "parameters": [ + { + "name": "correlationId", + "in": "path", + "description": "The correlation (workflow) id to recalculate.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthenticated" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "OpenIdConnect": [ + "openid", + "profile", + "email", + "offline_access" + ] + } + ] + } + }, "/rapid/{rapidId}/reject": { "post": { "tags": [ @@ -41214,6 +41491,35 @@ } } }, + "AcceptOrgInvitationEndpoint_Input": { + "required": [ + "token" + ], + "type": "object", + "properties": { + "token": { + "type": "string", + "description": "The single-use invitation token." + } + } + }, + "AcceptOrgInvitationEndpoint_Output": { + "required": [ + "organizationId", + "membershipId" + ], + "type": "object", + "properties": { + "organizationId": { + "type": "string", + "description": "The organization the customer joined." + }, + "membershipId": { + "type": "string", + "description": "The id of the created membership." + } + } + }, "ClientModel": { "required": [ "client_id", @@ -41379,6 +41685,40 @@ } } }, + "CreateOrganizationEndpoint_Input": { + "required": [ + "name", + "slug" + ], + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The human-readable name of the organization." + }, + "slug": { + "type": "string", + "description": "A URL-safe unique identifier for the organization." + }, + "primaryDomain": { + "type": "string", + "description": "The primary email domain associated with the organization, if any.", + "nullable": true + } + } + }, + "CreateOrganizationEndpoint_Output": { + "required": [ + "organizationId" + ], + "type": "object", + "properties": { + "organizationId": { + "type": "string", + "description": "The id of the created organization." + } + } + }, "DynamicClientRegistrationRequest": { "type": "object", "properties": { @@ -41477,6 +41817,40 @@ } } }, + "GetOrganizationEndpoint_Output": { + "required": [ + "id", + "name", + "slug", + "billingCustomerId", + "primaryDomain" + ], + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The id of the organization." + }, + "name": { + "type": "string", + "description": "The human-readable name of the organization." + }, + "slug": { + "type": "string", + "description": "The URL-safe unique identifier of the organization." + }, + "billingCustomerId": { + "type": "string", + "description": "The customer that owns billing for the organization.", + "format": "uuid" + }, + "primaryDomain": { + "type": "string", + "description": "The primary email domain associated with the organization, if any.", + "nullable": true + } + } + }, "GoogleOneTapLoginEndpoint_Input": { "required": [ "idToken" @@ -41506,6 +41880,50 @@ } } }, + "InviteOrgMemberEndpoint_Input": { + "required": [ + "email", + "role" + ], + "type": "object", + "properties": { + "email": { + "type": "string", + "description": "The email address to invite." + }, + "role": { + "allOf": [ + { + "$ref": "#/components/schemas/OrgRole" + } + ], + "description": "The org-scoped role the resulting membership will confer." + } + } + }, + "InviteOrgMemberEndpoint_Output": { + "required": [ + "invitationId", + "token", + "expiresAt" + ], + "type": "object", + "properties": { + "invitationId": { + "type": "string", + "description": "The id of the created invitation." + }, + "token": { + "type": "string", + "description": "The single-use token used to accept the invitation." + }, + "expiresAt": { + "type": "string", + "description": "The instant after which the invitation can no longer be accepted.", + "format": "date-time" + } + } + }, "JsonWebKey": { "type": "object", "properties": { @@ -41628,6 +42046,64 @@ } } }, + "ListOrgMembersEndpoint_Output": { + "required": [ + "members" + ], + "type": "object", + "properties": { + "members": { + "allOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/ListOrgMembersEndpoint_Output_Member" + } + } + ], + "description": "The members of the organization." + } + } + }, + "ListOrgMembersEndpoint_Output_Member": { + "required": [ + "customerId", + "email", + "role", + "status" + ], + "type": "object", + "properties": { + "customerId": { + "type": "string", + "format": "uuid" + }, + "email": { + "type": "string", + "nullable": true + }, + "role": { + "$ref": "#/components/schemas/OrgRole" + }, + "status": { + "$ref": "#/components/schemas/MembershipStatus" + } + } + }, + "MembershipStatus": { + "enum": [ + "Active", + "Suspended" + ] + }, + "OrgRole": { + "enum": [ + "Owner", + "Admin", + "Editor", + "Viewer" + ] + }, "QueryClientsEndpoint_Output": { "required": [ "clientId", @@ -42960,42 +43436,6 @@ } } }, - "GetParticipantByIdObsoleteEndpoint_Output": { - "required": [ - "id", - "name", - "benchmarkId", - "status", - "isDisabled" - ], - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "The unique identifier of the standing." - }, - "name": { - "type": "string", - "description": "The name of the participant." - }, - "benchmarkId": { - "type": "string", - "description": "The id of the benchmark this standing belongs to." - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/StandingStatus" - } - ], - "description": "The status of the standing." - }, - "isDisabled": { - "type": "boolean", - "description": "Whether the participant is disabled." - } - } - }, "GetPromptsByBenchmarkEndpoint_Output": { "required": [ "id", @@ -43929,42 +44369,6 @@ } } }, - "GetStandingByIdEndpoint_Output": { - "required": [ - "id", - "name", - "benchmarkId", - "status", - "isDisabled" - ], - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "The unique identifier of the standing." - }, - "name": { - "type": "string", - "description": "The name of the participant." - }, - "benchmarkId": { - "type": "string", - "description": "The id of the benchmark this standing belongs to." - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/StandingStatus" - } - ], - "description": "The status of the standing." - }, - "isDisabled": { - "type": "boolean", - "description": "Whether the participant is disabled." - } - } - }, "IFaucetInput": { "required": [ "_t" @@ -46372,6 +46776,28 @@ }, "description": "The result when a job definition has been created." }, + "CreateJobEndpoint_CostWarningModel": { + "required": [ + "estimatedCost", + "availableBalance", + "shortfall" + ], + "type": "object", + "properties": { + "estimatedCost": { + "type": "number", + "format": "double" + }, + "availableBalance": { + "type": "number", + "format": "double" + }, + "shortfall": { + "type": "number", + "format": "double" + } + } + }, "CreateJobEndpoint_Input": { "required": [ "jobDefinitionId", @@ -46429,6 +46855,14 @@ "recruitingStarted": { "type": "boolean", "description": "Whether recruiting was automatically started for the audience." + }, + "costWarning": { + "allOf": [ + { + "$ref": "#/components/schemas/CreateJobEndpoint_CostWarningModel" + } + ], + "description": "Present only when the job's estimated cost exceeds the owner's remaining balance.\n Advisory — the job is created and runs regardless; it may pause for funds mid-run." } }, "description": "The result when a job has been created." @@ -46883,6 +47317,14 @@ "description": "The failure message.", "nullable": true }, + "reviewReason": { + "allOf": [ + { + "$ref": "#/components/schemas/ReviewReasonModel" + } + ], + "description": "Why the job was routed to manual review, when it is (or was) in\n ManualApproval. Null when no customer-facing reason\n applies." + }, "createdAt": { "type": "string", "description": "The creation timestamp.", @@ -49299,6 +49741,15 @@ } } }, + "ReviewReasonModel": { + "enum": [ + "ContentFlagged", + "UnsupportedContentType", + "CheckErrored", + "ClassificationTimedOut", + null + ] + }, "StickyConfig": { "required": [ "dimension" diff --git a/src/rapidata/api_client/api/leaderboard_api.py b/src/rapidata/api_client/api/leaderboard_api.py index b523fe228..6ede3d811 100644 --- a/src/rapidata/api_client/api/leaderboard_api.py +++ b/src/rapidata/api_client/api/leaderboard_api.py @@ -26,8 +26,6 @@ from rapidata.api_client.models.create_leaderboard_participant_endpoint_output import CreateLeaderboardParticipantEndpointOutput from rapidata.api_client.models.create_prompt_for_leaderboard_endpoint_output import CreatePromptForLeaderboardEndpointOutput from rapidata.api_client.models.get_leaderboard_by_id_endpoint_output import GetLeaderboardByIdEndpointOutput -from rapidata.api_client.models.get_participant_by_id_obsolete_endpoint_output import GetParticipantByIdObsoleteEndpointOutput -from rapidata.api_client.models.get_standing_by_id_endpoint_output import GetStandingByIdEndpointOutput from rapidata.api_client.models.query_combined_matrix_by_leaderboards_endpoint_output import QueryCombinedMatrixByLeaderboardsEndpointOutput from rapidata.api_client.models.query_combined_standings_by_leaderboards_endpoint_output import QueryCombinedStandingsByLeaderboardsEndpointOutput from rapidata.api_client.models.query_leaderboard_runs_endpoint_paged_result_of_output import QueryLeaderboardRunsEndpointPagedResultOfOutput @@ -58,288 +56,6 @@ def __init__(self, api_client=None) -> None: self.api_client = api_client - @validate_call - def benchmark_standing_leaderboard_id_participant_id_get( - self, - leaderboard_id: Annotated[StrictStr, Field(description="The id of the leaderboard the standing belongs to.")], - participant_id: Annotated[StrictStr, Field(description="The id of the participant whose standing should be retrieved.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GetStandingByIdEndpointOutput: - """Gets a standing by leaderboard id and participant id. - - - :param leaderboard_id: The id of the leaderboard the standing belongs to. (required) - :type leaderboard_id: str - :param participant_id: The id of the participant whose standing should be retrieved. (required) - :type participant_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._benchmark_standing_leaderboard_id_participant_id_get_serialize( - leaderboard_id=leaderboard_id, - participant_id=participant_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetStandingByIdEndpointOutput", - '400': "ValidationProblemDetails", - '401': None, - '403': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def benchmark_standing_leaderboard_id_participant_id_get_with_http_info( - self, - leaderboard_id: Annotated[StrictStr, Field(description="The id of the leaderboard the standing belongs to.")], - participant_id: Annotated[StrictStr, Field(description="The id of the participant whose standing should be retrieved.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[GetStandingByIdEndpointOutput]: - """Gets a standing by leaderboard id and participant id. - - - :param leaderboard_id: The id of the leaderboard the standing belongs to. (required) - :type leaderboard_id: str - :param participant_id: The id of the participant whose standing should be retrieved. (required) - :type participant_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._benchmark_standing_leaderboard_id_participant_id_get_serialize( - leaderboard_id=leaderboard_id, - participant_id=participant_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetStandingByIdEndpointOutput", - '400': "ValidationProblemDetails", - '401': None, - '403': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def benchmark_standing_leaderboard_id_participant_id_get_without_preload_content( - self, - leaderboard_id: Annotated[StrictStr, Field(description="The id of the leaderboard the standing belongs to.")], - participant_id: Annotated[StrictStr, Field(description="The id of the participant whose standing should be retrieved.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Gets a standing by leaderboard id and participant id. - - - :param leaderboard_id: The id of the leaderboard the standing belongs to. (required) - :type leaderboard_id: str - :param participant_id: The id of the participant whose standing should be retrieved. (required) - :type participant_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._benchmark_standing_leaderboard_id_participant_id_get_serialize( - leaderboard_id=leaderboard_id, - participant_id=participant_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetStandingByIdEndpointOutput", - '400': "ValidationProblemDetails", - '401': None, - '403': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _benchmark_standing_leaderboard_id_participant_id_get_serialize( - self, - leaderboard_id, - participant_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if leaderboard_id is not None: - _path_params['leaderboardId'] = leaderboard_id - if participant_id is not None: - _path_params['participantId'] = participant_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'OpenIdConnect' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/benchmark/standing/{leaderboardId}/{participantId}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - @validate_call def leaderboard_combined_matrix_query_get( self, @@ -3222,288 +2938,6 @@ def _leaderboard_leaderboard_id_name_put_serialize( - @validate_call - def leaderboard_leaderboard_id_participant_participant_id_get( - self, - leaderboard_id: Annotated[StrictStr, Field(description="The id of the leaderboard the participant belongs to.")], - participant_id: Annotated[StrictStr, Field(description="The id of the participant to retrieve.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GetParticipantByIdObsoleteEndpointOutput: - """Gets a participant by its id. - - - :param leaderboard_id: The id of the leaderboard the participant belongs to. (required) - :type leaderboard_id: str - :param participant_id: The id of the participant to retrieve. (required) - :type participant_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._leaderboard_leaderboard_id_participant_participant_id_get_serialize( - leaderboard_id=leaderboard_id, - participant_id=participant_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetParticipantByIdObsoleteEndpointOutput", - '400': "ValidationProblemDetails", - '401': None, - '403': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def leaderboard_leaderboard_id_participant_participant_id_get_with_http_info( - self, - leaderboard_id: Annotated[StrictStr, Field(description="The id of the leaderboard the participant belongs to.")], - participant_id: Annotated[StrictStr, Field(description="The id of the participant to retrieve.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[GetParticipantByIdObsoleteEndpointOutput]: - """Gets a participant by its id. - - - :param leaderboard_id: The id of the leaderboard the participant belongs to. (required) - :type leaderboard_id: str - :param participant_id: The id of the participant to retrieve. (required) - :type participant_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._leaderboard_leaderboard_id_participant_participant_id_get_serialize( - leaderboard_id=leaderboard_id, - participant_id=participant_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetParticipantByIdObsoleteEndpointOutput", - '400': "ValidationProblemDetails", - '401': None, - '403': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def leaderboard_leaderboard_id_participant_participant_id_get_without_preload_content( - self, - leaderboard_id: Annotated[StrictStr, Field(description="The id of the leaderboard the participant belongs to.")], - participant_id: Annotated[StrictStr, Field(description="The id of the participant to retrieve.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Gets a participant by its id. - - - :param leaderboard_id: The id of the leaderboard the participant belongs to. (required) - :type leaderboard_id: str - :param participant_id: The id of the participant to retrieve. (required) - :type participant_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._leaderboard_leaderboard_id_participant_participant_id_get_serialize( - leaderboard_id=leaderboard_id, - participant_id=participant_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetParticipantByIdObsoleteEndpointOutput", - '400': "ValidationProblemDetails", - '401': None, - '403': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _leaderboard_leaderboard_id_participant_participant_id_get_serialize( - self, - leaderboard_id, - participant_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if leaderboard_id is not None: - _path_params['leaderboardId'] = leaderboard_id - if participant_id is not None: - _path_params['participantId'] = participant_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'OpenIdConnect' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/leaderboard/{leaderboardId}/participant/{participantId}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - @validate_call def leaderboard_leaderboard_id_participants_get( self, diff --git a/src/rapidata/api_client/api/organization_api.py b/src/rapidata/api_client/api/organization_api.py index c044abf8a..e74da097c 100644 --- a/src/rapidata/api_client/api/organization_api.py +++ b/src/rapidata/api_client/api/organization_api.py @@ -19,8 +19,16 @@ from typing import List, Optional from typing_extensions import Annotated from uuid import UUID +from rapidata.api_client.models.accept_org_invitation_endpoint_input import AcceptOrgInvitationEndpointInput +from rapidata.api_client.models.accept_org_invitation_endpoint_output import AcceptOrgInvitationEndpointOutput from rapidata.api_client.models.audience_audience_id_jobs_get_job_id_parameter import AudienceAudienceIdJobsGetJobIdParameter +from rapidata.api_client.models.create_organization_endpoint_input import CreateOrganizationEndpointInput +from rapidata.api_client.models.create_organization_endpoint_output import CreateOrganizationEndpointOutput from rapidata.api_client.models.get_my_organization_endpoint_output import GetMyOrganizationEndpointOutput +from rapidata.api_client.models.get_organization_endpoint_output import GetOrganizationEndpointOutput +from rapidata.api_client.models.invite_org_member_endpoint_input import InviteOrgMemberEndpointInput +from rapidata.api_client.models.invite_org_member_endpoint_output import InviteOrgMemberEndpointOutput +from rapidata.api_client.models.list_org_members_endpoint_output import ListOrgMembersEndpointOutput from rapidata.api_client.models.query_organizations_endpoint_paged_result_of_output import QueryOrganizationsEndpointPagedResultOfOutput from rapidata.api_client.models.set_organization_support_slack_channel_endpoint_input import SetOrganizationSupportSlackChannelEndpointInput @@ -42,6 +50,289 @@ def __init__(self, api_client=None) -> None: self.api_client = api_client + @validate_call + def organizations_accept_invitation_post( + self, + accept_org_invitation_endpoint_input: Annotated[AcceptOrgInvitationEndpointInput, Field(description="The invitation token.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> AcceptOrgInvitationEndpointOutput: + """Accepts the invitation identified by the token. + + Responds with 409 when the invitation is expired, already used, or was issued to a different email than the calling customer's. + + :param accept_org_invitation_endpoint_input: The invitation token. (required) + :type accept_org_invitation_endpoint_input: AcceptOrgInvitationEndpointInput + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._organizations_accept_invitation_post_serialize( + accept_org_invitation_endpoint_input=accept_org_invitation_endpoint_input, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AcceptOrgInvitationEndpointOutput", + '400': "ValidationProblemDetails", + '401': None, + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def organizations_accept_invitation_post_with_http_info( + self, + accept_org_invitation_endpoint_input: Annotated[AcceptOrgInvitationEndpointInput, Field(description="The invitation token.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[AcceptOrgInvitationEndpointOutput]: + """Accepts the invitation identified by the token. + + Responds with 409 when the invitation is expired, already used, or was issued to a different email than the calling customer's. + + :param accept_org_invitation_endpoint_input: The invitation token. (required) + :type accept_org_invitation_endpoint_input: AcceptOrgInvitationEndpointInput + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._organizations_accept_invitation_post_serialize( + accept_org_invitation_endpoint_input=accept_org_invitation_endpoint_input, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AcceptOrgInvitationEndpointOutput", + '400': "ValidationProblemDetails", + '401': None, + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def organizations_accept_invitation_post_without_preload_content( + self, + accept_org_invitation_endpoint_input: Annotated[AcceptOrgInvitationEndpointInput, Field(description="The invitation token.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Accepts the invitation identified by the token. + + Responds with 409 when the invitation is expired, already used, or was issued to a different email than the calling customer's. + + :param accept_org_invitation_endpoint_input: The invitation token. (required) + :type accept_org_invitation_endpoint_input: AcceptOrgInvitationEndpointInput + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._organizations_accept_invitation_post_serialize( + accept_org_invitation_endpoint_input=accept_org_invitation_endpoint_input, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AcceptOrgInvitationEndpointOutput", + '400': "ValidationProblemDetails", + '401': None, + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _organizations_accept_invitation_post_serialize( + self, + accept_org_invitation_endpoint_input, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if accept_org_invitation_endpoint_input is not None: + _body_params = accept_org_invitation_endpoint_input + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OpenIdConnect' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/organizations/accept-invitation', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def organizations_get( self, @@ -703,10 +994,9 @@ def _organizations_mine_get_serialize( @validate_call - def organizations_owner_support_slack_channel_put( + def organizations_organization_id_get( self, - owner: Annotated[UUID, Field(description="The customer ID that owns the organization.")], - set_organization_support_slack_channel_endpoint_input: Annotated[SetOrganizationSupportSlackChannelEndpointInput, Field(description="The support Slack channel URL to set or clear.")], + organization_id: Annotated[StrictStr, Field(description="The id of the organization to retrieve.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -719,13 +1009,1131 @@ def organizations_owner_support_slack_channel_put( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """Sets the support Slack channel URL for the organization owned by the given customer. + ) -> GetOrganizationEndpointOutput: + """Returns the organization with the given id. - A null or empty URL clears the channel. Responds with 404 when no organization is owned by the given customer. - :param owner: The customer ID that owns the organization. (required) - :type owner: UUID + :param organization_id: The id of the organization to retrieve. (required) + :type organization_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._organizations_organization_id_get_serialize( + organization_id=organization_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetOrganizationEndpointOutput", + '400': "ValidationProblemDetails", + '401': None, + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def organizations_organization_id_get_with_http_info( + self, + organization_id: Annotated[StrictStr, Field(description="The id of the organization to retrieve.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[GetOrganizationEndpointOutput]: + """Returns the organization with the given id. + + + :param organization_id: The id of the organization to retrieve. (required) + :type organization_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._organizations_organization_id_get_serialize( + organization_id=organization_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetOrganizationEndpointOutput", + '400': "ValidationProblemDetails", + '401': None, + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def organizations_organization_id_get_without_preload_content( + self, + organization_id: Annotated[StrictStr, Field(description="The id of the organization to retrieve.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Returns the organization with the given id. + + + :param organization_id: The id of the organization to retrieve. (required) + :type organization_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._organizations_organization_id_get_serialize( + organization_id=organization_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetOrganizationEndpointOutput", + '400': "ValidationProblemDetails", + '401': None, + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _organizations_organization_id_get_serialize( + self, + organization_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if organization_id is not None: + _path_params['organizationId'] = organization_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OpenIdConnect' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/organizations/{organizationId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def organizations_organization_id_invitations_post( + self, + organization_id: Annotated[StrictStr, Field(description="The id of the organization to invite into.")], + invite_org_member_endpoint_input: Annotated[InviteOrgMemberEndpointInput, Field(description="The invitee email and role.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> InviteOrgMemberEndpointOutput: + """Creates an invitation to join the organization. + + Returns a single-use token the invitee presents to the accept-invitation endpoint. + + :param organization_id: The id of the organization to invite into. (required) + :type organization_id: str + :param invite_org_member_endpoint_input: The invitee email and role. (required) + :type invite_org_member_endpoint_input: InviteOrgMemberEndpointInput + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._organizations_organization_id_invitations_post_serialize( + organization_id=organization_id, + invite_org_member_endpoint_input=invite_org_member_endpoint_input, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "InviteOrgMemberEndpointOutput", + '400': "ValidationProblemDetails", + '401': None, + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def organizations_organization_id_invitations_post_with_http_info( + self, + organization_id: Annotated[StrictStr, Field(description="The id of the organization to invite into.")], + invite_org_member_endpoint_input: Annotated[InviteOrgMemberEndpointInput, Field(description="The invitee email and role.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[InviteOrgMemberEndpointOutput]: + """Creates an invitation to join the organization. + + Returns a single-use token the invitee presents to the accept-invitation endpoint. + + :param organization_id: The id of the organization to invite into. (required) + :type organization_id: str + :param invite_org_member_endpoint_input: The invitee email and role. (required) + :type invite_org_member_endpoint_input: InviteOrgMemberEndpointInput + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._organizations_organization_id_invitations_post_serialize( + organization_id=organization_id, + invite_org_member_endpoint_input=invite_org_member_endpoint_input, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "InviteOrgMemberEndpointOutput", + '400': "ValidationProblemDetails", + '401': None, + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def organizations_organization_id_invitations_post_without_preload_content( + self, + organization_id: Annotated[StrictStr, Field(description="The id of the organization to invite into.")], + invite_org_member_endpoint_input: Annotated[InviteOrgMemberEndpointInput, Field(description="The invitee email and role.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Creates an invitation to join the organization. + + Returns a single-use token the invitee presents to the accept-invitation endpoint. + + :param organization_id: The id of the organization to invite into. (required) + :type organization_id: str + :param invite_org_member_endpoint_input: The invitee email and role. (required) + :type invite_org_member_endpoint_input: InviteOrgMemberEndpointInput + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._organizations_organization_id_invitations_post_serialize( + organization_id=organization_id, + invite_org_member_endpoint_input=invite_org_member_endpoint_input, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "InviteOrgMemberEndpointOutput", + '400': "ValidationProblemDetails", + '401': None, + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _organizations_organization_id_invitations_post_serialize( + self, + organization_id, + invite_org_member_endpoint_input, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if organization_id is not None: + _path_params['organizationId'] = organization_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if invite_org_member_endpoint_input is not None: + _body_params = invite_org_member_endpoint_input + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OpenIdConnect' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/organizations/{organizationId}/invitations', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def organizations_organization_id_members_customer_id_delete( + self, + organization_id: Annotated[StrictStr, Field(description="The id of the organization.")], + customer_id: Annotated[UUID, Field(description="The id of the customer to remove.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Removes the given customer's membership from the organization. + + Responds with 404 when the customer is not a member and 409 when removing the organization's last owner. + + :param organization_id: The id of the organization. (required) + :type organization_id: str + :param customer_id: The id of the customer to remove. (required) + :type customer_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._organizations_organization_id_members_customer_id_delete_serialize( + organization_id=organization_id, + customer_id=customer_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "ValidationProblemDetails", + '401': None, + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def organizations_organization_id_members_customer_id_delete_with_http_info( + self, + organization_id: Annotated[StrictStr, Field(description="The id of the organization.")], + customer_id: Annotated[UUID, Field(description="The id of the customer to remove.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Removes the given customer's membership from the organization. + + Responds with 404 when the customer is not a member and 409 when removing the organization's last owner. + + :param organization_id: The id of the organization. (required) + :type organization_id: str + :param customer_id: The id of the customer to remove. (required) + :type customer_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._organizations_organization_id_members_customer_id_delete_serialize( + organization_id=organization_id, + customer_id=customer_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "ValidationProblemDetails", + '401': None, + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def organizations_organization_id_members_customer_id_delete_without_preload_content( + self, + organization_id: Annotated[StrictStr, Field(description="The id of the organization.")], + customer_id: Annotated[UUID, Field(description="The id of the customer to remove.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Removes the given customer's membership from the organization. + + Responds with 404 when the customer is not a member and 409 when removing the organization's last owner. + + :param organization_id: The id of the organization. (required) + :type organization_id: str + :param customer_id: The id of the customer to remove. (required) + :type customer_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._organizations_organization_id_members_customer_id_delete_serialize( + organization_id=organization_id, + customer_id=customer_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "ValidationProblemDetails", + '401': None, + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _organizations_organization_id_members_customer_id_delete_serialize( + self, + organization_id, + customer_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if organization_id is not None: + _path_params['organizationId'] = organization_id + if customer_id is not None: + _path_params['customerId'] = customer_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OpenIdConnect' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/organizations/{organizationId}/members/{customerId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def organizations_organization_id_members_get( + self, + organization_id: Annotated[StrictStr, Field(description="The id of the organization whose members to list.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ListOrgMembersEndpointOutput: + """Returns the members of the given organization. + + + :param organization_id: The id of the organization whose members to list. (required) + :type organization_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._organizations_organization_id_members_get_serialize( + organization_id=organization_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListOrgMembersEndpointOutput", + '400': "ValidationProblemDetails", + '401': None, + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def organizations_organization_id_members_get_with_http_info( + self, + organization_id: Annotated[StrictStr, Field(description="The id of the organization whose members to list.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ListOrgMembersEndpointOutput]: + """Returns the members of the given organization. + + + :param organization_id: The id of the organization whose members to list. (required) + :type organization_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._organizations_organization_id_members_get_serialize( + organization_id=organization_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListOrgMembersEndpointOutput", + '400': "ValidationProblemDetails", + '401': None, + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def organizations_organization_id_members_get_without_preload_content( + self, + organization_id: Annotated[StrictStr, Field(description="The id of the organization whose members to list.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Returns the members of the given organization. + + + :param organization_id: The id of the organization whose members to list. (required) + :type organization_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._organizations_organization_id_members_get_serialize( + organization_id=organization_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListOrgMembersEndpointOutput", + '400': "ValidationProblemDetails", + '401': None, + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _organizations_organization_id_members_get_serialize( + self, + organization_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if organization_id is not None: + _path_params['organizationId'] = organization_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OpenIdConnect' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/organizations/{organizationId}/members', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def organizations_owner_support_slack_channel_put( + self, + owner: Annotated[UUID, Field(description="The customer ID that owns the organization.")], + set_organization_support_slack_channel_endpoint_input: Annotated[SetOrganizationSupportSlackChannelEndpointInput, Field(description="The support Slack channel URL to set or clear.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Sets the support Slack channel URL for the organization owned by the given customer. + + A null or empty URL clears the channel. Responds with 404 when no organization is owned by the given customer. + + :param owner: The customer ID that owns the organization. (required) + :type owner: UUID :param set_organization_support_slack_channel_endpoint_input: The support Slack channel URL to set or clear. (required) :type set_organization_support_slack_channel_endpoint_input: SetOrganizationSupportSlackChannelEndpointInput :param _request_timeout: timeout setting for this request. If one @@ -998,3 +2406,286 @@ def _organizations_owner_support_slack_channel_put_serialize( ) + + + @validate_call + def organizations_post( + self, + create_organization_endpoint_input: Annotated[CreateOrganizationEndpointInput, Field(description="The organization to create.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> CreateOrganizationEndpointOutput: + """Creates an organization and makes the calling customer its owner. + + The calling customer becomes both the owner and the billing customer. Responds with 400 when the slug is already taken. + + :param create_organization_endpoint_input: The organization to create. (required) + :type create_organization_endpoint_input: CreateOrganizationEndpointInput + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._organizations_post_serialize( + create_organization_endpoint_input=create_organization_endpoint_input, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CreateOrganizationEndpointOutput", + '400': "ValidationProblemDetails", + '401': None, + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def organizations_post_with_http_info( + self, + create_organization_endpoint_input: Annotated[CreateOrganizationEndpointInput, Field(description="The organization to create.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[CreateOrganizationEndpointOutput]: + """Creates an organization and makes the calling customer its owner. + + The calling customer becomes both the owner and the billing customer. Responds with 400 when the slug is already taken. + + :param create_organization_endpoint_input: The organization to create. (required) + :type create_organization_endpoint_input: CreateOrganizationEndpointInput + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._organizations_post_serialize( + create_organization_endpoint_input=create_organization_endpoint_input, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CreateOrganizationEndpointOutput", + '400': "ValidationProblemDetails", + '401': None, + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def organizations_post_without_preload_content( + self, + create_organization_endpoint_input: Annotated[CreateOrganizationEndpointInput, Field(description="The organization to create.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Creates an organization and makes the calling customer its owner. + + The calling customer becomes both the owner and the billing customer. Responds with 400 when the slug is already taken. + + :param create_organization_endpoint_input: The organization to create. (required) + :type create_organization_endpoint_input: CreateOrganizationEndpointInput + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._organizations_post_serialize( + create_organization_endpoint_input=create_organization_endpoint_input, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CreateOrganizationEndpointOutput", + '400': "ValidationProblemDetails", + '401': None, + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _organizations_post_serialize( + self, + create_organization_endpoint_input, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if create_organization_endpoint_input is not None: + _body_params = create_organization_endpoint_input + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OpenIdConnect' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/organizations', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/src/rapidata/api_client/api/rapid_api.py b/src/rapidata/api_client/api/rapid_api.py index 1e594dca6..5d3a34192 100644 --- a/src/rapidata/api_client/api/rapid_api.py +++ b/src/rapidata/api_client/api/rapid_api.py @@ -39,6 +39,276 @@ def __init__(self, api_client=None) -> None: self.api_client = api_client + @validate_call + def rapid_compare_ab_summary_correlation_id_recalculate_post( + self, + correlation_id: Annotated[StrictStr, Field(description="The correlation (workflow) id to recalculate.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Recalculates the compare AB summary counters of a correlation from scratch. + + Admin-only verification/repair tool. The counters are normally maintained by rapid completion and rejection events; this overwrites them with freshly aggregated values. + + :param correlation_id: The correlation (workflow) id to recalculate. (required) + :type correlation_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._rapid_compare_ab_summary_correlation_id_recalculate_post_serialize( + correlation_id=correlation_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "ValidationProblemDetails", + '401': None, + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def rapid_compare_ab_summary_correlation_id_recalculate_post_with_http_info( + self, + correlation_id: Annotated[StrictStr, Field(description="The correlation (workflow) id to recalculate.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Recalculates the compare AB summary counters of a correlation from scratch. + + Admin-only verification/repair tool. The counters are normally maintained by rapid completion and rejection events; this overwrites them with freshly aggregated values. + + :param correlation_id: The correlation (workflow) id to recalculate. (required) + :type correlation_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._rapid_compare_ab_summary_correlation_id_recalculate_post_serialize( + correlation_id=correlation_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "ValidationProblemDetails", + '401': None, + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def rapid_compare_ab_summary_correlation_id_recalculate_post_without_preload_content( + self, + correlation_id: Annotated[StrictStr, Field(description="The correlation (workflow) id to recalculate.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Recalculates the compare AB summary counters of a correlation from scratch. + + Admin-only verification/repair tool. The counters are normally maintained by rapid completion and rejection events; this overwrites them with freshly aggregated values. + + :param correlation_id: The correlation (workflow) id to recalculate. (required) + :type correlation_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._rapid_compare_ab_summary_correlation_id_recalculate_post_serialize( + correlation_id=correlation_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "ValidationProblemDetails", + '401': None, + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _rapid_compare_ab_summary_correlation_id_recalculate_post_serialize( + self, + correlation_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if correlation_id is not None: + _path_params['correlationId'] = correlation_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OpenIdConnect' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/rapid/compare-ab-summary/{correlationId}/recalculate', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def rapid_rapid_id_navigation_get( self, diff --git a/src/rapidata/api_client/models/accept_org_invitation_endpoint_input.py b/src/rapidata/api_client/models/accept_org_invitation_endpoint_input.py new file mode 100644 index 000000000..d291ecd6b --- /dev/null +++ b/src/rapidata/api_client/models/accept_org_invitation_endpoint_input.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Rapidata Asset API + + The API for the Rapidata Asset service + + The version of the OpenAPI document: v1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from pydantic import ValidationError +from rapidata.api_client.lazy_model import LazyValidatedModel +from typing import Optional, Set +from typing_extensions import Self + +class AcceptOrgInvitationEndpointInput(LazyValidatedModel): + """ + AcceptOrgInvitationEndpointInput + """ # noqa: E501 + token: StrictStr = Field(description="The single-use invitation token.") + __properties: ClassVar[List[str]] = ["token"] + + # model_config is inherited from LazyValidatedModel + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AcceptOrgInvitationEndpointInput from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AcceptOrgInvitationEndpointInput from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _data = { + "token": obj.get("token") + } + try: + _obj = cls.model_validate(_data) + except ValidationError as _val_error: + _obj = cls._lazy_construct(_data, _val_error) + return _obj + + diff --git a/src/rapidata/api_client/models/accept_org_invitation_endpoint_output.py b/src/rapidata/api_client/models/accept_org_invitation_endpoint_output.py new file mode 100644 index 000000000..43d694713 --- /dev/null +++ b/src/rapidata/api_client/models/accept_org_invitation_endpoint_output.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Rapidata Asset API + + The API for the Rapidata Asset service + + The version of the OpenAPI document: v1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from pydantic import ValidationError +from rapidata.api_client.lazy_model import LazyValidatedModel +from typing import Optional, Set +from typing_extensions import Self + +class AcceptOrgInvitationEndpointOutput(LazyValidatedModel): + """ + AcceptOrgInvitationEndpointOutput + """ # noqa: E501 + organization_id: StrictStr = Field(description="The organization the customer joined.", alias="organizationId") + membership_id: StrictStr = Field(description="The id of the created membership.", alias="membershipId") + __properties: ClassVar[List[str]] = ["organizationId", "membershipId"] + + # model_config is inherited from LazyValidatedModel + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AcceptOrgInvitationEndpointOutput from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AcceptOrgInvitationEndpointOutput from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _data = { + "organizationId": obj.get("organizationId"), + "membershipId": obj.get("membershipId") + } + try: + _obj = cls.model_validate(_data) + except ValidationError as _val_error: + _obj = cls._lazy_construct(_data, _val_error) + return _obj + + diff --git a/src/rapidata/api_client/models/create_job_endpoint_cost_warning_model.py b/src/rapidata/api_client/models/create_job_endpoint_cost_warning_model.py new file mode 100644 index 000000000..998e77fe7 --- /dev/null +++ b/src/rapidata/api_client/models/create_job_endpoint_cost_warning_model.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Rapidata Asset API + + The API for the Rapidata Asset service + + The version of the OpenAPI document: v1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from pydantic import ValidationError +from rapidata.api_client.lazy_model import LazyValidatedModel +from typing import Optional, Set +from typing_extensions import Self + +class CreateJobEndpointCostWarningModel(LazyValidatedModel): + """ + CreateJobEndpointCostWarningModel + """ # noqa: E501 + estimated_cost: Union[StrictFloat, StrictInt] = Field(alias="estimatedCost") + available_balance: Union[StrictFloat, StrictInt] = Field(alias="availableBalance") + shortfall: Union[StrictFloat, StrictInt] + __properties: ClassVar[List[str]] = ["estimatedCost", "availableBalance", "shortfall"] + + # model_config is inherited from LazyValidatedModel + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateJobEndpointCostWarningModel from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateJobEndpointCostWarningModel from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _data = { + "estimatedCost": obj.get("estimatedCost"), + "availableBalance": obj.get("availableBalance"), + "shortfall": obj.get("shortfall") + } + try: + _obj = cls.model_validate(_data) + except ValidationError as _val_error: + _obj = cls._lazy_construct(_data, _val_error) + return _obj + + diff --git a/src/rapidata/api_client/models/create_job_endpoint_output.py b/src/rapidata/api_client/models/create_job_endpoint_output.py index 2fac5afc5..9bfd2f94e 100644 --- a/src/rapidata/api_client/models/create_job_endpoint_output.py +++ b/src/rapidata/api_client/models/create_job_endpoint_output.py @@ -17,7 +17,8 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional +from rapidata.api_client.models.create_job_endpoint_cost_warning_model import CreateJobEndpointCostWarningModel from pydantic import ValidationError from rapidata.api_client.lazy_model import LazyValidatedModel from typing import Optional, Set @@ -29,7 +30,8 @@ class CreateJobEndpointOutput(LazyValidatedModel): """ # noqa: E501 job_id: StrictStr = Field(description="The id of the created job.", alias="jobId") recruiting_started: StrictBool = Field(description="Whether recruiting was automatically started for the audience.", alias="recruitingStarted") - __properties: ClassVar[List[str]] = ["jobId", "recruitingStarted"] + cost_warning: Optional[CreateJobEndpointCostWarningModel] = Field(default=None, description="Present only when the job's estimated cost exceeds the owner's remaining balance. Advisory — the job is created and runs regardless; it may pause for funds mid-run.", alias="costWarning") + __properties: ClassVar[List[str]] = ["jobId", "recruitingStarted", "costWarning"] # model_config is inherited from LazyValidatedModel @@ -66,6 +68,9 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of cost_warning + if self.cost_warning: + _dict['costWarning'] = self.cost_warning.to_dict() return _dict @classmethod @@ -79,7 +84,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _data = { "jobId": obj.get("jobId"), - "recruitingStarted": obj.get("recruitingStarted") + "recruitingStarted": obj.get("recruitingStarted"), + "costWarning": CreateJobEndpointCostWarningModel.from_dict(obj["costWarning"]) if obj.get("costWarning") is not None else None } try: _obj = cls.model_validate(_data) diff --git a/src/rapidata/api_client/models/create_organization_endpoint_input.py b/src/rapidata/api_client/models/create_organization_endpoint_input.py new file mode 100644 index 000000000..2bb259f22 --- /dev/null +++ b/src/rapidata/api_client/models/create_organization_endpoint_input.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Rapidata Asset API + + The API for the Rapidata Asset service + + The version of the OpenAPI document: v1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from pydantic import ValidationError +from rapidata.api_client.lazy_model import LazyValidatedModel +from typing import Optional, Set +from typing_extensions import Self + +class CreateOrganizationEndpointInput(LazyValidatedModel): + """ + CreateOrganizationEndpointInput + """ # noqa: E501 + name: StrictStr = Field(description="The human-readable name of the organization.") + slug: StrictStr = Field(description="A URL-safe unique identifier for the organization.") + primary_domain: Optional[StrictStr] = Field(default=None, description="The primary email domain associated with the organization, if any.", alias="primaryDomain") + __properties: ClassVar[List[str]] = ["name", "slug", "primaryDomain"] + + # model_config is inherited from LazyValidatedModel + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateOrganizationEndpointInput from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if primary_domain (nullable) is None + # and model_fields_set contains the field + if self.primary_domain is None and "primary_domain" in self.model_fields_set: + _dict['primaryDomain'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateOrganizationEndpointInput from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _data = { + "name": obj.get("name"), + "slug": obj.get("slug"), + "primaryDomain": obj.get("primaryDomain") + } + try: + _obj = cls.model_validate(_data) + except ValidationError as _val_error: + _obj = cls._lazy_construct(_data, _val_error) + return _obj + + diff --git a/src/rapidata/api_client/models/create_organization_endpoint_output.py b/src/rapidata/api_client/models/create_organization_endpoint_output.py new file mode 100644 index 000000000..367ba5ab2 --- /dev/null +++ b/src/rapidata/api_client/models/create_organization_endpoint_output.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Rapidata Asset API + + The API for the Rapidata Asset service + + The version of the OpenAPI document: v1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from pydantic import ValidationError +from rapidata.api_client.lazy_model import LazyValidatedModel +from typing import Optional, Set +from typing_extensions import Self + +class CreateOrganizationEndpointOutput(LazyValidatedModel): + """ + CreateOrganizationEndpointOutput + """ # noqa: E501 + organization_id: StrictStr = Field(description="The id of the created organization.", alias="organizationId") + __properties: ClassVar[List[str]] = ["organizationId"] + + # model_config is inherited from LazyValidatedModel + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateOrganizationEndpointOutput from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateOrganizationEndpointOutput from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _data = { + "organizationId": obj.get("organizationId") + } + try: + _obj = cls.model_validate(_data) + except ValidationError as _val_error: + _obj = cls._lazy_construct(_data, _val_error) + return _obj + + diff --git a/src/rapidata/api_client/models/get_job_by_id_endpoint_output.py b/src/rapidata/api_client/models/get_job_by_id_endpoint_output.py index 2a046211f..403636f72 100644 --- a/src/rapidata/api_client/models/get_job_by_id_endpoint_output.py +++ b/src/rapidata/api_client/models/get_job_by_id_endpoint_output.py @@ -21,6 +21,7 @@ from typing import Any, ClassVar, Dict, List, Optional from uuid import UUID from rapidata.api_client.models.audience_job_state import AudienceJobState +from rapidata.api_client.models.review_reason_model import ReviewReasonModel from pydantic import ValidationError from rapidata.api_client.lazy_model import LazyValidatedModel from typing import Optional, Set @@ -43,10 +44,11 @@ class GetJobByIdEndpointOutput(LazyValidatedModel): result_file_name: Optional[StrictStr] = Field(default=None, description="The file name of the result.", alias="resultFileName") failed_at: Optional[datetime] = Field(default=None, description="The timestamp when the job failed.", alias="failedAt") failure_message: Optional[StrictStr] = Field(default=None, description="The failure message.", alias="failureMessage") + review_reason: Optional[ReviewReasonModel] = Field(default=None, description="Why the job was routed to manual review, when it is (or was) in ManualApproval. Null when no customer-facing reason applies.", alias="reviewReason") created_at: datetime = Field(description="The creation timestamp.", alias="createdAt") owner_id: UUID = Field(description="The owner id.", alias="ownerId") owner_mail: StrictStr = Field(description="The owner email.", alias="ownerMail") - __properties: ClassVar[List[str]] = ["jobId", "name", "definitionId", "audienceId", "revisionNumber", "pipelineId", "state", "isPublic", "audienceDeleted", "completedAt", "resultFileName", "failedAt", "failureMessage", "createdAt", "ownerId", "ownerMail"] + __properties: ClassVar[List[str]] = ["jobId", "name", "definitionId", "audienceId", "revisionNumber", "pipelineId", "state", "isPublic", "audienceDeleted", "completedAt", "resultFileName", "failedAt", "failureMessage", "reviewReason", "createdAt", "ownerId", "ownerMail"] # model_config is inherited from LazyValidatedModel @@ -128,6 +130,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "resultFileName": obj.get("resultFileName"), "failedAt": obj.get("failedAt"), "failureMessage": obj.get("failureMessage"), + "reviewReason": obj.get("reviewReason"), "createdAt": obj.get("createdAt"), "ownerId": obj.get("ownerId"), "ownerMail": obj.get("ownerMail") diff --git a/src/rapidata/api_client/models/get_organization_endpoint_output.py b/src/rapidata/api_client/models/get_organization_endpoint_output.py new file mode 100644 index 000000000..eb001e3a8 --- /dev/null +++ b/src/rapidata/api_client/models/get_organization_endpoint_output.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + Rapidata Asset API + + The API for the Rapidata Asset service + + The version of the OpenAPI document: v1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from uuid import UUID +from pydantic import ValidationError +from rapidata.api_client.lazy_model import LazyValidatedModel +from typing import Optional, Set +from typing_extensions import Self + +class GetOrganizationEndpointOutput(LazyValidatedModel): + """ + GetOrganizationEndpointOutput + """ # noqa: E501 + id: StrictStr = Field(description="The id of the organization.") + name: StrictStr = Field(description="The human-readable name of the organization.") + slug: StrictStr = Field(description="The URL-safe unique identifier of the organization.") + billing_customer_id: UUID = Field(description="The customer that owns billing for the organization.", alias="billingCustomerId") + primary_domain: Optional[StrictStr] = Field(description="The primary email domain associated with the organization, if any.", alias="primaryDomain") + __properties: ClassVar[List[str]] = ["id", "name", "slug", "billingCustomerId", "primaryDomain"] + + # model_config is inherited from LazyValidatedModel + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetOrganizationEndpointOutput from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if primary_domain (nullable) is None + # and model_fields_set contains the field + if self.primary_domain is None and "primary_domain" in self.model_fields_set: + _dict['primaryDomain'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GetOrganizationEndpointOutput from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _data = { + "id": obj.get("id"), + "name": obj.get("name"), + "slug": obj.get("slug"), + "billingCustomerId": obj.get("billingCustomerId"), + "primaryDomain": obj.get("primaryDomain") + } + try: + _obj = cls.model_validate(_data) + except ValidationError as _val_error: + _obj = cls._lazy_construct(_data, _val_error) + return _obj + + diff --git a/src/rapidata/api_client/models/invite_org_member_endpoint_input.py b/src/rapidata/api_client/models/invite_org_member_endpoint_input.py new file mode 100644 index 000000000..b8a3182d9 --- /dev/null +++ b/src/rapidata/api_client/models/invite_org_member_endpoint_input.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Rapidata Asset API + + The API for the Rapidata Asset service + + The version of the OpenAPI document: v1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from rapidata.api_client.models.org_role import OrgRole +from pydantic import ValidationError +from rapidata.api_client.lazy_model import LazyValidatedModel +from typing import Optional, Set +from typing_extensions import Self + +class InviteOrgMemberEndpointInput(LazyValidatedModel): + """ + InviteOrgMemberEndpointInput + """ # noqa: E501 + email: StrictStr = Field(description="The email address to invite.") + role: OrgRole = Field(description="The org-scoped role the resulting membership will confer.") + __properties: ClassVar[List[str]] = ["email", "role"] + + # model_config is inherited from LazyValidatedModel + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InviteOrgMemberEndpointInput from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InviteOrgMemberEndpointInput from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _data = { + "email": obj.get("email"), + "role": obj.get("role") + } + try: + _obj = cls.model_validate(_data) + except ValidationError as _val_error: + _obj = cls._lazy_construct(_data, _val_error) + return _obj + + diff --git a/src/rapidata/api_client/models/invite_org_member_endpoint_output.py b/src/rapidata/api_client/models/invite_org_member_endpoint_output.py new file mode 100644 index 000000000..edfbff81d --- /dev/null +++ b/src/rapidata/api_client/models/invite_org_member_endpoint_output.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Rapidata Asset API + + The API for the Rapidata Asset service + + The version of the OpenAPI document: v1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from pydantic import ValidationError +from rapidata.api_client.lazy_model import LazyValidatedModel +from typing import Optional, Set +from typing_extensions import Self + +class InviteOrgMemberEndpointOutput(LazyValidatedModel): + """ + InviteOrgMemberEndpointOutput + """ # noqa: E501 + invitation_id: StrictStr = Field(description="The id of the created invitation.", alias="invitationId") + token: StrictStr = Field(description="The single-use token used to accept the invitation.") + expires_at: datetime = Field(description="The instant after which the invitation can no longer be accepted.", alias="expiresAt") + __properties: ClassVar[List[str]] = ["invitationId", "token", "expiresAt"] + + # model_config is inherited from LazyValidatedModel + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InviteOrgMemberEndpointOutput from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InviteOrgMemberEndpointOutput from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _data = { + "invitationId": obj.get("invitationId"), + "token": obj.get("token"), + "expiresAt": obj.get("expiresAt") + } + try: + _obj = cls.model_validate(_data) + except ValidationError as _val_error: + _obj = cls._lazy_construct(_data, _val_error) + return _obj + + diff --git a/src/rapidata/api_client/models/list_org_members_endpoint_output.py b/src/rapidata/api_client/models/list_org_members_endpoint_output.py new file mode 100644 index 000000000..2e10e775d --- /dev/null +++ b/src/rapidata/api_client/models/list_org_members_endpoint_output.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + Rapidata Asset API + + The API for the Rapidata Asset service + + The version of the OpenAPI document: v1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from rapidata.api_client.models.list_org_members_endpoint_output_member import ListOrgMembersEndpointOutputMember +from pydantic import ValidationError +from rapidata.api_client.lazy_model import LazyValidatedModel +from typing import Optional, Set +from typing_extensions import Self + +class ListOrgMembersEndpointOutput(LazyValidatedModel): + """ + ListOrgMembersEndpointOutput + """ # noqa: E501 + members: List[ListOrgMembersEndpointOutputMember] + __properties: ClassVar[List[str]] = ["members"] + + # model_config is inherited from LazyValidatedModel + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ListOrgMembersEndpointOutput from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in members (list) + _items = [] + if self.members: + for _item_members in self.members: + if _item_members: + _items.append(_item_members.to_dict()) + _dict['members'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ListOrgMembersEndpointOutput from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _data = { + "members": [ListOrgMembersEndpointOutputMember.from_dict(_item) for _item in obj["members"]] if obj.get("members") is not None else None + } + try: + _obj = cls.model_validate(_data) + except ValidationError as _val_error: + _obj = cls._lazy_construct(_data, _val_error) + return _obj + + diff --git a/src/rapidata/api_client/models/list_org_members_endpoint_output_member.py b/src/rapidata/api_client/models/list_org_members_endpoint_output_member.py new file mode 100644 index 000000000..311bf505e --- /dev/null +++ b/src/rapidata/api_client/models/list_org_members_endpoint_output_member.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + Rapidata Asset API + + The API for the Rapidata Asset service + + The version of the OpenAPI document: v1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from uuid import UUID +from rapidata.api_client.models.membership_status import MembershipStatus +from rapidata.api_client.models.org_role import OrgRole +from pydantic import ValidationError +from rapidata.api_client.lazy_model import LazyValidatedModel +from typing import Optional, Set +from typing_extensions import Self + +class ListOrgMembersEndpointOutputMember(LazyValidatedModel): + """ + ListOrgMembersEndpointOutputMember + """ # noqa: E501 + customer_id: UUID = Field(alias="customerId") + email: Optional[StrictStr] + role: OrgRole + status: MembershipStatus + __properties: ClassVar[List[str]] = ["customerId", "email", "role", "status"] + + # model_config is inherited from LazyValidatedModel + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ListOrgMembersEndpointOutputMember from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if email (nullable) is None + # and model_fields_set contains the field + if self.email is None and "email" in self.model_fields_set: + _dict['email'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ListOrgMembersEndpointOutputMember from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _data = { + "customerId": obj.get("customerId"), + "email": obj.get("email"), + "role": obj.get("role"), + "status": obj.get("status") + } + try: + _obj = cls.model_validate(_data) + except ValidationError as _val_error: + _obj = cls._lazy_construct(_data, _val_error) + return _obj + + diff --git a/src/rapidata/api_client/models/membership_status.py b/src/rapidata/api_client/models/membership_status.py new file mode 100644 index 000000000..cd1a40d27 --- /dev/null +++ b/src/rapidata/api_client/models/membership_status.py @@ -0,0 +1,35 @@ +# coding: utf-8 + +""" + Rapidata Asset API + + The API for the Rapidata Asset service + + The version of the OpenAPI document: v1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class MembershipStatus(str, Enum): + """ + MembershipStatus + """ + + """ + allowed enum values + """ + ACTIVE = 'Active' + SUSPENDED = 'Suspended' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of MembershipStatus from a JSON string""" + return cls(json.loads(json_str)) + diff --git a/src/rapidata/api_client/models/org_role.py b/src/rapidata/api_client/models/org_role.py new file mode 100644 index 000000000..2bbcee0d3 --- /dev/null +++ b/src/rapidata/api_client/models/org_role.py @@ -0,0 +1,37 @@ +# coding: utf-8 + +""" + Rapidata Asset API + + The API for the Rapidata Asset service + + The version of the OpenAPI document: v1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class OrgRole(str, Enum): + """ + OrgRole + """ + + """ + allowed enum values + """ + OWNER = 'Owner' + ADMIN = 'Admin' + EDITOR = 'Editor' + VIEWER = 'Viewer' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of OrgRole from a JSON string""" + return cls(json.loads(json_str)) + diff --git a/src/rapidata/api_client/models/review_reason_model.py b/src/rapidata/api_client/models/review_reason_model.py new file mode 100644 index 000000000..f9efa0b99 --- /dev/null +++ b/src/rapidata/api_client/models/review_reason_model.py @@ -0,0 +1,37 @@ +# coding: utf-8 + +""" + Rapidata Asset API + + The API for the Rapidata Asset service + + The version of the OpenAPI document: v1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class ReviewReasonModel(str, Enum): + """ + ReviewReasonModel + """ + + """ + allowed enum values + """ + CONTENTFLAGGED = 'ContentFlagged' + UNSUPPORTEDCONTENTTYPE = 'UnsupportedContentType' + CHECKERRORED = 'CheckErrored' + CLASSIFICATIONTIMEDOUT = 'ClassificationTimedOut' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of ReviewReasonModel from a JSON string""" + return cls(json.loads(json_str)) + diff --git a/src/rapidata/api_client_README.md b/src/rapidata/api_client_README.md index 0694e09e8..2188dc96e 100644 --- a/src/rapidata/api_client_README.md +++ b/src/rapidata/api_client_README.md @@ -255,7 +255,6 @@ Class | Method | HTTP request | Description *JobApi* | [**job_post**](rapidata/api_client/docs/JobApi.md#job_post) | **POST** /job | Creates a new job from a job definition and audience. *JobApi* | [**jobs_aggregated_overview_get**](rapidata/api_client/docs/JobApi.md#jobs_aggregated_overview_get) | **GET** /jobs/aggregated-overview | Retrieves jobs aggregated by customer with total counts and most recent job information. *JobApi* | [**jobs_get**](rapidata/api_client/docs/JobApi.md#jobs_get) | **GET** /jobs | Queries jobs visible to the caller. -*LeaderboardApi* | [**benchmark_standing_leaderboard_id_participant_id_get**](rapidata/api_client/docs/LeaderboardApi.md#benchmark_standing_leaderboard_id_participant_id_get) | **GET** /benchmark/standing/{leaderboardId}/{participantId} | Gets a standing by leaderboard id and participant id. *LeaderboardApi* | [**leaderboard_combined_matrix_query_get**](rapidata/api_client/docs/LeaderboardApi.md#leaderboard_combined_matrix_query_get) | **GET** /leaderboard/combined-matrix/query | Queries the combined win matrix of multiple leaderboards. *LeaderboardApi* | [**leaderboard_combined_standings_query_get**](rapidata/api_client/docs/LeaderboardApi.md#leaderboard_combined_standings_query_get) | **GET** /leaderboard/combined-standings/query | Queries the combined standings of multiple leaderboards. *LeaderboardApi* | [**leaderboard_leaderboard_id_boost_post**](rapidata/api_client/docs/LeaderboardApi.md#leaderboard_leaderboard_id_boost_post) | **POST** /leaderboard/{leaderboardId}/boost | Boosts a subset of participants within a leaderboard. @@ -263,7 +262,6 @@ Class | Method | HTTP request | Description *LeaderboardApi* | [**leaderboard_leaderboard_id_get**](rapidata/api_client/docs/LeaderboardApi.md#leaderboard_leaderboard_id_get) | **GET** /leaderboard/{leaderboardId} | Gets a leaderboard by its id. *LeaderboardApi* | [**leaderboard_leaderboard_id_matrix_query_get**](rapidata/api_client/docs/LeaderboardApi.md#leaderboard_leaderboard_id_matrix_query_get) | **GET** /leaderboard/{leaderboardId}/matrix/query | Queries the win matrix of a leaderboard. *LeaderboardApi* | [**leaderboard_leaderboard_id_name_put**](rapidata/api_client/docs/LeaderboardApi.md#leaderboard_leaderboard_id_name_put) | **PUT** /leaderboard/{leaderboardId}/name | Updates the name of a leaderboard. -*LeaderboardApi* | [**leaderboard_leaderboard_id_participant_participant_id_get**](rapidata/api_client/docs/LeaderboardApi.md#leaderboard_leaderboard_id_participant_participant_id_get) | **GET** /leaderboard/{leaderboardId}/participant/{participantId} | Gets a participant by its id. *LeaderboardApi* | [**leaderboard_leaderboard_id_participants_get**](rapidata/api_client/docs/LeaderboardApi.md#leaderboard_leaderboard_id_participants_get) | **GET** /leaderboard/{leaderboardId}/participants | Queries all participants connected to a leaderboard. *LeaderboardApi* | [**leaderboard_leaderboard_id_participants_participant_id_submit_post**](rapidata/api_client/docs/LeaderboardApi.md#leaderboard_leaderboard_id_participants_participant_id_submit_post) | **POST** /leaderboard/{leaderboardId}/participants/{participantId}/submit | Submits a participant to a leaderboard. *LeaderboardApi* | [**leaderboard_leaderboard_id_participants_post**](rapidata/api_client/docs/LeaderboardApi.md#leaderboard_leaderboard_id_participants_post) | **POST** /leaderboard/{leaderboardId}/participants | Creates a participant in a leaderboard. @@ -297,9 +295,15 @@ Class | Method | HTTP request | Description *OrderApi* | [**orders_aggregated_overview_get**](rapidata/api_client/docs/OrderApi.md#orders_aggregated_overview_get) | **GET** /orders/aggregated-overview | Retrieves orders aggregated by customer with total amounts and most recent order information. *OrderApi* | [**orders_get**](rapidata/api_client/docs/OrderApi.md#orders_get) | **GET** /orders | Queries orders with filtering and pagination. *OrderApi* | [**orders_public_get**](rapidata/api_client/docs/OrderApi.md#orders_public_get) | **GET** /orders/public | Retrieves all publicly available orders. +*OrganizationApi* | [**organizations_accept_invitation_post**](rapidata/api_client/docs/OrganizationApi.md#organizations_accept_invitation_post) | **POST** /organizations/accept-invitation | Accepts the invitation identified by the token. *OrganizationApi* | [**organizations_get**](rapidata/api_client/docs/OrganizationApi.md#organizations_get) | **GET** /organizations | Returns a paged list of organizations. *OrganizationApi* | [**organizations_mine_get**](rapidata/api_client/docs/OrganizationApi.md#organizations_mine_get) | **GET** /organizations/mine | Returns the organization resolved from the calling customer's email domain. +*OrganizationApi* | [**organizations_organization_id_get**](rapidata/api_client/docs/OrganizationApi.md#organizations_organization_id_get) | **GET** /organizations/{organizationId} | Returns the organization with the given id. +*OrganizationApi* | [**organizations_organization_id_invitations_post**](rapidata/api_client/docs/OrganizationApi.md#organizations_organization_id_invitations_post) | **POST** /organizations/{organizationId}/invitations | Creates an invitation to join the organization. +*OrganizationApi* | [**organizations_organization_id_members_customer_id_delete**](rapidata/api_client/docs/OrganizationApi.md#organizations_organization_id_members_customer_id_delete) | **DELETE** /organizations/{organizationId}/members/{customerId} | Removes the given customer's membership from the organization. +*OrganizationApi* | [**organizations_organization_id_members_get**](rapidata/api_client/docs/OrganizationApi.md#organizations_organization_id_members_get) | **GET** /organizations/{organizationId}/members | Returns the members of the given organization. *OrganizationApi* | [**organizations_owner_support_slack_channel_put**](rapidata/api_client/docs/OrganizationApi.md#organizations_owner_support_slack_channel_put) | **PUT** /organizations/{owner}/support-slack-channel | Sets the support Slack channel URL for the organization owned by the given customer. +*OrganizationApi* | [**organizations_post**](rapidata/api_client/docs/OrganizationApi.md#organizations_post) | **POST** /organizations | Creates an organization and makes the calling customer its owner. *ParticipantApi* | [**participant_participant_id_delete**](rapidata/api_client/docs/ParticipantApi.md#participant_participant_id_delete) | **DELETE** /participant/{participantId} | Deletes a participant. *ParticipantApi* | [**participant_participant_id_disable_post**](rapidata/api_client/docs/ParticipantApi.md#participant_participant_id_disable_post) | **POST** /participant/{participantId}/disable | Disables a participant in a benchmark. *ParticipantApi* | [**participant_participant_id_enable_post**](rapidata/api_client/docs/ParticipantApi.md#participant_participant_id_enable_post) | **POST** /participant/{participantId}/enable | Enables a previously disabled participant in a benchmark. @@ -329,6 +333,7 @@ Class | Method | HTTP request | Description *RankingFlowItemApi* | [**flow_ranking_item_flow_item_id_get**](rapidata/api_client/docs/RankingFlowItemApi.md#flow_ranking_item_flow_item_id_get) | **GET** /flow/ranking/item/{flowItemId} | Retrieves a flow item by its ID. *RankingFlowItemApi* | [**flow_ranking_item_flow_item_id_results_get**](rapidata/api_client/docs/RankingFlowItemApi.md#flow_ranking_item_flow_item_id_results_get) | **GET** /flow/ranking/item/{flowItemId}/results | Returns ranking results with Elo scores for a completed flow item. *RankingFlowItemApi* | [**flow_ranking_item_flow_item_id_vote_matrix_get**](rapidata/api_client/docs/RankingFlowItemApi.md#flow_ranking_item_flow_item_id_vote_matrix_get) | **GET** /flow/ranking/item/{flowItemId}/vote-matrix | Retrieves the pairwise vote matrix for a completed flow item. +*RapidApi* | [**rapid_compare_ab_summary_correlation_id_recalculate_post**](rapidata/api_client/docs/RapidApi.md#rapid_compare_ab_summary_correlation_id_recalculate_post) | **POST** /rapid/compare-ab-summary/{correlationId}/recalculate | Recalculates the compare AB summary counters of a correlation from scratch. *RapidApi* | [**rapid_rapid_id_navigation_get**](rapidata/api_client/docs/RapidApi.md#rapid_rapid_id_navigation_get) | **GET** /rapid/{rapidId}/navigation | Gets the anchor rapid and its surrounding rapids within the results slice, in the order and filter the results grid renders, so the explorer can step neighbour-to-neighbour. *RapidApi* | [**rapid_rapid_id_reject_post**](rapidata/api_client/docs/RapidApi.md#rapid_rapid_id_reject_post) | **POST** /rapid/{rapidId}/reject | Rejects a completed rapid, marking its results as invalid. *RapidataIdentityAPIApi* | [**root_get**](rapidata/api_client/docs/RapidataIdentityAPIApi.md#root_get) | **GET** / | @@ -402,6 +407,8 @@ Class | Method | HTTP request | Description ## Documentation For Models + - [AcceptOrgInvitationEndpointInput](rapidata/api_client/docs/AcceptOrgInvitationEndpointInput.md) + - [AcceptOrgInvitationEndpointOutput](rapidata/api_client/docs/AcceptOrgInvitationEndpointOutput.md) - [AddExampleToAudienceEndpointInput](rapidata/api_client/docs/AddExampleToAudienceEndpointInput.md) - [AddExampleToAudienceEndpointOutput](rapidata/api_client/docs/AddExampleToAudienceEndpointOutput.md) - [AddUserResponseEndpointInput](rapidata/api_client/docs/AddUserResponseEndpointInput.md) @@ -485,6 +492,7 @@ Class | Method | HTTP request | Description - [CreateInvoiceEndpointOutput](rapidata/api_client/docs/CreateInvoiceEndpointOutput.md) - [CreateJobDefinitionEndpointInput](rapidata/api_client/docs/CreateJobDefinitionEndpointInput.md) - [CreateJobDefinitionEndpointOutput](rapidata/api_client/docs/CreateJobDefinitionEndpointOutput.md) + - [CreateJobEndpointCostWarningModel](rapidata/api_client/docs/CreateJobEndpointCostWarningModel.md) - [CreateJobEndpointInput](rapidata/api_client/docs/CreateJobEndpointInput.md) - [CreateJobEndpointOutput](rapidata/api_client/docs/CreateJobEndpointOutput.md) - [CreateJobRevisionEndpointInput](rapidata/api_client/docs/CreateJobRevisionEndpointInput.md) @@ -497,6 +505,8 @@ Class | Method | HTTP request | Description - [CreateManualChargeEndpointOutput](rapidata/api_client/docs/CreateManualChargeEndpointOutput.md) - [CreateOrderEndpointOutput](rapidata/api_client/docs/CreateOrderEndpointOutput.md) - [CreateOrderModel](rapidata/api_client/docs/CreateOrderModel.md) + - [CreateOrganizationEndpointInput](rapidata/api_client/docs/CreateOrganizationEndpointInput.md) + - [CreateOrganizationEndpointOutput](rapidata/api_client/docs/CreateOrganizationEndpointOutput.md) - [CreateProgramCampaignEndpointInput](rapidata/api_client/docs/CreateProgramCampaignEndpointInput.md) - [CreateProgramCampaignEndpointOutput](rapidata/api_client/docs/CreateProgramCampaignEndpointOutput.md) - [CreatePromptForBenchmarkEndpointInput](rapidata/api_client/docs/CreatePromptForBenchmarkEndpointInput.md) @@ -607,8 +617,8 @@ Class | Method | HTTP request | Description - [GetLeaderboardByIdEndpointOutput](rapidata/api_client/docs/GetLeaderboardByIdEndpointOutput.md) - [GetMyOrganizationEndpointOutput](rapidata/api_client/docs/GetMyOrganizationEndpointOutput.md) - [GetOrderByIdEndpointOutput](rapidata/api_client/docs/GetOrderByIdEndpointOutput.md) + - [GetOrganizationEndpointOutput](rapidata/api_client/docs/GetOrganizationEndpointOutput.md) - [GetParticipantByIdEndpointOutput](rapidata/api_client/docs/GetParticipantByIdEndpointOutput.md) - - [GetParticipantByIdObsoleteEndpointOutput](rapidata/api_client/docs/GetParticipantByIdObsoleteEndpointOutput.md) - [GetPipelineByIdEndpointOutput](rapidata/api_client/docs/GetPipelineByIdEndpointOutput.md) - [GetPromptsByBenchmarkEndpointOutput](rapidata/api_client/docs/GetPromptsByBenchmarkEndpointOutput.md) - [GetPromptsByBenchmarkEndpointPagedResultOfOutput](rapidata/api_client/docs/GetPromptsByBenchmarkEndpointPagedResultOfOutput.md) @@ -650,7 +660,6 @@ Class | Method | HTTP request | Description - [GetSignalRunByIdEndpointOutput](rapidata/api_client/docs/GetSignalRunByIdEndpointOutput.md) - [GetSimpleWorkflowResultsEndpointOutput](rapidata/api_client/docs/GetSimpleWorkflowResultsEndpointOutput.md) - [GetSimpleWorkflowResultsEndpointPagedResultOfOutput](rapidata/api_client/docs/GetSimpleWorkflowResultsEndpointPagedResultOfOutput.md) - - [GetStandingByIdEndpointOutput](rapidata/api_client/docs/GetStandingByIdEndpointOutput.md) - [GetUserScoreCacheEndpointOutput](rapidata/api_client/docs/GetUserScoreCacheEndpointOutput.md) - [GetValidationRapidsEndpointOutput](rapidata/api_client/docs/GetValidationRapidsEndpointOutput.md) - [GetValidationRapidsEndpointPagedResultOfOutput](rapidata/api_client/docs/GetValidationRapidsEndpointPagedResultOfOutput.md) @@ -978,6 +987,8 @@ Class | Method | HTTP request | Description - [IWorkflowRapidBlueprintModelScrubWorkflowRapidBlueprintModel](rapidata/api_client/docs/IWorkflowRapidBlueprintModelScrubWorkflowRapidBlueprintModel.md) - [IWorkflowRapidBlueprintModelTranscriptionWorkflowRapidBlueprintModel](rapidata/api_client/docs/IWorkflowRapidBlueprintModelTranscriptionWorkflowRapidBlueprintModel.md) - [InspectReportEndpointOutput](rapidata/api_client/docs/InspectReportEndpointOutput.md) + - [InviteOrgMemberEndpointInput](rapidata/api_client/docs/InviteOrgMemberEndpointInput.md) + - [InviteOrgMemberEndpointOutput](rapidata/api_client/docs/InviteOrgMemberEndpointOutput.md) - [InvoiceStatus](rapidata/api_client/docs/InvoiceStatus.md) - [IsRapidBagValidEndpointOutput](rapidata/api_client/docs/IsRapidBagValidEndpointOutput.md) - [JobDefinitionRevisionState](rapidata/api_client/docs/JobDefinitionRevisionState.md) @@ -987,14 +998,18 @@ Class | Method | HTTP request | Description - [LinePoint](rapidata/api_client/docs/LinePoint.md) - [LineResultModelLine](rapidata/api_client/docs/LineResultModelLine.md) - [LineResultModelLinePoint](rapidata/api_client/docs/LineResultModelLinePoint.md) + - [ListOrgMembersEndpointOutput](rapidata/api_client/docs/ListOrgMembersEndpointOutput.md) + - [ListOrgMembersEndpointOutputMember](rapidata/api_client/docs/ListOrgMembersEndpointOutputMember.md) - [LocateBoxTruthModelBox](rapidata/api_client/docs/LocateBoxTruthModelBox.md) - [LocateCoordinate](rapidata/api_client/docs/LocateCoordinate.md) - [LocateCoordinateModel](rapidata/api_client/docs/LocateCoordinateModel.md) - [ManualChargeReason](rapidata/api_client/docs/ManualChargeReason.md) + - [MembershipStatus](rapidata/api_client/docs/MembershipStatus.md) - [NamedClassification](rapidata/api_client/docs/NamedClassification.md) - [NamedEntityResultModelNamedClassification](rapidata/api_client/docs/NamedEntityResultModelNamedClassification.md) - [NamedEntityTruthModelNamedClassification](rapidata/api_client/docs/NamedEntityTruthModelNamedClassification.md) - [OrderState](rapidata/api_client/docs/OrderState.md) + - [OrgRole](rapidata/api_client/docs/OrgRole.md) - [PagedResultOfIBillingGroupModel](rapidata/api_client/docs/PagedResultOfIBillingGroupModel.md) - [ParticipantStatus](rapidata/api_client/docs/ParticipantStatus.md) - [PidBatchMode](rapidata/api_client/docs/PidBatchMode.md) @@ -1116,6 +1131,7 @@ Class | Method | HTTP request | Description - [RetrievalMode](rapidata/api_client/docs/RetrievalMode.md) - [RetrySampleGenerationEndpointInput](rapidata/api_client/docs/RetrySampleGenerationEndpointInput.md) - [RetrySampleGenerationEndpointOutput](rapidata/api_client/docs/RetrySampleGenerationEndpointOutput.md) + - [ReviewReasonModel](rapidata/api_client/docs/ReviewReasonModel.md) - [RunStatus](rapidata/api_client/docs/RunStatus.md) - [SampleGenerationItemStatus](rapidata/api_client/docs/SampleGenerationItemStatus.md) - [SampleGenerationStatus](rapidata/api_client/docs/SampleGenerationStatus.md)