From da7c10230000654534c4a52194dc3842ac81255c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 3 Nov 2026 14:38:49 +0000 Subject: [PATCH] Sync the API client with openapi.yaml 1.0.0-draft.31 --- api/openapi.yaml | 1129 ++++++++++++++++- .../ApiKeys/ApiKeysRequestBuilder.cs | 17 +- .../ApiKeys/GetIncludeQueryParameterType.cs | 16 + .../ApiKeys/Item/ApiKeysItemRequestBuilder.cs | 4 +- .../ApiKeys/Item/ApiKeysPatchRequestBody.cs | 8 + .../ApplicationsRequestBuilder.cs | 35 +- .../GetIncludeQueryParameterType.cs | 16 + .../Applications/GetSortQueryParameterType.cs | 20 + .../Item/ApplicationsItemRequestBuilder.cs | 55 + .../Item/Icon/IconRequestBuilder.cs | 98 ++ .../Item/Complete/CompleteRequestBuilder.cs | 97 ++ .../Item/WithUploadItemRequestBuilder.cs | 41 + .../Icon/Uploads/UploadsRequestBuilder.cs | 117 ++ .../AuditEvents/AuditEventsRequestBuilder.cs | 19 +- .../GetIncludeQueryParameterType.cs | 16 + .../Api/Generated/Auth/AuthRequestBuilder.cs | 6 + .../ReauthenticatePostRequestBody.cs | 99 ++ .../ReauthenticateRequestBuilder.cs | 100 ++ .../BulkUpdate/BulkUpdatePostRequestBody.cs | 81 ++ .../BulkUpdatePostRequestBody_items.cs | 108 ++ .../BulkUpdate/BulkUpdateRequestBuilder.cs | 100 ++ .../EntitlementsRequestBuilder.cs | 13 +- .../GetIncludeQueryParameterType.cs | 16 + .../Api/Generated/Models/ApiKeyWrite.cs | 8 + .../Api/Generated/Models/Application.cs | 7 + .../Generated/Models/ApplicationAccessTier.cs | 6 +- .../Models/ApplicationReviewStatus.cs | 4 + .../Generated/Models/ApplicationSummary.cs | 53 +- .../Api/Generated/Models/ApplicationWrite.cs | 11 +- .../Api/Generated/Models/AuditAction.cs | 20 + .../Generated/Models/AuditExportRequest.cs | 18 + .../Api/Generated/Models/AuditTargetType.cs | 4 + .../Api/Generated/Models/BulkInviteResults.cs | 82 ++ .../Models/BulkInviteResults_results.cs | 125 ++ .../Api/Generated/Models/BulkItemError.cs | 118 ++ .../Generated/Models/BulkItemError_details.cs | 63 + .../Api/Generated/Models/BulkResults.cs | 82 ++ .../Generated/Models/BulkResults_results.cs | 107 ++ .../Generated/Models/DeviceInactiveReason.cs | 4 + .../Api/Generated/Models/ImageUpload.cs | 142 +++ .../Generated/Models/ImageUploadRequest.cs | 79 ++ .../Models/ImageUploadRequest_content_type.cs | 24 + .../Models/ImageUpload_content_type.cs | 24 + .../Generated/Models/ImageUpload_fields.cs | 64 + .../Api/Generated/Models/PageInfo.cs | 16 + .../Generated/Models/PlatformAnnouncement.cs | 81 ++ .../Models/PlatformAnnouncement_level.cs | 24 + .../Api/Generated/Models/PlatformSettings.cs | 124 ++ .../Generated/Models/PlatformSettingsWrite.cs | 115 ++ .../PlatformSettingsWrite_client_flags.cs | 64 + .../Models/PlatformSettings_client_flags.cs | 64 + .../Api/Generated/Models/PushCredential.cs | 2 +- .../Generated/Models/PushCredentialPage.cs | 64 + .../Generated/Models/PushCredential_status.cs | 7 +- .../Api/Generated/Models/Reauthentication.cs | 105 ++ .../Models/Reauthentication_token_type.cs | 16 + .../Api/Generated/Models/Stats.cs | 509 ++++++++ .../Generated/Models/Stats_applications.cs | 99 ++ .../Stats_applications_by_access_tier.cs | 79 ++ .../Stats_applications_by_review_status.cs | 103 ++ .../Generated/Models/Stats_entitlements.cs | 96 ++ .../Models/Stats_organizationsMember1.cs | 63 + .../Models/Stats_organizationsMember2.cs | 79 ++ .../Models/Stats_push_credentials.cs | 88 ++ .../Models/Stats_subscriptionsMember1.cs | 63 + .../Models/Stats_subscriptionsMember2.cs | 79 ++ .../Models/Stats_tier_change_requests.cs | 71 ++ .../Generated/Models/Stats_usersMember1.cs | 63 + .../Generated/Models/Stats_usersMember2.cs | 95 ++ .../Models/Stats_webhook_subscriptions.cs | 88 ++ .../Generated/Models/SubscriptionListItem.cs | 82 ++ .../Api/Generated/Models/SubscriptionPage.cs | 64 + .../Api/Generated/Models/UsageReport.cs | 124 ++ .../Models/UsageReport_granularity.cs | 24 + .../Generated/Models/UsageReport_group_by.cs | 24 + .../Api/Generated/Models/UsageRow.cs | 166 +++ .../Api/Generated/Models/User.cs | 8 + .../Generated/Models/UserRoleAssignment.cs | 8 + .../Models/WebhookDeliveryListItem.cs | 82 ++ .../Generated/Models/WebhookDeliveryPage.cs | 64 + .../GetIncludeQueryParameterType.cs | 16 + .../CheckoutSessionsRequestBuilder.cs | 13 + .../Item/Confirm/ConfirmRequestBuilder.cs | 95 ++ .../Item/WithSession_ItemRequestBuilder.cs | 41 + .../Members/GetIncludeQueryParameterType.cs | 16 + .../Item/Members/MembersRequestBuilder.cs | 7 +- .../OrganizationsRequestBuilder.cs | 7 +- .../Platform/PlatformRequestBuilder.cs | 41 + .../Settings/SettingsRequestBuilder.cs | 156 +++ .../GetIncludeQueryParameterType.cs | 16 + .../GetStatusQueryParameterType.cs | 24 + .../PushCredentialsRequestBuilder.cs | 128 ++ .../Roles/GetIncludeQueryParameterType.cs | 16 + .../Roles/Item/RolesItemRequestBuilder.cs | 6 +- .../Generated/Roles/RolesRequestBuilder.cs | 13 +- .../Generated/Stats/StatsRequestBuilder.cs | 113 ++ .../GetIncludeQueryParameterType.cs | 16 + .../GetSubscriber_typeQueryParameterType.cs | 20 + .../SubscriptionsRequestBuilder.cs | 141 ++ .../Api/Generated/SubstratalApiClient.cs | 36 + .../Usage/GetGranularityQueryParameterType.cs | 24 + .../Usage/GetGroup_byQueryParameterType.cs | 24 + .../Generated/Usage/UsageRequestBuilder.cs | 156 +++ .../BulkInvite/BulkInvitePostRequestBody.cs | 99 ++ .../BulkInvite/BulkInviteRequestBuilder.cs | 102 ++ .../BulkSuspend/BulkSuspendPostRequestBody.cs | 99 ++ .../BulkSuspend/BulkSuspendRequestBuilder.cs | 100 ++ .../Users/GetIncludeQueryParameterType.cs | 16 + .../Users/Item/Avatar/AvatarRequestBuilder.cs | 98 ++ .../Item/Complete/CompleteRequestBuilder.cs | 97 ++ .../Item/WithUploadItemRequestBuilder.cs | 41 + .../Avatar/Uploads/UploadsRequestBuilder.cs | 117 ++ .../EntitlementsRequestBuilder.cs | 7 +- .../GetIncludeQueryParameterType.cs | 16 + .../Current/CurrentRequestBuilder.cs | 46 + .../Roles/Item/WithRoleItemRequestBuilder.cs | 4 +- .../Users/Item/UsersItemRequestBuilder.cs | 6 + .../CheckoutSessionsRequestBuilder.cs | 13 + .../Item/Confirm/ConfirmRequestBuilder.cs | 93 ++ .../Item/WithSession_ItemRequestBuilder.cs | 41 + .../Generated/Users/UsersRequestBuilder.cs | 19 +- .../GetIncludeQueryParameterType.cs | 16 + .../GetStatusQueryParameterType.cs | 24 + .../WebhookDeliveriesRequestBuilder.cs | 158 +++ .../Webhooks/GetIncludeQueryParameterType.cs | 16 + .../Webhooks/GetScopeQueryParameterType.cs | 16 + .../Webhooks/GetStatusQueryParameterType.cs | 24 + .../Deliveries/DeliveriesRequestBuilder.cs | 7 +- .../GetIncludeQueryParameterType.cs | 16 + .../Item/WithDeliveryItemRequestBuilder.cs | 56 + .../Webhooks/WebhooksRequestBuilder.cs | 20 +- .../Api/Generated/kiota-lock.json | 2 +- 132 files changed, 8596 insertions(+), 57 deletions(-) create mode 100644 src/Substratal.Hub.Core/Api/Generated/ApiKeys/GetIncludeQueryParameterType.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/Applications/GetIncludeQueryParameterType.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/Applications/GetSortQueryParameterType.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/Applications/Item/Icon/IconRequestBuilder.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/Applications/Item/Icon/Uploads/Item/Complete/CompleteRequestBuilder.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/Applications/Item/Icon/Uploads/Item/WithUploadItemRequestBuilder.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/Applications/Item/Icon/Uploads/UploadsRequestBuilder.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/AuditEvents/GetIncludeQueryParameterType.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/Auth/Reauthenticate/ReauthenticatePostRequestBody.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/Auth/Reauthenticate/ReauthenticateRequestBuilder.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/Entitlements/BulkUpdate/BulkUpdatePostRequestBody.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/Entitlements/BulkUpdate/BulkUpdatePostRequestBody_items.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/Entitlements/BulkUpdate/BulkUpdateRequestBuilder.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/Entitlements/GetIncludeQueryParameterType.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/Models/BulkInviteResults.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/Models/BulkInviteResults_results.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/Models/BulkItemError.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/Models/BulkItemError_details.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/Models/BulkResults.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/Models/BulkResults_results.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/Models/ImageUpload.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/Models/ImageUploadRequest.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/Models/ImageUploadRequest_content_type.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/Models/ImageUpload_content_type.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/Models/ImageUpload_fields.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/Models/PlatformAnnouncement.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/Models/PlatformAnnouncement_level.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/Models/PlatformSettings.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/Models/PlatformSettingsWrite.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/Models/PlatformSettingsWrite_client_flags.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/Models/PlatformSettings_client_flags.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/Models/PushCredentialPage.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/Models/Reauthentication.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/Models/Reauthentication_token_type.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/Models/Stats.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/Models/Stats_applications.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/Models/Stats_applications_by_access_tier.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/Models/Stats_applications_by_review_status.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/Models/Stats_entitlements.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/Models/Stats_organizationsMember1.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/Models/Stats_organizationsMember2.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/Models/Stats_push_credentials.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/Models/Stats_subscriptionsMember1.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/Models/Stats_subscriptionsMember2.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/Models/Stats_tier_change_requests.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/Models/Stats_usersMember1.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/Models/Stats_usersMember2.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/Models/Stats_webhook_subscriptions.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/Models/SubscriptionListItem.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/Models/SubscriptionPage.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/Models/UsageReport.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/Models/UsageReport_granularity.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/Models/UsageReport_group_by.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/Models/UsageRow.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/Models/WebhookDeliveryListItem.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/Models/WebhookDeliveryPage.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/Organizations/GetIncludeQueryParameterType.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/Organizations/Item/Billing/CheckoutSessions/Item/Confirm/ConfirmRequestBuilder.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/Organizations/Item/Billing/CheckoutSessions/Item/WithSession_ItemRequestBuilder.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/Organizations/Item/Members/GetIncludeQueryParameterType.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/Platform/PlatformRequestBuilder.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/Platform/Settings/SettingsRequestBuilder.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/PushCredentials/GetIncludeQueryParameterType.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/PushCredentials/GetStatusQueryParameterType.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/PushCredentials/PushCredentialsRequestBuilder.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/Roles/GetIncludeQueryParameterType.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/Stats/StatsRequestBuilder.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/Subscriptions/GetIncludeQueryParameterType.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/Subscriptions/GetSubscriber_typeQueryParameterType.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/Subscriptions/SubscriptionsRequestBuilder.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/Usage/GetGranularityQueryParameterType.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/Usage/GetGroup_byQueryParameterType.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/Usage/UsageRequestBuilder.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/Users/BulkInvite/BulkInvitePostRequestBody.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/Users/BulkInvite/BulkInviteRequestBuilder.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/Users/BulkSuspend/BulkSuspendPostRequestBody.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/Users/BulkSuspend/BulkSuspendRequestBuilder.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/Users/GetIncludeQueryParameterType.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/Users/Item/Avatar/AvatarRequestBuilder.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/Users/Item/Avatar/Uploads/Item/Complete/CompleteRequestBuilder.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/Users/Item/Avatar/Uploads/Item/WithUploadItemRequestBuilder.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/Users/Item/Avatar/Uploads/UploadsRequestBuilder.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/Users/Item/Entitlements/GetIncludeQueryParameterType.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/Users/Me/Billing/CheckoutSessions/Item/Confirm/ConfirmRequestBuilder.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/Users/Me/Billing/CheckoutSessions/Item/WithSession_ItemRequestBuilder.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/WebhookDeliveries/GetIncludeQueryParameterType.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/WebhookDeliveries/GetStatusQueryParameterType.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/WebhookDeliveries/WebhookDeliveriesRequestBuilder.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/Webhooks/GetIncludeQueryParameterType.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/Webhooks/GetScopeQueryParameterType.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/Webhooks/GetStatusQueryParameterType.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/Webhooks/Item/Deliveries/GetIncludeQueryParameterType.cs diff --git a/api/openapi.yaml b/api/openapi.yaml index f36006d..1851dbc 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -1,7 +1,7 @@ openapi: 3.1.0 info: title: Substratal Apps — Platform API - version: "1.0.0-draft.9" + version: "1.0.0-draft.31" summary: >- User accounts, auth, roles, per-app entitlements (the on/off access switch), profiles, settings, organizations, tenancy, subscription billing, @@ -29,6 +29,11 @@ info: restrict_destructive=true. For `conditional`, only requests matching `x-substratal-destructive-when` are rejected; the rest of the operation stays callable. + `x-substratal-step-up` (`always` | `conditional`) marks operations + that need a recent MFA check from a User session (Auth → Step-up): + without one within the last 10 minutes they return 403 + reauthentication_required. For `conditional`, only requests matching + `x-substratal-step-up-when` need it. Application and Role ids are derived (app_, role__), not random; every other id is a prefix plus a ULID. `x-substratal-phase` gives the roadmap phase an operation ships in. @@ -56,11 +61,18 @@ tags: - name: Tenancy - name: Billing - name: Audit + - name: Usage & stats + description: >- + Request usage per Application, API Key, and operation, and the console home screen's live counts. - name: Webhooks - name: Notifications description: >- Push notifications (APNs, FCM, Web Push) and the notification inbox. - name: API Keys + - name: Platform + description: >- + Runtime operational switches (signup, read-only maintenance) and client + feature flags. - name: Meta paths: @@ -232,6 +244,42 @@ paths: "400": { $ref: "#/components/responses/BadRequest" } "401": { $ref: "#/components/responses/Unauthorized" } + /auth/reauthenticate: + post: + operationId: auth.reauthenticate + parameters: + - $ref: "#/components/parameters/ApiVersion" + tags: [Auth] + summary: Prove a second factor again, for step-up (User token, MFA enabled) + description: >- + Records a fresh MFA check on the calling session (mfa_verified_at), so + operations marked x-substratal-step-up work for the next 10 minutes. + Send exactly one of code (a current TOTP code) or recovery_code (a + single-use recovery code). The response is a new access token carrying + the updated mfa_verified_at claim; the refresh token is unchanged. + Wrong codes count toward a lockout: after 5 in 15 minutes it is 429 + too_many_attempts. 409 mfa_not_enabled when the User has no TOTP. + x-substratal-phase: mvp + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + code: { type: string, pattern: "^[0-9]{6}$" } + recovery_code: { type: string } + responses: + "400": { $ref: "#/components/responses/BadRequest" } + "200": + description: Re-authenticated + content: + application/json: + schema: { $ref: "#/components/schemas/Reauthentication" } + "401": { $ref: "#/components/responses/Unauthorized" } + "409": { $ref: "#/components/responses/Conflict" } + "429": { $ref: "#/components/responses/TooManyRequests" } + /auth/app-tokens: post: operationId: auth.createAppToken @@ -710,6 +758,7 @@ paths: - $ref: "#/components/parameters/ApiVersion" - $ref: "#/components/parameters/Limit" - $ref: "#/components/parameters/Cursor" + - $ref: "#/components/parameters/Include" - { name: status, in: query, description: "deleted is allowed for users.manage only", schema: { type: string, enum: [active, invited, suspended, deleted] } } - { name: email, in: query, schema: { type: string, format: email } } - { name: q, in: query, schema: { type: string, minLength: 3 } } @@ -766,6 +815,84 @@ paths: "409": { $ref: "#/components/responses/Conflict" } "422": { $ref: "#/components/responses/Unprocessable" } + /users/bulk-invite: + post: + operationId: users.bulkInvite + tags: [Users] + summary: Invite up to 25 users in one call (users.manage) + description: >- + Requires users.manage. Each email is POST /users with status invited and an invitation email, + processed independently: one failing email doesn't stop the others, and each success writes its + own user.created Audit Event. Each email counts against POST /users's rate limit (20/min), so + emails past it get a per-item 429. The response is 200 with one result per email, in request + order; an item's status is what POST /users would have returned (201, 409 email_taken, + 422 validation_failed, 429 rate_limited). application_id, if given, becomes each new User's + signup_application_id and brands the invitation email. See /api-reference/conventions/#bulk-operations. + x-substratal-phase: mvp + parameters: + - $ref: "#/components/parameters/ApiVersion" + - $ref: "#/components/parameters/IdempotencyKey" + requestBody: + required: true + content: + application/json: + schema: + type: object + required: [emails] + properties: + emails: { type: array, minItems: 1, maxItems: 25, items: { type: string } } + application_id: { type: string } + responses: + "400": { $ref: "#/components/responses/BadRequest" } + "200": + description: One result per email, in request order + content: + application/json: + schema: { $ref: "#/components/schemas/BulkInviteResults" } + "403": { $ref: "#/components/responses/Forbidden" } + "404": { $ref: "#/components/responses/NotFound" } + "409": { $ref: "#/components/responses/Conflict" } + "422": { $ref: "#/components/responses/Unprocessable" } + + /users/bulk-suspend: + post: + operationId: users.bulkSuspend + tags: [Users] + summary: Suspend up to 25 users in one call (users.manage) + description: >- + Requires users.manage. Each id is POST /users/{id}/suspend with the shared reason, processed + independently, each with its own user.suspended Audit Event and webhooks. The protected + superadmin is a per-item 409 user_protected. Like POST /users/{id}/suspend it needs a recent + MFA check (403 reauthentication_required for the whole batch). Each id counts against + POST /users/{id}/suspend's rate limit. The response is 200 with one result per id, in request order; an item's status is + what POST /users/{id}/suspend would have returned. See /api-reference/conventions/#bulk-operations. + x-substratal-phase: mvp + x-substratal-destructive: always + x-substratal-step-up: always + parameters: + - $ref: "#/components/parameters/ApiVersion" + - $ref: "#/components/parameters/IdempotencyKey" + requestBody: + required: true + content: + application/json: + schema: + type: object + required: [user_ids] + properties: + user_ids: { type: array, minItems: 1, maxItems: 25, items: { type: string } } + reason: { type: string, maxLength: 2000 } + responses: + "400": { $ref: "#/components/responses/BadRequest" } + "200": + description: One result per id, in request order + content: + application/json: + schema: { $ref: "#/components/schemas/BulkResults" } + "403": { $ref: "#/components/responses/Forbidden" } + "409": { $ref: "#/components/responses/Conflict" } + "422": { $ref: "#/components/responses/Unprocessable" } + /users/{id}: parameters: - $ref: "#/components/parameters/UserIdOrMe" @@ -793,6 +920,8 @@ paths: x-substratal-phase: mvp x-substratal-destructive: conditional x-substratal-destructive-when: "status becomes suspended" + x-substratal-step-up: conditional + x-substratal-step-up-when: "status becomes suspended" parameters: - $ref: "#/components/parameters/ApiVersion" - $ref: "#/components/parameters/IfMatch" @@ -823,6 +952,7 @@ paths: summary: Soft-delete a user (self or users.manage) x-substratal-phase: mvp x-substratal-destructive: always + x-substratal-step-up: always responses: "400": { $ref: "#/components/responses/BadRequest" } "204": { description: Deleted } @@ -840,6 +970,7 @@ paths: summary: Suspend a user (users.manage) x-substratal-phase: mvp x-substratal-destructive: always + x-substratal-step-up: always requestBody: content: application/json: @@ -903,6 +1034,7 @@ paths: summary: Request right-to-erasure (soft-delete now, hard-delete cascade in 7 days) x-substratal-phase: mvp x-substratal-destructive: always + x-substratal-step-up: always requestBody: content: application/json: @@ -921,6 +1053,23 @@ paths: /users/{id}/erasure-requests/current: parameters: - $ref: "#/components/parameters/UserIdOrMe" + get: + operationId: users.getErasure + parameters: + - $ref: "#/components/parameters/ApiVersion" + tags: [Users] + summary: Read the User's pending erasure request + description: "Self, or users.manage. Returns the erasure request while it's scheduled; 404 erasure_not_scheduled when none is pending (never requested, cancelled, or completed). A soft-deleted User 404s (user_not_found) for anyone without users.manage, as on cancel." + x-substratal-phase: mvp + responses: + "400": { $ref: "#/components/responses/BadRequest" } + "200": + description: The scheduled erasure request + content: + application/json: + schema: { $ref: "#/components/schemas/ErasureRequest" } + "403": { $ref: "#/components/responses/Forbidden" } + "404": { $ref: "#/components/responses/NotFound" } delete: operationId: users.cancelErasure parameters: @@ -978,6 +1127,94 @@ paths: "409": { $ref: "#/components/responses/Conflict" } "422": { $ref: "#/components/responses/Unprocessable" } + /users/{id}/avatar/uploads: + parameters: + - $ref: "#/components/parameters/UserIdOrMe" + post: + operationId: profiles.createAvatarUpload + tags: [Profiles] + summary: Start an avatar upload (self or users.manage) + description: >- + Returns a presigned POST: send the image straight to url as multipart/form-data, with every + entry of fields and then the file as the last field, named file, within 5 minutes. The API + never sees the bytes. Then call POST /users/{id}/avatar/uploads/{uploadId}/complete. PNG, + JPEG, or WebP, at most 2 MB (a larger content_length is 422 validation_failed). 10 upload + starts per caller per hour, shared with Application icons. + x-substratal-phase: mvp + parameters: + - $ref: "#/components/parameters/ApiVersion" + - $ref: "#/components/parameters/IdempotencyKeyOptional" + requestBody: + required: true + content: + application/json: + schema: { $ref: "#/components/schemas/ImageUploadRequest" } + responses: + "400": { $ref: "#/components/responses/BadRequest" } + "201": + description: Where and how to upload + content: + application/json: + schema: { $ref: "#/components/schemas/ImageUpload" } + "403": { $ref: "#/components/responses/Forbidden" } + "404": { $ref: "#/components/responses/NotFound" } + "422": { $ref: "#/components/responses/Unprocessable" } + "429": { $ref: "#/components/responses/TooManyRequests" } + "503": { $ref: "#/components/responses/ServiceUnavailable" } + + /users/{id}/avatar/uploads/{uploadId}/complete: + parameters: + - $ref: "#/components/parameters/UserIdOrMe" + - { name: uploadId, in: path, required: true, schema: { type: string } } + post: + operationId: profiles.completeAvatarUpload + tags: [Profiles] + summary: Check an uploaded avatar and make it the Profile's avatar_url (self or users.manage) + description: >- + Checks the uploaded file's magic bytes against the declared content_type, its size, and its + dimensions (at most 2048 × 2048), stores it at a content-addressed + https://assets.substratalapps.com/avatars/… URL, sets avatar_url, and deletes the previous + hosted avatar. A file that fails a check is deleted, and the call is 422 invalid_image with + details.reason. An upload that was never sent, or was already completed, is 404 + upload_not_found. Writes profile.avatar_changed when someone other than the User does it. + x-substratal-phase: mvp + parameters: + - $ref: "#/components/parameters/ApiVersion" + responses: + "400": { $ref: "#/components/responses/BadRequest" } + "200": + description: The updated Profile + headers: + ETag: { $ref: "#/components/headers/ETag" } + content: + application/json: + schema: { $ref: "#/components/schemas/Profile" } + "403": { $ref: "#/components/responses/Forbidden" } + "404": { $ref: "#/components/responses/NotFound" } + "422": { $ref: "#/components/responses/Unprocessable" } + "503": { $ref: "#/components/responses/ServiceUnavailable" } + + /users/{id}/avatar: + parameters: + - $ref: "#/components/parameters/UserIdOrMe" + delete: + operationId: profiles.deleteAvatar + tags: [Profiles] + summary: Remove the avatar (self or users.manage) + description: >- + Sets avatar_url to null and deletes the hosted image, if it is one; an external https URL is + just cleared. PATCH /users/{id}/profile with avatar_url null does the same. Writes + profile.avatar_changed when someone other than the User does it. + x-substratal-phase: mvp + x-substratal-destructive: always + parameters: + - $ref: "#/components/parameters/ApiVersion" + responses: + "400": { $ref: "#/components/responses/BadRequest" } + "204": { description: Removed } + "403": { $ref: "#/components/responses/Forbidden" } + "404": { $ref: "#/components/responses/NotFound" } + /users/{id}/settings: parameters: - $ref: "#/components/parameters/UserIdOrMe" @@ -1124,11 +1361,18 @@ paths: operationId: applications.list tags: [Applications] summary: List the catalog (filtered by visibility rules) + description: >- + Newest first by created_at, ties broken by id. With applications.manage, + review_status=pending_review is the review queue and defaults to oldest-waiting first, by + review_requested_at (falling back to created_at). sort sets the order explicitly by + created_at: created_at for oldest first, -created_at for newest first, in the queue too. A + cursor is only valid under the sort it was issued with. x-substratal-phase: mvp parameters: - $ref: "#/components/parameters/ApiVersion" - $ref: "#/components/parameters/Limit" - $ref: "#/components/parameters/Cursor" + - $ref: "#/components/parameters/Include" - { name: visibility, in: query, schema: { $ref: "#/components/schemas/ApplicationVisibility" } } - { name: review_status, in: query, schema: { $ref: "#/components/schemas/ApplicationReviewStatus" } } - { name: access_tier, in: query, schema: { $ref: "#/components/schemas/ApplicationAccessTier" } } @@ -1136,8 +1380,12 @@ paths: - { name: tenant_id, in: query, schema: { type: string } } - { name: owner_user_id, in: query, schema: { type: string } } - { name: owner_organization_id, in: query, schema: { type: string } } + - { name: q, in: query, description: "Case-insensitive prefix match on name or slug", schema: { type: string } } + - { name: include_inactive, in: query, description: "Include retired Applications (also included by review_status=retired)", schema: { type: boolean, default: false } } + - { name: sort, in: query, description: "created_at (oldest first) or -created_at (newest first). Ties are broken by id in the same direction.", schema: { type: string, enum: [created_at, -created_at] } } responses: "400": { $ref: "#/components/responses/BadRequest" } + "422": { $ref: "#/components/responses/Unprocessable" } "200": description: A page of Applications (trimmed view) content: @@ -1151,7 +1399,8 @@ paths: applications.manage creates any Application, approved by default (concierge onboarding). Any other User with a verified email may submit their own: it's owned by the caller (or an Organization they're an org_admin of), starts in pending_review, and can't set visibility, - access_tier, review_status, or review_notes (403 moderation_field_forbidden). Unverified + review_status, or review_notes (403 moderation_field_forbidden). Its access_tier is free or + restricted (the default); standard is 422 access_tier_reserved. Unverified email is 403 email_not_verified; API Keys without applications.manage are 403 forbidden. Self-service submissions are limited to 10 per User per day. x-substratal-phase: mvp @@ -1205,7 +1454,7 @@ paths: summary: Update a catalog entry (owner — configuration; applications.manage — anything) x-substratal-phase: mvp x-substratal-destructive: conditional - x-substratal-destructive-when: "review_status becomes rejected or suspended, or available_app_roles/permissions shrink" + x-substratal-destructive-when: "review_status becomes rejected, suspended, or retired, or available_app_roles/permissions shrink" parameters: - $ref: "#/components/parameters/ApiVersion" - $ref: "#/components/parameters/IfMatch" @@ -1223,6 +1472,115 @@ paths: "403": { $ref: "#/components/responses/Forbidden" } "409": { $ref: "#/components/responses/Conflict" } "422": { $ref: "#/components/responses/Unprocessable" } + "429": { $ref: "#/components/responses/TooManyRequests" } + delete: + operationId: applications.delete + tags: [Applications] + summary: Delete an unreferenced test-mode Application (applications.manage) + description: >- + Only a test-mode Application that nothing references can be deleted; a live one is + 409 application_not_deletable (retire it with review_status: retired instead). Anything + still referencing it (Entitlements, API Keys, webhooks, devices, notifications, settings or + profile rows, push credentials, role assignments, refresh tokens, Users who signed up + through it) is 409 application_in_use, naming each kind in `references`. Its own Roles go + with it; audit history is kept. Writes application.deleted. + x-substratal-phase: mvp + x-substratal-destructive: always + parameters: + - $ref: "#/components/parameters/ApiVersion" + responses: + "400": { $ref: "#/components/responses/BadRequest" } + "204": { description: Deleted } + "403": { $ref: "#/components/responses/Forbidden" } + "404": { $ref: "#/components/responses/NotFound" } + "409": { $ref: "#/components/responses/Conflict" } + + /applications/{id}/icon/uploads: + parameters: + - { name: id, in: path, required: true, schema: { type: string } } + post: + operationId: applications.createIconUpload + tags: [Applications] + summary: Start an icon upload (the owner or applications.manage) + description: >- + Returns a presigned POST, as for avatars: send the image straight to url with every entry of + fields and then the file as the last field, named file, within 5 minutes, then call + POST /applications/{id}/icon/uploads/{uploadId}/complete. PNG, JPEG, or WebP, square, at most + 1 MB (a larger content_length is 422 validation_failed). 10 upload starts per caller per + hour, shared with avatars. + x-substratal-phase: mvp + parameters: + - $ref: "#/components/parameters/ApiVersion" + - $ref: "#/components/parameters/IdempotencyKeyOptional" + requestBody: + required: true + content: + application/json: + schema: { $ref: "#/components/schemas/ImageUploadRequest" } + responses: + "400": { $ref: "#/components/responses/BadRequest" } + "201": + description: Where and how to upload + content: + application/json: + schema: { $ref: "#/components/schemas/ImageUpload" } + "403": { $ref: "#/components/responses/Forbidden" } + "404": { $ref: "#/components/responses/NotFound" } + "422": { $ref: "#/components/responses/Unprocessable" } + "429": { $ref: "#/components/responses/TooManyRequests" } + "503": { $ref: "#/components/responses/ServiceUnavailable" } + + /applications/{id}/icon/uploads/{uploadId}/complete: + parameters: + - { name: id, in: path, required: true, schema: { type: string } } + - { name: uploadId, in: path, required: true, schema: { type: string } } + post: + operationId: applications.completeIconUpload + tags: [Applications] + summary: Check an uploaded icon and make it the Application's icon_url (the owner or applications.manage) + description: >- + Checks the uploaded file's magic bytes against the declared content_type, its size, and its + dimensions (square, at most 2048 × 2048), stores it at a content-addressed + https://assets.substratalapps.com/apps/… URL, sets icon_url, and deletes the previous hosted + icon. A file that fails a check is deleted, and the call is 422 invalid_image with + details.reason. An upload that was never sent, or was already completed, is 404 + upload_not_found. Writes application.icon_changed. + x-substratal-phase: mvp + parameters: + - $ref: "#/components/parameters/ApiVersion" + responses: + "400": { $ref: "#/components/responses/BadRequest" } + "200": + description: The updated Application + headers: + ETag: { $ref: "#/components/headers/ETag" } + content: + application/json: + schema: { $ref: "#/components/schemas/Application" } + "403": { $ref: "#/components/responses/Forbidden" } + "404": { $ref: "#/components/responses/NotFound" } + "422": { $ref: "#/components/responses/Unprocessable" } + "503": { $ref: "#/components/responses/ServiceUnavailable" } + + /applications/{id}/icon: + parameters: + - { name: id, in: path, required: true, schema: { type: string } } + delete: + operationId: applications.deleteIcon + tags: [Applications] + summary: Remove the icon (the owner or applications.manage) + description: >- + Sets icon_url to null and deletes the hosted image, if it is one; an external https URL is + just cleared. Writes application.icon_changed. + x-substratal-phase: mvp + x-substratal-destructive: always + parameters: + - $ref: "#/components/parameters/ApiVersion" + responses: + "400": { $ref: "#/components/responses/BadRequest" } + "204": { description: Removed } + "403": { $ref: "#/components/responses/Forbidden" } + "404": { $ref: "#/components/responses/NotFound" } # ───────────────────────────── Entitlements ───────────────────────────── @@ -1238,6 +1596,7 @@ paths: - $ref: "#/components/parameters/ApiVersion" - $ref: "#/components/parameters/Limit" - $ref: "#/components/parameters/Cursor" + - $ref: "#/components/parameters/Include" - { name: application_id, in: query, schema: { type: string } } - { name: status, in: query, schema: { $ref: "#/components/schemas/EntitlementStatus" } } - { name: source, in: query, schema: { $ref: "#/components/schemas/EntitlementSource" } } @@ -1292,6 +1651,7 @@ paths: - $ref: "#/components/parameters/ApiVersion" - $ref: "#/components/parameters/Limit" - $ref: "#/components/parameters/Cursor" + - $ref: "#/components/parameters/Include" - { name: application_id, in: query, schema: { type: string } } - { name: status, in: query, schema: { $ref: "#/components/schemas/EntitlementStatus" } } - { name: user_id, in: query, schema: { type: string } } @@ -1379,6 +1739,54 @@ paths: "404": { $ref: "#/components/responses/NotFound" } "409": { $ref: "#/components/responses/Conflict" } + /entitlements/bulk-update: + post: + operationId: entitlements.bulkUpdate + tags: [Entitlements] + summary: Change the status of up to 25 Entitlements in one call + description: >- + Each item is PATCH /entitlements/{id} with its status and disabled_reason: the same access + rules and transition table, processed independently, each with its own Audit Event and webhooks. + Each item counts against PATCH /entitlements/{id}'s rate limit. The response is 200 with one + result per item, in request order; an item's status is what the PATCH would have returned. An + item that disables or revokes is refused (403 destructive_operation_restricted) for a + restrict_destructive key; the other items go ahead. See /api-reference/conventions/#bulk-operations. + x-substratal-phase: mvp + x-substratal-destructive: conditional + x-substratal-destructive-when: "an item's status becomes disabled or revoked" + parameters: + - $ref: "#/components/parameters/ApiVersion" + - $ref: "#/components/parameters/IdempotencyKey" + requestBody: + required: true + content: + application/json: + schema: + type: object + required: [items] + properties: + items: + type: array + minItems: 1 + maxItems: 25 + items: + type: object + required: [id, status] + properties: + id: { type: string } + status: { $ref: "#/components/schemas/EntitlementStatus" } + disabled_reason: { type: [string, "null"], maxLength: 255 } + responses: + "400": { $ref: "#/components/responses/BadRequest" } + "200": + description: One result per item, in request order + content: + application/json: + schema: { $ref: "#/components/schemas/BulkResults" } + "403": { $ref: "#/components/responses/Forbidden" } + "409": { $ref: "#/components/responses/Conflict" } + "422": { $ref: "#/components/responses/Unprocessable" } + # ─────────────────────────── Roles & Permissions ─────────────────────────── /permissions: @@ -1405,11 +1813,21 @@ paths: operationId: roles.list tags: [Roles & Permissions] summary: List Roles + description: >- + Any authenticated caller; each sees only the Roles visible to it. Platform Roles are + visible to Users holding any platform permission and to platform keys. An Application's + Roles are visible to platform roles.manage holders, the Application's own key, and the + Application's owner (its owner_user_id, or any active org_admin of its + owner_organization_id), with no platform permission needed. An owner sees only the Roles + of Applications they own: never another Application's, and never platform Roles unless + they also hold a platform permission. A scope the caller can't see returns an empty page, + not an error. x-substratal-phase: mvp parameters: - $ref: "#/components/parameters/ApiVersion" - $ref: "#/components/parameters/Limit" - $ref: "#/components/parameters/Cursor" + - $ref: "#/components/parameters/Include" - { name: scope, in: query, description: "'platform' or an application_id", schema: { type: string } } responses: "400": { $ref: "#/components/responses/BadRequest" } @@ -1465,6 +1883,17 @@ paths: operationId: roles.update tags: [Roles & Permissions] summary: Change a Role's permissions or description + description: >- + An app Role may be changed by platform roles.manage, the Application's own key holding + roles.manage, or the Application's owner (its owner_user_id, or any active org_admin of + its owner_organization_id) with no platform permission needed. Its permissions must be + keys its own Application declares; a platform key, another Application's key, or an + undeclared key returns 422 unknown_permission. A platform Role needs platform + roles.manage, and every permission it grants must be one the caller holds (403 + role_escalation_forbidden); seed Roles can't be changed (403 seed_role_immutable). A + Role the caller can't see (another Application's, or a platform Role for a caller with + no platform permission) returns 404 role_not_found; one it can see but not change + returns 403 forbidden. x-substratal-phase: mvp x-substratal-destructive: conditional x-substratal-destructive-when: "permissions shrink" @@ -1488,6 +1917,7 @@ paths: application/json: schema: { $ref: "#/components/schemas/Role" } "403": { $ref: "#/components/responses/Forbidden" } + "404": { $ref: "#/components/responses/NotFound" } "409": { $ref: "#/components/responses/Conflict" } "422": { $ref: "#/components/responses/Unprocessable" } delete: @@ -1535,7 +1965,13 @@ paths: - $ref: "#/components/parameters/ApiVersion" tags: [Roles & Permissions] summary: Assign a Role (idempotent — 200 if already held) + description: >- + Assigning a platform Role that grants a permission to a User without + MFA succeeds, but the Role takes effect only once they enroll TOTP; + the response's mfa_enrollment_required says so (Auth → Staff MFA). x-substratal-phase: mvp + x-substratal-step-up: conditional + x-substratal-step-up-when: "the Role is a platform Role" responses: "400": { $ref: "#/components/responses/BadRequest" } "200": @@ -1558,6 +1994,8 @@ paths: summary: Remove a Role assignment (idempotent) x-substratal-phase: mvp x-substratal-destructive: always + x-substratal-step-up: conditional + x-substratal-step-up-when: "the Role is a platform Role" responses: "400": { $ref: "#/components/responses/BadRequest" } "204": { description: Removed } @@ -1596,6 +2034,7 @@ paths: - $ref: "#/components/parameters/ApiVersion" - $ref: "#/components/parameters/Limit" - $ref: "#/components/parameters/Cursor" + - $ref: "#/components/parameters/Include" - { name: status, in: query, schema: { type: string, enum: [active, suspended] } } - { name: q, in: query, schema: { type: string } } responses: @@ -1691,6 +2130,7 @@ paths: - $ref: "#/components/parameters/ApiVersion" - $ref: "#/components/parameters/Limit" - $ref: "#/components/parameters/Cursor" + - $ref: "#/components/parameters/Include" - { name: role, in: query, schema: { $ref: "#/components/schemas/OrganizationMemberRole" } } - { name: membership_status, in: query, schema: { $ref: "#/components/schemas/OrganizationMembershipStatus" } } - { name: q, in: query, schema: { type: string } } @@ -2053,6 +2493,40 @@ paths: # ───────────────────────────── Billing ───────────────────────────── + /subscriptions: + get: + operationId: billing.listSubscriptions + tags: [Billing] + summary: List every subscriber's subscription (billing.manage) + description: >- + Requires billing.manage. Every User's and Organization's subscription in the caller's mode, + most recently updated first, with the subscriber's email or name for display. Revenue and + invoices stay in Stripe. + x-substratal-phase: phase2 + parameters: + - $ref: "#/components/parameters/ApiVersion" + - $ref: "#/components/parameters/Limit" + - $ref: "#/components/parameters/Cursor" + - $ref: "#/components/parameters/Include" + - name: status + in: query + description: "Subscriptions in any of these statuses. Repeatable." + style: form + explode: true + schema: { type: array, items: { $ref: "#/components/schemas/SubscriptionStatus" }, maxItems: 8 } + - { name: subscriber_type, in: query, schema: { type: string, enum: [user, organization] } } + - { name: cancel_at_period_end, in: query, schema: { type: boolean } } + - { name: current_period_end_before, in: query, description: "Subscriptions whose current period ends before this time.", schema: { type: string, format: date-time } } + responses: + "400": { $ref: "#/components/responses/BadRequest" } + "200": + description: A page of subscriptions + content: + application/json: + schema: { $ref: "#/components/schemas/SubscriptionPage" } + "403": { $ref: "#/components/responses/Forbidden" } + "422": { $ref: "#/components/responses/Unprocessable" } + /users/{id}/subscription: parameters: - $ref: "#/components/parameters/UserIdOrMe" @@ -2098,6 +2572,31 @@ paths: "422": { $ref: "#/components/responses/Unprocessable" } "503": { $ref: "#/components/responses/ServiceUnavailable" } + /users/me/billing/checkout-sessions/{session_id}/confirm: + parameters: + - { name: session_id, in: path, required: true, schema: { type: string }, description: "The cs_… id Stripe puts in success_url's session_id." } + post: + operationId: billing.confirmUserCheckoutSession + tags: [Billing] + summary: Sync your subscription from a returning Checkout, without waiting for the webhook (User token) + description: >- + Call it when the person lands on success_url. It reads the Checkout Session from Stripe and, + if it's complete, applies the subscription at once (the same sync the Stripe webhook runs), then + returns what GET /users/me/subscription would. An open or expired session changes nothing. + Idempotent. 404 checkout_session_not_found if the session isn't this User's. + x-substratal-phase: phase2 + parameters: + - $ref: "#/components/parameters/ApiVersion" + responses: + "200": + description: The User's plan and individual subscription, after the sync + content: + application/json: + schema: { $ref: "#/components/schemas/UserSubscription" } + "400": { $ref: "#/components/responses/BadRequest" } + "404": { $ref: "#/components/responses/NotFound" } + "503": { $ref: "#/components/responses/ServiceUnavailable" } + /users/me/billing/portal-sessions: post: operationId: billing.createUserPortalSession @@ -2200,12 +2699,39 @@ paths: description: Checkout URL content: application/json: - schema: { $ref: "#/components/schemas/RedirectSession" } + schema: { $ref: "#/components/schemas/RedirectSession" } + "400": { $ref: "#/components/responses/BadRequest" } + "403": { $ref: "#/components/responses/Forbidden" } + "404": { $ref: "#/components/responses/NotFound" } + "409": { $ref: "#/components/responses/Conflict" } + "422": { $ref: "#/components/responses/Unprocessable" } + "503": { $ref: "#/components/responses/ServiceUnavailable" } + + /organizations/{id}/billing/checkout-sessions/{session_id}/confirm: + parameters: + - { name: id, in: path, required: true, schema: { type: string } } + - { name: session_id, in: path, required: true, schema: { type: string }, description: "The cs_… id Stripe puts in success_url's session_id." } + post: + operationId: billing.confirmOrganizationCheckoutSession + tags: [Billing] + summary: Sync the Organization's subscription from a returning Checkout (org admin, User token) + description: >- + The Organization form of billing.confirmUserCheckoutSession: returns what + GET /organizations/{id}/subscription would, after the sync. + x-substratal-phase: phase2 + parameters: + - $ref: "#/components/parameters/ApiVersion" + responses: + "200": + description: The Organization's plan and subscription, after the sync + headers: + ETag: { $ref: "#/components/headers/ETag" } + content: + application/json: + schema: { $ref: "#/components/schemas/OrganizationSubscription" } "400": { $ref: "#/components/responses/BadRequest" } "403": { $ref: "#/components/responses/Forbidden" } "404": { $ref: "#/components/responses/NotFound" } - "409": { $ref: "#/components/responses/Conflict" } - "422": { $ref: "#/components/responses/Unprocessable" } "503": { $ref: "#/components/responses/ServiceUnavailable" } /organizations/{id}/billing/portal-sessions: @@ -2247,6 +2773,7 @@ paths: - $ref: "#/components/parameters/ApiVersion" - $ref: "#/components/parameters/Limit" - $ref: "#/components/parameters/Cursor" + - $ref: "#/components/parameters/Include" - { name: target_user_id, in: query, schema: { type: string } } - { name: target_type, in: query, schema: { $ref: "#/components/schemas/AuditTargetType" } } - { name: target_id, in: query, schema: { type: string } } @@ -2260,6 +2787,10 @@ paths: - { name: application_id, in: query, schema: { type: string } } - { name: organization_id, in: query, schema: { type: string } } - { name: tenant_id, in: query, schema: { type: string } } + - name: request_id + in: query + description: "Events written by one request: the X-Request-Id it sent or was given. Exact match." + schema: { type: string, maxLength: 128 } - { name: since, in: query, schema: { type: string, format: date-time } } - { name: until, in: query, schema: { type: string, format: date-time } } responses: @@ -2274,6 +2805,7 @@ paths: application/json: schema: { $ref: "#/components/schemas/AuditEventPage" } "403": { $ref: "#/components/responses/Forbidden" } + "422": { $ref: "#/components/responses/Unprocessable" } /audit-events/{id}: parameters: @@ -2344,6 +2876,78 @@ paths: schema: { $ref: "#/components/schemas/AuditExport" } "404": { $ref: "#/components/responses/NotFound" } + # ───────────────────────────── Usage & stats ───────────────────────────── + + /usage: + get: + operationId: usage.get + tags: [Usage & stats] + summary: Request counts, errors, and latency per day, week, or month + description: >- + From a daily rollup of the request log, refreshed hourly: the current UTC day covers up to + the last complete hour. Buckets are UTC; week is ISO (Monday start); period is the bucket's + first day, so the buckets at either end of the range may be partial. Rows are in the + caller's mode. Platform operations.view sees every row. An app-confined API Key sees only + its own Application's rows, and an Application's owner sees only that Application's rows by + passing application_id; both are forced. Anyone else gets 403. + x-substratal-phase: phase3 + parameters: + - $ref: "#/components/parameters/ApiVersion" + - name: since + in: query + description: "First day included (UTC). Default: 30 days before until." + schema: { type: string, format: date } + - name: until + in: query + description: "First day not included (UTC). Default: tomorrow, so today is included. At most 13 months after since." + schema: { type: string, format: date } + - name: granularity + in: query + schema: { type: string, enum: [day, week, month], default: day } + - name: group_by + in: query + description: "Split rows by these dimensions. Repeat for several. Without it, one row per period." + style: form + explode: true + schema: { type: array, items: { type: string, enum: [application, api_key, operation] } } + - { name: application_id, in: query, schema: { type: string } } + - { name: api_key_id, in: query, schema: { type: string } } + - { name: operation, in: query, description: "An operationId, such as users.list.", schema: { type: string } } + responses: + "400": { $ref: "#/components/responses/BadRequest" } + "200": + description: The usage report + content: + application/json: + schema: { $ref: "#/components/schemas/UsageReport" } + "403": { $ref: "#/components/responses/Forbidden" } + "422": { $ref: "#/components/responses/Unprocessable" } + + /stats: + get: + operationId: stats.get + tags: [Usage & stats] + summary: Current counts for the console's home screen, in one call + description: >- + Live counts, grouped by status, computed at most once a minute per server instance + (generated_at says when). Every known status is present, with 0 when nothing has it. + Counts are in the caller's mode. Platform-wide with operations.view or users.list. With + tenant_id, the counts are that Tenant's only, and its owner may call it too; users, + subscriptions, and organizations are then null, since they don't belong to a Tenant. + x-substratal-phase: phase3 + parameters: + - $ref: "#/components/parameters/ApiVersion" + - { name: tenant_id, in: query, schema: { type: string } } + responses: + "400": { $ref: "#/components/responses/BadRequest" } + "200": + description: The counts + content: + application/json: + schema: { $ref: "#/components/schemas/Stats" } + "403": { $ref: "#/components/responses/Forbidden" } + "404": { $ref: "#/components/responses/NotFound" } + # ───────────────────────────── Webhooks ───────────────────────────── /webhooks: @@ -2356,7 +2960,20 @@ paths: - $ref: "#/components/parameters/ApiVersion" - $ref: "#/components/parameters/Limit" - $ref: "#/components/parameters/Cursor" + - $ref: "#/components/parameters/Include" - { name: application_id, in: query, schema: { type: string } } + - name: status + in: query + description: "Subscriptions in any of these statuses. Repeatable." + style: form + explode: true + schema: { type: array, items: { type: string, enum: [healthy, unhealthy, disabled] }, maxItems: 3 } + - name: scope + in: query + description: >- + "platform" returns only platform-scoped subscriptions. Callers without webhooks.manage see none, so + they get an empty page. Can't be combined with application_id (400 invalid_request). + schema: { type: string, enum: [platform] } responses: "400": { $ref: "#/components/responses/BadRequest" } "200": @@ -2513,6 +3130,7 @@ paths: - $ref: "#/components/parameters/ApiVersion" - $ref: "#/components/parameters/Limit" - $ref: "#/components/parameters/Cursor" + - $ref: "#/components/parameters/Include" - { name: event_id, in: query, schema: { type: string } } - { name: status, in: query, schema: { type: string, enum: [pending, succeeded, failed] } } - { name: since, in: query, schema: { type: string, format: date-time } } @@ -2529,6 +3147,59 @@ paths: properties: data: { type: array, items: { $ref: "#/components/schemas/WebhookDelivery" } } + /webhook-deliveries: + get: + operationId: webhooks.listAllDeliveries + tags: [Webhooks] + summary: Delivery attempts across every subscription visible to the caller (30-day log) + description: >- + Scoped like GET /webhooks: webhooks.manage sees every subscription's deliveries, an Application's + owner and its app keys see only that Application's. A caller with no visible subscriptions gets an + empty page. Newest first. + x-substratal-phase: phase2 + parameters: + - $ref: "#/components/parameters/ApiVersion" + - $ref: "#/components/parameters/Limit" + - $ref: "#/components/parameters/Cursor" + - $ref: "#/components/parameters/Include" + - { name: status, in: query, schema: { type: string, enum: [pending, succeeded, failed] } } + - { name: since, in: query, description: "Deliveries created at or after this time.", schema: { type: string, format: date-time } } + - { name: until, in: query, description: "Deliveries created before this time.", schema: { type: string, format: date-time } } + - { name: application_id, in: query, schema: { type: string } } + - { name: subscription_id, in: query, schema: { type: string } } + - { name: event_type, in: query, schema: { $ref: "#/components/schemas/WebhookEvent" } } + responses: + "400": { $ref: "#/components/responses/BadRequest" } + "200": + description: A page of deliveries + content: + application/json: + schema: { $ref: "#/components/schemas/WebhookDeliveryPage" } + "422": { $ref: "#/components/responses/Unprocessable" } + + /webhooks/{id}/deliveries/{deliveryId}: + parameters: + - { name: id, in: path, required: true, schema: { type: string } } + - { name: deliveryId, in: path, required: true, schema: { type: string } } + get: + operationId: webhooks.getDelivery + parameters: + - $ref: "#/components/parameters/ApiVersion" + tags: [Webhooks] + summary: Fetch one delivery attempt (30-day log) + description: >- + Visible to whoever can read GET /webhooks/{id}/deliveries. 404 delivery_not_found when the + delivery isn't on that subscription or is older than the 30-day log. + x-substratal-phase: phase2 + responses: + "400": { $ref: "#/components/responses/BadRequest" } + "200": + description: The delivery + content: + application/json: + schema: { $ref: "#/components/schemas/WebhookDelivery" } + "404": { $ref: "#/components/responses/NotFound" } + /webhooks/{id}/deliveries/{deliveryId}/redeliver: parameters: - { name: id, in: path, required: true, schema: { type: string } } @@ -2547,6 +3218,34 @@ paths: # ───────────────────────────── Notifications ───────────────────────────── + /push-credentials: + get: + operationId: pushCredentials.listAll + tags: [Notifications] + summary: List push credentials across Applications (applications.manage, or an owner's own) + description: >- + applications.manage sees every Application's credentials. A User without it sees only the + credentials of Applications they own (owner_user_id, or an active org_admin of the owning + Organization); owning none is an empty list. Any other API Key, including an app key, gets 403 + and uses GET /applications/{id}/push-credentials instead. Never returns key material. Newest first. + x-substratal-phase: phase2 + parameters: + - $ref: "#/components/parameters/ApiVersion" + - $ref: "#/components/parameters/Limit" + - $ref: "#/components/parameters/Cursor" + - $ref: "#/components/parameters/Include" + - { name: status, in: query, schema: { type: string, enum: [active, failed, disabled] } } + - { name: provider, in: query, schema: { $ref: "#/components/schemas/PushProvider" } } + responses: + "400": { $ref: "#/components/responses/BadRequest" } + "200": + description: A page of push credentials + content: + application/json: + schema: { $ref: "#/components/schemas/PushCredentialPage" } + "403": { $ref: "#/components/responses/Forbidden" } + "422": { $ref: "#/components/responses/Unprocessable" } + /applications/{id}/push-credentials: parameters: - { name: id, in: path, required: true, schema: { type: string } } @@ -2974,9 +3673,11 @@ paths: - $ref: "#/components/parameters/ApiVersion" - $ref: "#/components/parameters/Limit" - $ref: "#/components/parameters/Cursor" + - $ref: "#/components/parameters/Include" - { name: scope, in: query, schema: { type: string } } - { name: mode, in: query, schema: { type: string, enum: [live, test] } } - { name: intended_use, in: query, schema: { type: string, enum: [service, agent] } } + - { name: q, in: query, description: "Case-insensitive prefix match on name", schema: { type: string } } - { name: include_inactive, in: query, description: "Include revoked and expired keys", schema: { type: boolean, default: false } } responses: "400": { $ref: "#/components/responses/BadRequest" } @@ -2992,6 +3693,8 @@ paths: tags: [API Keys] summary: Create a key (api_keys.manage, or the Application's owner for an app-scoped key) x-substratal-phase: mvp + x-substratal-step-up: conditional + x-substratal-step-up-when: "scope is platform" requestBody: required: true content: @@ -3027,10 +3730,12 @@ paths: "404": { $ref: "#/components/responses/NotFound" } patch: operationId: apiKeys.update + x-substratal-step-up: conditional + x-substratal-step-up-when: "rate_limit_per_minute is sent" parameters: - $ref: "#/components/parameters/ApiVersion" tags: [API Keys] - summary: Change name, permissions, or restrict_destructive + summary: Change name, permissions, restrict_destructive, or rate_limit_per_minute (api_keys.manage only) x-substratal-phase: mvp x-substratal-destructive: conditional x-substratal-destructive-when: "restrict_destructive set to false" @@ -3044,6 +3749,11 @@ paths: name: { type: string, maxLength: 100 } permissions: { type: array, items: { type: string } } restrict_destructive: { type: boolean } + rate_limit_per_minute: + type: [integer, "null"] + minimum: 1 + maximum: 10000 + description: Platform api_keys.manage only (403 forbidden otherwise). Null restores the platform default. responses: "400": { $ref: "#/components/responses/BadRequest" } "200": @@ -3086,6 +3796,79 @@ paths: schema: { $ref: "#/components/schemas/ApiKeyWithSecret" } "404": { $ref: "#/components/responses/NotFound" } + # ───────────────────────────── Platform ───────────────────────────── + + /platform/settings: + get: + operationId: platform.getSettings + tags: [Platform] + summary: Read the platform's runtime switches and client feature flags + description: >- + Authentication is optional. Without a Bearer token: signup_open and + announcement, for live mode, or for test mode with test_mode=true. + With one: the caller's own mode, plus client_flags. With + operations.view, also read_only and updated_at, read fresh; everyone + else may get a copy up to 30 seconds old. ETag is the row's version. + security: + - {} + - bearerAuth: [] + x-substratal-phase: phase3 + parameters: + - $ref: "#/components/parameters/ApiVersion" + - name: test_mode + in: query + required: false + description: "Unauthenticated callers only: read test mode's settings. An authenticated caller always reads its own mode." + schema: { type: boolean, default: false } + responses: + "400": { $ref: "#/components/responses/BadRequest" } + "200": + description: The settings visible to this caller + headers: + ETag: { $ref: "#/components/headers/ETag" } + content: + application/json: + schema: { $ref: "#/components/schemas/PlatformSettings" } + "401": { $ref: "#/components/responses/Unauthorized" } + "429": { $ref: "#/components/responses/TooManyRequests" } + patch: + operationId: platform.updateSettings + tags: [Platform] + summary: Change the platform's runtime switches and client feature flags (operations.manage) + description: >- + Changes the settings of the caller's mode. If-Match is required (400 + if_match_required without it). client_flags is merged one level deep, + and a flag sent as null is removed. announcement is replaced, and null + clears it. Writes platform.settings_updated with before and after. + Other API instances pick the change up within 30 seconds. It stays + callable while read_only is on, so the freeze can always be lifted. + x-substratal-phase: phase3 + x-substratal-step-up: always + parameters: + - $ref: "#/components/parameters/ApiVersion" + - name: If-Match + in: header + required: true + description: The ETag from a prior read. Missing is 400 if_match_required; a mismatch is 409 version_conflict. + schema: { type: string } + requestBody: + required: true + content: + application/json: + schema: { $ref: "#/components/schemas/PlatformSettingsWrite" } + responses: + "400": { $ref: "#/components/responses/BadRequest" } + "200": + description: The updated settings, as an operations.view caller sees them + headers: + ETag: { $ref: "#/components/headers/ETag" } + content: + application/json: + schema: { $ref: "#/components/schemas/PlatformSettings" } + "403": { $ref: "#/components/responses/Forbidden" } + "409": { $ref: "#/components/responses/Conflict" } + "422": { $ref: "#/components/responses/Unprocessable" } + components: securitySchemes: bearerAuth: @@ -3120,6 +3903,14 @@ components: name: cursor in: query schema: { type: string } + Include: + name: include + in: query + description: >- + `total` adds `page.total` and `page.total_capped`: the number of rows + matching the current filters across every page, counted up to 10,000 + (Conventions → Pagination). Omitted unless requested. + schema: { type: string, enum: [total] } IdempotencyKey: name: Idempotency-Key in: header @@ -3161,7 +3952,7 @@ components: application/json: schema: { $ref: "#/components/schemas/Error" } Forbidden: - description: "Authenticated but not permitted (forbidden, destructive_operation_restricted, entitlement_required, role_escalation_forbidden, …)" + description: "Authenticated but not permitted (forbidden, destructive_operation_restricted, entitlement_required, role_escalation_forbidden, mfa_enrollment_required, reauthentication_required, …)" content: application/json: schema: { $ref: "#/components/schemas/Error" } @@ -3219,6 +4010,46 @@ components: code: { type: string } additionalProperties: true + BulkItemError: + type: object + description: The error object the single call would have returned, without the outer error envelope. + required: [code, message] + properties: + code: { type: string, example: user_protected } + message: { type: string } + details: { type: object, additionalProperties: true } + + BulkResults: + type: object + description: One result per requested item, in request order (Conventions → Bulk operations). + required: [results] + properties: + results: + type: array + items: + type: object + required: [id, status] + properties: + id: { type: string, description: The item's id, as sent } + status: { type: integer, description: "The status the single call would have returned: 200 on success, otherwise the error's 4xx or 500" } + error: { $ref: "#/components/schemas/BulkItemError" } + + BulkInviteResults: + type: object + description: One result per requested email, in request order (Conventions → Bulk operations). + required: [results] + properties: + results: + type: array + items: + type: object + required: [email, status] + properties: + email: { type: string, description: The email, as sent } + status: { type: integer, description: "The status POST /users would have returned: 201 on success, otherwise the error's 4xx or 500" } + user_id: { type: string, description: The new User's id. Present only on 201. } + error: { $ref: "#/components/schemas/BulkItemError" } + OAuthError: type: object required: [error] @@ -3232,6 +4063,16 @@ components: properties: next_cursor: { type: [string, "null"] } has_more: { type: boolean } + total: + type: integer + minimum: 0 + maximum: 10000 + description: >- + Only with `include=total`. Rows matching the current filters across + every page, ignoring `cursor`; 10000 when capped. + total_capped: + type: boolean + description: Only with `include=total`. True when there are more than 10,000 matching rows. PageEnvelope: type: object @@ -3264,6 +4105,15 @@ components: user_id: { type: string } email_verified: { type: boolean } + Reauthentication: + type: object + required: [token_type, access_token, expires_in, mfa_verified_at] + properties: + token_type: { type: string, enum: [Bearer] } + access_token: { type: string, description: "A new platform access token for the same session, carrying the updated mfa_verified_at claim." } + expires_in: { type: integer, example: 900 } + mfa_verified_at: { type: string, format: date-time, description: "When this session last proved a second factor: now." } + MfaChallenge: type: object required: [mfa_required, mfa_token, methods, expires_in] @@ -3337,6 +4187,7 @@ components: pending_email: { type: [string, "null"], format: email } status: { $ref: "#/components/schemas/UserStatus" } mfa_enabled: { type: boolean } + mfa_enrollment_required: { type: boolean, description: "Staff (holding a platform Role that grants a permission) without TOTP. Once staff MFA is enforced, their sessions can only enroll, read themselves, change password, and log out (Auth → Staff MFA)." } signup_application_id: { type: [string, "null"] } test_mode: { type: boolean } created_at: { type: string, format: date-time } @@ -3431,6 +4282,31 @@ components: locale: { type: string, readOnly: true, example: en-US, description: "Mirror of the global Settings locale; write it there." } updated_at: { type: string, format: date-time } + ImageUploadRequest: + type: object + required: [content_type, content_length] + properties: + content_type: { type: string, enum: [image/png, image/jpeg, image/webp] } + content_length: { type: integer, minimum: 1, description: "The file's size in bytes. At most 2097152 for an avatar, 1048576 for an icon." } + + ImageUpload: + type: object + required: [id, url, fields, content_type, max_bytes, expires_at] + description: >- + A presigned POST. Send multipart/form-data to url with every entry of fields, then the + file as the last field, named file. The upload is accepted only with that content_type and + at most max_bytes, until expires_at. + properties: + id: { type: string, description: "The upload id (upl_…) to complete." } + url: { type: string, description: "Where to POST the form." } + fields: + type: object + additionalProperties: { type: string } + description: "Form fields to send unchanged, including key, Content-Type, policy, and signature." + content_type: { type: string, enum: [image/png, image/jpeg, image/webp] } + max_bytes: { type: integer } + expires_at: { type: string, format: date-time } + AppProfile: type: object properties: @@ -3479,7 +4355,7 @@ components: ApplicationReviewStatus: type: string - enum: [approved, pending_review, rejected, suspended] + enum: [approved, pending_review, rejected, suspended, retired] ApplicationPermission: type: object @@ -3490,11 +4366,19 @@ components: ApplicationAccessTier: type: string - enum: [free, standard] - description: "Which plan unlocks the Application: free for every User, standard for Users covered by a Standard subscription. Set by applications.manage; defaults to standard." + enum: [free, standard, restricted] + description: >- + Who gets in without a grant. free: every User. standard: Users covered by a Standard + subscription; first_party (Substratal's own) Applications only. restricted: only the people + the developer grants Entitlements to, from their own billing or none. A first-party + Application defaults to standard and only applications.manage changes its tier. Any other + Application defaults to restricted, and its owner chooses free or restricted while it's + approved or pending_review (409 application_not_available otherwise, at most 10 changes a + day). standard on one that isn't first-party is 422 access_tier_reserved. ApplicationSummary: type: object + required: [id, slug, name, description, icon_url, visibility, access_tier, review_status, review_requested_at, owner_user_id, owner_organization_id, holder_count] properties: id: { type: string } slug: { type: string } @@ -3504,6 +4388,10 @@ components: visibility: { $ref: "#/components/schemas/ApplicationVisibility" } access_tier: { $ref: "#/components/schemas/ApplicationAccessTier" } review_status: { $ref: "#/components/schemas/ApplicationReviewStatus" } + review_requested_at: { type: [string, "null"], format: date-time, readOnly: true, description: "When the Application last entered pending_review. See Application." } + owner_user_id: { type: [string, "null"] } + owner_organization_id: { type: [string, "null"] } + holder_count: { type: integer, minimum: 0, description: "Active Entitlements for the Application; a User grant and an Organization grant count once each" } ApplicationSummaryPage: allOf: @@ -3529,6 +4417,7 @@ components: default_app_role: { type: [string, "null"] } visibility: { $ref: "#/components/schemas/ApplicationVisibility" } access_tier: { $ref: "#/components/schemas/ApplicationAccessTier" } + first_party: { type: boolean, default: false, description: "Substratal's own Application. Only applications.manage sets it, and only a first-party Application can be access_tier standard. Staff-created customer Applications (concierge onboarding) aren't first-party." } owner_user_id: { type: [string, "null"] } owner_organization_id: { type: [string, "null"] } review_status: { $ref: "#/components/schemas/ApplicationReviewStatus" } @@ -3548,6 +4437,7 @@ components: properties: stale_override_counts: { type: object, additionalProperties: { type: integer } } self_registered: { type: boolean, readOnly: true, description: "true when a developer submitted it themselves, not staff. A self-registered Application must use the hosted sign-in flow (POST /auth/app-tokens returns 403 embedded_login_not_allowed), and only applications.manage can turn on receives_platform_notifications for it." } + review_requested_at: { type: [string, "null"], format: date-time, readOnly: true, description: "When the Application last entered pending_review. See Application." } test_mode: { type: boolean } created_at: { type: string, format: date-time } updated_at: { type: string, format: date-time } @@ -3658,6 +4548,7 @@ components: assigned_at: { type: [string, "null"], format: date-time } assigned_by: { oneOf: [ { $ref: "#/components/schemas/Actor" }, { type: "null" } ] } implicit: { type: boolean } + mfa_enrollment_required: { type: boolean, description: "On POST /users/{id}/roles/{roleId} only: the User is now staff but has no TOTP, so their platform Roles take effect once they enroll (Auth → Staff MFA)." } UserRoleAssignmentPage: allOf: @@ -3844,6 +4735,21 @@ components: created_at: { type: string, format: date-time } updated_at: { type: string, format: date-time } + SubscriptionListItem: + allOf: + - $ref: "#/components/schemas/Subscription" + - type: object + properties: + user_email: { type: [string, "null"], format: email, description: "Individual subscriptions: the User's email, for display." } + organization_name: { type: [string, "null"], description: "Organization subscriptions: the Organization's name, for display." } + + SubscriptionPage: + allOf: + - $ref: "#/components/schemas/PageEnvelope" + - type: object + properties: + data: { type: array, items: { $ref: "#/components/schemas/SubscriptionListItem" } } + UserSubscription: type: object properties: @@ -3901,6 +4807,10 @@ components: - user.mfa_reset - user.sessions_revoked - audit.exported + - application.retired + - application.deleted + - profile.avatar_changed + - application.icon_changed - entitlement.granted - entitlement.disabled - entitlement.revoked @@ -3945,10 +4855,55 @@ components: - push_credential.updated - push_credential.deleted - device.deleted + - platform.settings_updated AuditTargetType: type: string - enum: [user, entitlement, role, role_assignment, application, organization, subscription, tenant, tier_change_request, api_key, webhook, push_credential, device, audit_export] + enum: [user, entitlement, role, role_assignment, application, organization, subscription, tenant, tier_change_request, api_key, webhook, push_credential, device, audit_export, platform_settings] + + PlatformAnnouncement: + type: object + required: [text, level] + additionalProperties: false + properties: + text: { type: string, minLength: 1, maxLength: 500 } + level: { type: string, enum: [info, warning, critical] } + + PlatformSettings: + type: object + description: >- + signup_open and announcement are always present. client_flags needs + an authenticated caller; read_only and updated_at need + operations.view. + required: [signup_open, announcement] + properties: + signup_open: { type: boolean, description: "false closes POST /auth/signup (403 signup_closed). Invitations still work." } + announcement: + description: A banner for clients to show, or null. + oneOf: + - $ref: "#/components/schemas/PlatformAnnouncement" + - type: "null" + client_flags: + type: object + description: Remote-configurable client feature flags, flag name to boolean. At most 100. + additionalProperties: { type: boolean } + read_only: { type: boolean, description: "true answers every non-GET from a caller without superadmin with 503 service_unavailable and Retry-After: 300. Sign-in, refresh, logout, session revocation, and token issuance stay open." } + updated_at: { type: string, format: date-time } + + PlatformSettingsWrite: + type: object + properties: + signup_open: { type: boolean } + read_only: { type: boolean } + client_flags: + type: object + description: "Merged one level deep: each flag sent replaces that flag, and a flag sent as null is removed. Names match ^[a-z][a-z0-9_]{0,63}$; at most 100 after the merge." + additionalProperties: { type: [boolean, "null"] } + announcement: + description: Replaces the announcement; null clears it. + oneOf: + - $ref: "#/components/schemas/PlatformAnnouncement" + - type: "null" AuditExportRequest: type: object @@ -3964,6 +4919,7 @@ components: application_id: { type: string } organization_id: { type: string } tenant_id: { type: string } + request_id: { type: string, maxLength: 128 } since: { type: string, format: date-time } until: { type: string, format: date-time } @@ -3983,6 +4939,119 @@ components: expires_at: { type: string, format: date-time, description: "When the file and this record are deleted: 7 days after the request." } test_mode: { type: boolean } + UsageReport: + type: object + required: [since, until, granularity, group_by, data] + properties: + since: { type: string, format: date } + until: { type: string, format: date } + granularity: { type: string, enum: [day, week, month] } + group_by: { type: array, items: { type: string, enum: [application, api_key, operation] } } + data: + type: array + description: "Oldest period first, then by the grouped dimensions. Periods and groups with no requests are omitted." + items: { $ref: "#/components/schemas/UsageRow" } + + UsageRow: + type: object + required: [period, requests, errors_4xx, errors_5xx, latency_ms_avg, latency_ms_max] + properties: + period: { type: string, format: date, description: "The bucket's first day (UTC)." } + application_id: { type: [string, "null"], description: "Only with group_by=application. null for requests that didn't resolve to exactly one Application." } + api_key_id: { type: [string, "null"], description: "Only with group_by=api_key. null for requests made without an API Key." } + operation: { type: string, description: "Only with group_by=operation. The operationId." } + requests: { type: integer } + errors_4xx: { type: integer } + errors_5xx: { type: integer } + latency_ms_avg: { type: integer, description: "Mean latency, rounded to the millisecond." } + latency_ms_max: { type: integer } + + Stats: + type: object + required: [tenant_id, generated_at, users, applications, entitlements, subscriptions, organizations, + webhook_subscriptions, push_credentials, tier_change_requests] + properties: + tenant_id: { type: [string, "null"], description: "The Tenant the counts are confined to, or null for platform-wide." } + generated_at: { type: string, format: date-time, description: "When these counts were computed. At most a minute old." } + users: + description: "Users by status. null when tenant_id is set." + oneOf: + - type: "null" + - type: object + required: [active, invited, suspended, deleted] + properties: + active: { type: integer } + invited: { type: integer } + suspended: { type: integer } + deleted: { type: integer } + applications: + type: object + required: [by_review_status, by_access_tier] + properties: + by_review_status: + type: object + required: [approved, pending_review, rejected, suspended, retired] + properties: + approved: { type: integer } + pending_review: { type: integer } + rejected: { type: integer } + suspended: { type: integer } + retired: { type: integer } + by_access_tier: + type: object + required: [free, standard] + properties: + free: { type: integer } + standard: { type: integer } + entitlements: + type: object + description: Entitlements by status. + required: [active, disabled, expired, revoked] + properties: + active: { type: integer } + disabled: { type: integer } + expired: { type: integer } + revoked: { type: integer } + subscriptions: + description: "Covering subscriptions (active, trialing, or past_due) by subscriber type. null when tenant_id is set." + oneOf: + - type: "null" + - type: object + required: [user, organization] + properties: + user: { type: integer } + organization: { type: integer } + organizations: + description: "Organizations by status. null when tenant_id is set." + oneOf: + - type: "null" + - type: object + required: [active, suspended] + properties: + active: { type: integer } + suspended: { type: integer } + webhook_subscriptions: + type: object + description: Webhook subscriptions by status. + required: [healthy, unhealthy, disabled] + properties: + healthy: { type: integer } + unhealthy: { type: integer } + disabled: { type: integer } + push_credentials: + type: object + description: Applications' push credentials by status. + required: [active, failed, disabled] + properties: + active: { type: integer } + failed: { type: integer } + disabled: { type: integer } + tier_change_requests: + type: object + required: [open] + properties: + open: { type: integer, description: "Requests that are pending, scheduled, or in_progress." } + ScimToken: type: object properties: @@ -4069,6 +5138,7 @@ components: - user_deleted - test_user_expired - test_user_extended + - application_retired WebhookEventEnvelope: type: object @@ -4127,6 +5197,21 @@ components: next_retry_at: { type: [string, "null"], format: date-time } created_at: { type: string, format: date-time } + WebhookDeliveryListItem: + allOf: + - $ref: "#/components/schemas/WebhookDelivery" + - type: object + properties: + subscription_id: { type: string } + scope: { type: string, description: "The subscription's scope: an application_id, or 'platform'." } + + WebhookDeliveryPage: + allOf: + - $ref: "#/components/schemas/PageEnvelope" + - type: object + properties: + data: { type: array, items: { $ref: "#/components/schemas/WebhookDeliveryListItem" } } + # ── Notifications ── PushProvider: type: string @@ -4163,7 +5248,7 @@ components: id: { type: string, description: "pcr_…" } application_id: { type: string } provider: { $ref: "#/components/schemas/PushProvider" } - status: { type: string, enum: [active, failed] } + status: { type: string, enum: [active, failed, disabled], description: "disabled: the Application was retired." } team_id: { type: string, description: "apns" } key_id: { type: string, description: "apns" } topic: { type: string, description: "apns" } @@ -4183,13 +5268,20 @@ components: properties: data: { type: array, maxItems: 3, items: { $ref: "#/components/schemas/PushCredential" } } + PushCredentialPage: + allOf: + - $ref: "#/components/schemas/PageEnvelope" + - type: object + properties: + data: { type: array, items: { $ref: "#/components/schemas/PushCredential" } } + DeviceStatus: type: string enum: [active, inactive] DeviceInactiveReason: type: string - enum: [unregistered, session_revoked, user_suspended, user_deleted, test_user_expired, stale, limit, credential_removed] + enum: [unregistered, session_revoked, user_suspended, user_deleted, test_user_expired, stale, limit, credential_removed, application_retired] WebPushSubscription: type: object @@ -4413,6 +5505,15 @@ components: type: boolean description: "When true, every operation marked x-substratal-destructive is rejected with 403 destructive_operation_restricted." expires_at: { type: [string, "null"], format: date-time } + rate_limit_per_minute: + type: [integer, "null"] + minimum: 1 + maximum: 10000 + description: >- + Replaces the default 100 requests/minute for this key. Null (the + default) means the platform default. Operations with their own + ceiling keep it. Only platform api_keys.manage may send it; anyone + else gets 403 forbidden. ApiKey: allOf: diff --git a/src/Substratal.Hub.Core/Api/Generated/ApiKeys/ApiKeysRequestBuilder.cs b/src/Substratal.Hub.Core/Api/Generated/ApiKeys/ApiKeysRequestBuilder.cs index 3d3ebe4..4dfeb66 100644 --- a/src/Substratal.Hub.Core/Api/Generated/ApiKeys/ApiKeysRequestBuilder.cs +++ b/src/Substratal.Hub.Core/Api/Generated/ApiKeys/ApiKeysRequestBuilder.cs @@ -35,7 +35,7 @@ public partial class ApiKeysRequestBuilder : BaseRequestBuilder /// /// Path parameters for the request /// The request adapter to use to execute the requests. - public ApiKeysRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/api-keys{?cursor*,include_inactive*,intended_use*,limit*,mode*,scope*}", pathParameters) + public ApiKeysRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/api-keys{?cursor*,include*,include_inactive*,intended_use*,limit*,mode*,q*,scope*}", pathParameters) { } /// @@ -43,7 +43,7 @@ public ApiKeysRequestBuilder(Dictionary pathParameters, IRequest /// /// The raw URL to use for the request builder. /// The request adapter to use to execute the requests. - public ApiKeysRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/api-keys{?cursor*,include_inactive*,intended_use*,limit*,mode*,scope*}", rawUrl) + public ApiKeysRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/api-keys{?cursor*,include*,include_inactive*,intended_use*,limit*,mode*,q*,scope*}", rawUrl) { } /// @@ -167,6 +167,9 @@ public partial class ApiKeysRequestBuilderGetQueryParameters public string Cursor { get; set; } #pragma warning restore CS1591 #endif + /// `total` adds `page.total` and `page.total_capped`: the number of rows matching the current filters across every page, counted up to 10,000 (Conventions → Pagination). Omitted unless requested. + [QueryParameter("include")] + public global::Substratal.Hub.Core.Api.Generated.ApiKeys.GetIncludeQueryParameterType? Include { get; set; } /// Include revoked and expired keys [QueryParameter("include_inactive")] public bool? IncludeInactive { get; set; } @@ -182,6 +185,16 @@ public partial class ApiKeysRequestBuilderGetQueryParameters [QueryParameter("mode")] public global::Substratal.Hub.Core.Api.Generated.ApiKeys.GetModeQueryParameterType? Mode { get; set; } #pragma warning restore CS1591 + /// Case-insensitive prefix match on name +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("q")] + public string? Q { get; set; } +#nullable restore +#else + [QueryParameter("q")] + public string Q { get; set; } +#endif #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable #pragma warning disable CS1591 diff --git a/src/Substratal.Hub.Core/Api/Generated/ApiKeys/GetIncludeQueryParameterType.cs b/src/Substratal.Hub.Core/Api/Generated/ApiKeys/GetIncludeQueryParameterType.cs new file mode 100644 index 0000000..5aef3b1 --- /dev/null +++ b/src/Substratal.Hub.Core/Api/Generated/ApiKeys/GetIncludeQueryParameterType.cs @@ -0,0 +1,16 @@ +// +using System.Runtime.Serialization; +using System; +namespace Substratal.Hub.Core.Api.Generated.ApiKeys +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetIncludeQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "total")] + #pragma warning disable CS1591 + Total, + #pragma warning restore CS1591 + } +} diff --git a/src/Substratal.Hub.Core/Api/Generated/ApiKeys/Item/ApiKeysItemRequestBuilder.cs b/src/Substratal.Hub.Core/Api/Generated/ApiKeys/Item/ApiKeysItemRequestBuilder.cs index 4d44757..09fa238 100644 --- a/src/Substratal.Hub.Core/Api/Generated/ApiKeys/Item/ApiKeysItemRequestBuilder.cs +++ b/src/Substratal.Hub.Core/Api/Generated/ApiKeys/Item/ApiKeysItemRequestBuilder.cs @@ -89,7 +89,7 @@ public async Task DeleteAsync(Action(requestInfo, global::Substratal.Hub.Core.Api.Generated.Models.ApiKey.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Change name, permissions, or restrict_destructive + /// Change name, permissions, restrict_destructive, or rate_limit_per_minute (api_keys.manage only) /// /// A /// The request body @@ -156,7 +156,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Change name, permissions, or restrict_destructive + /// Change name, permissions, restrict_destructive, or rate_limit_per_minute (api_keys.manage only) /// /// A /// The request body diff --git a/src/Substratal.Hub.Core/Api/Generated/ApiKeys/Item/ApiKeysPatchRequestBody.cs b/src/Substratal.Hub.Core/Api/Generated/ApiKeys/Item/ApiKeysPatchRequestBody.cs index 29ead53..2801f84 100644 --- a/src/Substratal.Hub.Core/Api/Generated/ApiKeys/Item/ApiKeysPatchRequestBody.cs +++ b/src/Substratal.Hub.Core/Api/Generated/ApiKeys/Item/ApiKeysPatchRequestBody.cs @@ -53,6 +53,12 @@ public List Permissions set { BackingStore?.Set("permissions", value); } } #endif + /// Platform api_keys.manage only (403 forbidden otherwise). Null restores the platform default. + public int? RateLimitPerMinute + { + get { return BackingStore?.Get("rate_limit_per_minute"); } + set { BackingStore?.Set("rate_limit_per_minute", value); } + } /// The restrict_destructive property public bool? RestrictDestructive { @@ -87,6 +93,7 @@ public virtual IDictionary> GetFieldDeserializers() { { "name", n => { Name = n.GetStringValue(); } }, { "permissions", n => { Permissions = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "rate_limit_per_minute", n => { RateLimitPerMinute = n.GetIntValue(); } }, { "restrict_destructive", n => { RestrictDestructive = n.GetBoolValue(); } }, }; } @@ -99,6 +106,7 @@ public virtual void Serialize(ISerializationWriter writer) if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("name", Name); writer.WriteCollectionOfPrimitiveValues("permissions", Permissions); + writer.WriteIntValue("rate_limit_per_minute", RateLimitPerMinute); writer.WriteBoolValue("restrict_destructive", RestrictDestructive); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Substratal.Hub.Core/Api/Generated/Applications/ApplicationsRequestBuilder.cs b/src/Substratal.Hub.Core/Api/Generated/Applications/ApplicationsRequestBuilder.cs index 9ac45d2..520f21b 100644 --- a/src/Substratal.Hub.Core/Api/Generated/Applications/ApplicationsRequestBuilder.cs +++ b/src/Substratal.Hub.Core/Api/Generated/Applications/ApplicationsRequestBuilder.cs @@ -35,7 +35,7 @@ public partial class ApplicationsRequestBuilder : BaseRequestBuilder /// /// Path parameters for the request /// The request adapter to use to execute the requests. - public ApplicationsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/applications{?access_tier*,cursor*,limit*,owned*,owner_organization_id*,owner_user_id*,review_status*,tenant_id*,visibility*}", pathParameters) + public ApplicationsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/applications{?access_tier*,cursor*,include*,include_inactive*,limit*,owned*,owner_organization_id*,owner_user_id*,q*,review_status*,sort*,tenant_id*,visibility*}", pathParameters) { } /// @@ -43,16 +43,17 @@ public ApplicationsRequestBuilder(Dictionary pathParameters, IRe /// /// The raw URL to use for the request builder. /// The request adapter to use to execute the requests. - public ApplicationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/applications{?access_tier*,cursor*,limit*,owned*,owner_organization_id*,owner_user_id*,review_status*,tenant_id*,visibility*}", rawUrl) + public ApplicationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/applications{?access_tier*,cursor*,include*,include_inactive*,limit*,owned*,owner_organization_id*,owner_user_id*,q*,review_status*,sort*,tenant_id*,visibility*}", rawUrl) { } /// - /// List the catalog (filtered by visibility rules) + /// Newest first by created_at, ties broken by id. With applications.manage, review_status=pending_review is the review queue and defaults to oldest-waiting first, by review_requested_at (falling back to created_at). sort sets the order explicitly by created_at: created_at for oldest first, -created_at for newest first, in the queue too. A cursor is only valid under the sort it was issued with. /// /// A /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 400 status code + /// When receiving a 422 status code #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) @@ -66,11 +67,12 @@ public ApplicationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) var errorMapping = new Dictionary> { { "400", global::Substratal.Hub.Core.Api.Generated.Models.Error.CreateFromDiscriminatorValue }, + { "422", global::Substratal.Hub.Core.Api.Generated.Models.Error.CreateFromDiscriminatorValue }, }; return await RequestAdapter.SendAsync(requestInfo, global::Substratal.Hub.Core.Api.Generated.Models.ApplicationSummaryPage.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// applications.manage creates any Application, approved by default (concierge onboarding). Any other User with a verified email may submit their own: it's owned by the caller (or an Organization they're an org_admin of), starts in pending_review, and can't set visibility, access_tier, review_status, or review_notes (403 moderation_field_forbidden). Unverified email is 403 email_not_verified; API Keys without applications.manage are 403 forbidden. Self-service submissions are limited to 10 per User per day. + /// applications.manage creates any Application, approved by default (concierge onboarding). Any other User with a verified email may submit their own: it's owned by the caller (or an Organization they're an org_admin of), starts in pending_review, and can't set visibility, review_status, or review_notes (403 moderation_field_forbidden). Its access_tier is free or restricted (the default); standard is 422 access_tier_reserved. Unverified email is 403 email_not_verified; API Keys without applications.manage are 403 forbidden. Self-service submissions are limited to 10 per User per day. /// /// A /// The request body @@ -103,7 +105,7 @@ public ApplicationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) return await RequestAdapter.SendAsync(requestInfo, global::Substratal.Hub.Core.Api.Generated.Models.Application.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// List the catalog (filtered by visibility rules) + /// Newest first by created_at, ties broken by id. With applications.manage, review_status=pending_review is the review queue and defaults to oldest-waiting first, by review_requested_at (falling back to created_at). sort sets the order explicitly by created_at: created_at for oldest first, -created_at for newest first, in the queue too. A cursor is only valid under the sort it was issued with. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -122,7 +124,7 @@ public RequestInformation ToGetRequestInformation(Action - /// applications.manage creates any Application, approved by default (concierge onboarding). Any other User with a verified email may submit their own: it's owned by the caller (or an Organization they're an org_admin of), starts in pending_review, and can't set visibility, access_tier, review_status, or review_notes (403 moderation_field_forbidden). Unverified email is 403 email_not_verified; API Keys without applications.manage are 403 forbidden. Self-service submissions are limited to 10 per User per day. + /// applications.manage creates any Application, approved by default (concierge onboarding). Any other User with a verified email may submit their own: it's owned by the caller (or an Organization they're an org_admin of), starts in pending_review, and can't set visibility, review_status, or review_notes (403 moderation_field_forbidden). Its access_tier is free or restricted (the default); standard is 422 access_tier_reserved. Unverified email is 403 email_not_verified; API Keys without applications.manage are 403 forbidden. Self-service submissions are limited to 10 per User per day. /// /// A /// The request body @@ -153,7 +155,7 @@ public RequestInformation ToPostRequestInformation(global::Substratal.Hub.Core.A return new global::Substratal.Hub.Core.Api.Generated.Applications.ApplicationsRequestBuilder(rawUrl, RequestAdapter); } /// - /// List the catalog (filtered by visibility rules) + /// Newest first by created_at, ties broken by id. With applications.manage, review_status=pending_review is the review queue and defaults to oldest-waiting first, by review_requested_at (falling back to created_at). sort sets the order explicitly by created_at: created_at for oldest first, -created_at for newest first, in the queue too. A cursor is only valid under the sort it was issued with. /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] public partial class ApplicationsRequestBuilderGetQueryParameters @@ -175,6 +177,12 @@ public partial class ApplicationsRequestBuilderGetQueryParameters public string Cursor { get; set; } #pragma warning restore CS1591 #endif + /// `total` adds `page.total` and `page.total_capped`: the number of rows matching the current filters across every page, counted up to 10,000 (Conventions → Pagination). Omitted unless requested. + [QueryParameter("include")] + public global::Substratal.Hub.Core.Api.Generated.Applications.GetIncludeQueryParameterType? Include { get; set; } + /// Include retired Applications (also included by review_status=retired) + [QueryParameter("include_inactive")] + public bool? IncludeInactive { get; set; } #pragma warning disable CS1591 [QueryParameter("limit")] public int? Limit { get; set; } @@ -208,11 +216,24 @@ public partial class ApplicationsRequestBuilderGetQueryParameters [QueryParameter("owner_user_id")] public string OwnerUserId { get; set; } #pragma warning restore CS1591 +#endif + /// Case-insensitive prefix match on name or slug +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("q")] + public string? Q { get; set; } +#nullable restore +#else + [QueryParameter("q")] + public string Q { get; set; } #endif #pragma warning disable CS1591 [QueryParameter("review_status")] public global::Substratal.Hub.Core.Api.Generated.Models.ApplicationReviewStatus? ReviewStatus { get; set; } #pragma warning restore CS1591 + /// created_at (oldest first) or -created_at (newest first). Ties are broken by id in the same direction. + [QueryParameter("sort")] + public global::Substratal.Hub.Core.Api.Generated.Applications.GetSortQueryParameterType? Sort { get; set; } #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable #pragma warning disable CS1591 diff --git a/src/Substratal.Hub.Core/Api/Generated/Applications/GetIncludeQueryParameterType.cs b/src/Substratal.Hub.Core/Api/Generated/Applications/GetIncludeQueryParameterType.cs new file mode 100644 index 0000000..97db43b --- /dev/null +++ b/src/Substratal.Hub.Core/Api/Generated/Applications/GetIncludeQueryParameterType.cs @@ -0,0 +1,16 @@ +// +using System.Runtime.Serialization; +using System; +namespace Substratal.Hub.Core.Api.Generated.Applications +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetIncludeQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "total")] + #pragma warning disable CS1591 + Total, + #pragma warning restore CS1591 + } +} diff --git a/src/Substratal.Hub.Core/Api/Generated/Applications/GetSortQueryParameterType.cs b/src/Substratal.Hub.Core/Api/Generated/Applications/GetSortQueryParameterType.cs new file mode 100644 index 0000000..d62f216 --- /dev/null +++ b/src/Substratal.Hub.Core/Api/Generated/Applications/GetSortQueryParameterType.cs @@ -0,0 +1,20 @@ +// +using System.Runtime.Serialization; +using System; +namespace Substratal.Hub.Core.Api.Generated.Applications +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetSortQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "created_at")] + #pragma warning disable CS1591 + Created_at, + #pragma warning restore CS1591 + [EnumMember(Value = "-created_at")] + #pragma warning disable CS1591 + Minus_created_at, + #pragma warning restore CS1591 + } +} diff --git a/src/Substratal.Hub.Core/Api/Generated/Applications/Item/ApplicationsItemRequestBuilder.cs b/src/Substratal.Hub.Core/Api/Generated/Applications/Item/ApplicationsItemRequestBuilder.cs index 4dedd17..5b99702 100644 --- a/src/Substratal.Hub.Core/Api/Generated/Applications/Item/ApplicationsItemRequestBuilder.cs +++ b/src/Substratal.Hub.Core/Api/Generated/Applications/Item/ApplicationsItemRequestBuilder.cs @@ -3,6 +3,7 @@ using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; +using Substratal.Hub.Core.Api.Generated.Applications.Item.Icon; using Substratal.Hub.Core.Api.Generated.Applications.Item.PushCredentials; using Substratal.Hub.Core.Api.Generated.Models; using System.Collections.Generic; @@ -18,6 +19,11 @@ namespace Substratal.Hub.Core.Api.Generated.Applications.Item [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] public partial class ApplicationsItemRequestBuilder : BaseRequestBuilder { + /// The icon property + public global::Substratal.Hub.Core.Api.Generated.Applications.Item.Icon.IconRequestBuilder Icon + { + get => new global::Substratal.Hub.Core.Api.Generated.Applications.Item.Icon.IconRequestBuilder(PathParameters, RequestAdapter); + } /// The pushCredentials property public global::Substratal.Hub.Core.Api.Generated.Applications.Item.PushCredentials.PushCredentialsRequestBuilder PushCredentials { @@ -40,6 +46,34 @@ public ApplicationsItemRequestBuilder(string rawUrl, IRequestAdapter requestAdap { } /// + /// Only a test-mode Application that nothing references can be deleted; a live one is 409 application_not_deletable (retire it with review_status: retired instead). Anything still referencing it (Entitlements, API Keys, webhooks, devices, notifications, settings or profile rows, push credentials, role assignments, refresh tokens, Users who signed up through it) is 409 application_in_use, naming each kind in `references`. Its own Roles go with it; audit history is kept. Writes application.deleted. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 409 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Substratal.Hub.Core.Api.Generated.Models.Error.CreateFromDiscriminatorValue }, + { "403", global::Substratal.Hub.Core.Api.Generated.Models.Error.CreateFromDiscriminatorValue }, + { "404", global::Substratal.Hub.Core.Api.Generated.Models.Error.CreateFromDiscriminatorValue }, + { "409", global::Substratal.Hub.Core.Api.Generated.Models.Error.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// /// Fetch one Application /// /// A @@ -75,6 +109,7 @@ public ApplicationsItemRequestBuilder(string rawUrl, IRequestAdapter requestAdap /// When receiving a 403 status code /// When receiving a 409 status code /// When receiving a 422 status code + /// When receiving a 429 status code #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public async Task PatchAsync(global::Substratal.Hub.Core.Api.Generated.Models.ApplicationWrite body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) @@ -92,10 +127,30 @@ public ApplicationsItemRequestBuilder(string rawUrl, IRequestAdapter requestAdap { "403", global::Substratal.Hub.Core.Api.Generated.Models.Error.CreateFromDiscriminatorValue }, { "409", global::Substratal.Hub.Core.Api.Generated.Models.Error.CreateFromDiscriminatorValue }, { "422", global::Substratal.Hub.Core.Api.Generated.Models.Error.CreateFromDiscriminatorValue }, + { "429", global::Substratal.Hub.Core.Api.Generated.Models.Error.CreateFromDiscriminatorValue }, }; return await RequestAdapter.SendAsync(requestInfo, global::Substratal.Hub.Core.Api.Generated.Models.Application.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// + /// Only a test-mode Application that nothing references can be deleted; a live one is 409 application_not_deletable (retire it with review_status: retired instead). Anything still referencing it (Entitlements, API Keys, webhooks, devices, notifications, settings or profile rows, push credentials, role assignments, refresh tokens, Users who signed up through it) is 409 application_in_use, naming each kind in `references`. Its own Roles go with it; audit history is kept. Writes application.deleted. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// /// Fetch one Application /// /// A diff --git a/src/Substratal.Hub.Core/Api/Generated/Applications/Item/Icon/IconRequestBuilder.cs b/src/Substratal.Hub.Core/Api/Generated/Applications/Item/Icon/IconRequestBuilder.cs new file mode 100644 index 0000000..ff73f43 --- /dev/null +++ b/src/Substratal.Hub.Core/Api/Generated/Applications/Item/Icon/IconRequestBuilder.cs @@ -0,0 +1,98 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using Substratal.Hub.Core.Api.Generated.Applications.Item.Icon.Uploads; +using Substratal.Hub.Core.Api.Generated.Models; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Substratal.Hub.Core.Api.Generated.Applications.Item.Icon +{ + /// + /// Builds and executes requests for operations under \applications\{id}\icon + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class IconRequestBuilder : BaseRequestBuilder + { + /// The uploads property + public global::Substratal.Hub.Core.Api.Generated.Applications.Item.Icon.Uploads.UploadsRequestBuilder Uploads + { + get => new global::Substratal.Hub.Core.Api.Generated.Applications.Item.Icon.Uploads.UploadsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public IconRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/applications/{id}/icon", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public IconRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/applications/{id}/icon", rawUrl) + { + } + /// + /// Sets icon_url to null and deletes the hosted image, if it is one; an external https URL is just cleared. Writes application.icon_changed. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Substratal.Hub.Core.Api.Generated.Models.Error.CreateFromDiscriminatorValue }, + { "403", global::Substratal.Hub.Core.Api.Generated.Models.Error.CreateFromDiscriminatorValue }, + { "404", global::Substratal.Hub.Core.Api.Generated.Models.Error.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Sets icon_url to null and deletes the hosted image, if it is one; an external https URL is just cleared. Writes application.icon_changed. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Substratal.Hub.Core.Api.Generated.Applications.Item.Icon.IconRequestBuilder WithUrl(string rawUrl) + { + return new global::Substratal.Hub.Core.Api.Generated.Applications.Item.Icon.IconRequestBuilder(rawUrl, RequestAdapter); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Substratal.Hub.Core/Api/Generated/Applications/Item/Icon/Uploads/Item/Complete/CompleteRequestBuilder.cs b/src/Substratal.Hub.Core/Api/Generated/Applications/Item/Icon/Uploads/Item/Complete/CompleteRequestBuilder.cs new file mode 100644 index 0000000..688604f --- /dev/null +++ b/src/Substratal.Hub.Core/Api/Generated/Applications/Item/Icon/Uploads/Item/Complete/CompleteRequestBuilder.cs @@ -0,0 +1,97 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using Substratal.Hub.Core.Api.Generated.Models; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Substratal.Hub.Core.Api.Generated.Applications.Item.Icon.Uploads.Item.Complete +{ + /// + /// Builds and executes requests for operations under \applications\{id}\icon\uploads\{uploadId}\complete + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CompleteRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CompleteRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/applications/{id}/icon/uploads/{uploadId}/complete", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CompleteRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/applications/{id}/icon/uploads/{uploadId}/complete", rawUrl) + { + } + /// + /// Checks the uploaded file's magic bytes against the declared content_type, its size, and its dimensions (square, at most 2048 × 2048), stores it at a content-addressed https://assets.substratalapps.com/apps/… URL, sets icon_url, and deletes the previous hosted icon. A file that fails a check is deleted, and the call is 422 invalid_image with details.reason. An upload that was never sent, or was already completed, is 404 upload_not_found. Writes application.icon_changed. + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 422 status code + /// When receiving a 503 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToPostRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Substratal.Hub.Core.Api.Generated.Models.Error.CreateFromDiscriminatorValue }, + { "403", global::Substratal.Hub.Core.Api.Generated.Models.Error.CreateFromDiscriminatorValue }, + { "404", global::Substratal.Hub.Core.Api.Generated.Models.Error.CreateFromDiscriminatorValue }, + { "422", global::Substratal.Hub.Core.Api.Generated.Models.Error.CreateFromDiscriminatorValue }, + { "503", global::Substratal.Hub.Core.Api.Generated.Models.Error.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Substratal.Hub.Core.Api.Generated.Models.Application.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Checks the uploaded file's magic bytes against the declared content_type, its size, and its dimensions (square, at most 2048 × 2048), stores it at a content-addressed https://assets.substratalapps.com/apps/… URL, sets icon_url, and deletes the previous hosted icon. A file that fails a check is deleted, and the call is 422 invalid_image with details.reason. An upload that was never sent, or was already completed, is 404 upload_not_found. Writes application.icon_changed. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Substratal.Hub.Core.Api.Generated.Applications.Item.Icon.Uploads.Item.Complete.CompleteRequestBuilder WithUrl(string rawUrl) + { + return new global::Substratal.Hub.Core.Api.Generated.Applications.Item.Icon.Uploads.Item.Complete.CompleteRequestBuilder(rawUrl, RequestAdapter); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Substratal.Hub.Core/Api/Generated/Applications/Item/Icon/Uploads/Item/WithUploadItemRequestBuilder.cs b/src/Substratal.Hub.Core/Api/Generated/Applications/Item/Icon/Uploads/Item/WithUploadItemRequestBuilder.cs new file mode 100644 index 0000000..d42872f --- /dev/null +++ b/src/Substratal.Hub.Core/Api/Generated/Applications/Item/Icon/Uploads/Item/WithUploadItemRequestBuilder.cs @@ -0,0 +1,41 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using Substratal.Hub.Core.Api.Generated.Applications.Item.Icon.Uploads.Item.Complete; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Substratal.Hub.Core.Api.Generated.Applications.Item.Icon.Uploads.Item +{ + /// + /// Builds and executes requests for operations under \applications\{id}\icon\uploads\{uploadId} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithUploadItemRequestBuilder : BaseRequestBuilder + { + /// The complete property + public global::Substratal.Hub.Core.Api.Generated.Applications.Item.Icon.Uploads.Item.Complete.CompleteRequestBuilder Complete + { + get => new global::Substratal.Hub.Core.Api.Generated.Applications.Item.Icon.Uploads.Item.Complete.CompleteRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithUploadItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/applications/{id}/icon/uploads/{uploadId}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithUploadItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/applications/{id}/icon/uploads/{uploadId}", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Substratal.Hub.Core/Api/Generated/Applications/Item/Icon/Uploads/UploadsRequestBuilder.cs b/src/Substratal.Hub.Core/Api/Generated/Applications/Item/Icon/Uploads/UploadsRequestBuilder.cs new file mode 100644 index 0000000..238e5b8 --- /dev/null +++ b/src/Substratal.Hub.Core/Api/Generated/Applications/Item/Icon/Uploads/UploadsRequestBuilder.cs @@ -0,0 +1,117 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using Substratal.Hub.Core.Api.Generated.Applications.Item.Icon.Uploads.Item; +using Substratal.Hub.Core.Api.Generated.Models; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Substratal.Hub.Core.Api.Generated.Applications.Item.Icon.Uploads +{ + /// + /// Builds and executes requests for operations under \applications\{id}\icon\uploads + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class UploadsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Substratal.Hub.Core.Api.Generated.applications.item.icon.uploads.item collection + /// Unique identifier of the item + /// A + public global::Substratal.Hub.Core.Api.Generated.Applications.Item.Icon.Uploads.Item.WithUploadItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("uploadId", position); + return new global::Substratal.Hub.Core.Api.Generated.Applications.Item.Icon.Uploads.Item.WithUploadItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public UploadsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/applications/{id}/icon/uploads", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public UploadsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/applications/{id}/icon/uploads", rawUrl) + { + } + /// + /// Returns a presigned POST, as for avatars: send the image straight to url with every entry of fields and then the file as the last field, named file, within 5 minutes, then call POST /applications/{id}/icon/uploads/{uploadId}/complete. PNG, JPEG, or WebP, square, at most 1 MB (a larger content_length is 422 validation_failed). 10 upload starts per caller per hour, shared with avatars. + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 422 status code + /// When receiving a 429 status code + /// When receiving a 503 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Substratal.Hub.Core.Api.Generated.Models.ImageUploadRequest body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Substratal.Hub.Core.Api.Generated.Models.ImageUploadRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Substratal.Hub.Core.Api.Generated.Models.Error.CreateFromDiscriminatorValue }, + { "403", global::Substratal.Hub.Core.Api.Generated.Models.Error.CreateFromDiscriminatorValue }, + { "404", global::Substratal.Hub.Core.Api.Generated.Models.Error.CreateFromDiscriminatorValue }, + { "422", global::Substratal.Hub.Core.Api.Generated.Models.Error.CreateFromDiscriminatorValue }, + { "429", global::Substratal.Hub.Core.Api.Generated.Models.Error.CreateFromDiscriminatorValue }, + { "503", global::Substratal.Hub.Core.Api.Generated.Models.Error.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Substratal.Hub.Core.Api.Generated.Models.ImageUpload.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Returns a presigned POST, as for avatars: send the image straight to url with every entry of fields and then the file as the last field, named file, within 5 minutes, then call POST /applications/{id}/icon/uploads/{uploadId}/complete. PNG, JPEG, or WebP, square, at most 1 MB (a larger content_length is 422 validation_failed). 10 upload starts per caller per hour, shared with avatars. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Substratal.Hub.Core.Api.Generated.Models.ImageUploadRequest body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Substratal.Hub.Core.Api.Generated.Models.ImageUploadRequest body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Substratal.Hub.Core.Api.Generated.Applications.Item.Icon.Uploads.UploadsRequestBuilder WithUrl(string rawUrl) + { + return new global::Substratal.Hub.Core.Api.Generated.Applications.Item.Icon.Uploads.UploadsRequestBuilder(rawUrl, RequestAdapter); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Substratal.Hub.Core/Api/Generated/AuditEvents/AuditEventsRequestBuilder.cs b/src/Substratal.Hub.Core/Api/Generated/AuditEvents/AuditEventsRequestBuilder.cs index 73bbca7..c5fb73b 100644 --- a/src/Substratal.Hub.Core/Api/Generated/AuditEvents/AuditEventsRequestBuilder.cs +++ b/src/Substratal.Hub.Core/Api/Generated/AuditEvents/AuditEventsRequestBuilder.cs @@ -35,7 +35,7 @@ public partial class AuditEventsRequestBuilder : BaseRequestBuilder /// /// Path parameters for the request /// The request adapter to use to execute the requests. - public AuditEventsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/audit-events{?action*,actor_id*,actor_type*,application_id*,cursor*,limit*,organization_id*,since*,target_id*,target_type*,target_user_id*,tenant_id*,until*}", pathParameters) + public AuditEventsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/audit-events{?action*,actor_id*,actor_type*,application_id*,cursor*,include*,limit*,organization_id*,request_id*,since*,target_id*,target_type*,target_user_id*,tenant_id*,until*}", pathParameters) { } /// @@ -43,7 +43,7 @@ public AuditEventsRequestBuilder(Dictionary pathParameters, IReq /// /// The raw URL to use for the request builder. /// The request adapter to use to execute the requests. - public AuditEventsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/audit-events{?action*,actor_id*,actor_type*,application_id*,cursor*,limit*,organization_id*,since*,target_id*,target_type*,target_user_id*,tenant_id*,until*}", rawUrl) + public AuditEventsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/audit-events{?action*,actor_id*,actor_type*,application_id*,cursor*,include*,limit*,organization_id*,request_id*,since*,target_id*,target_type*,target_user_id*,tenant_id*,until*}", rawUrl) { } /// @@ -54,6 +54,7 @@ public AuditEventsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 400 status code /// When receiving a 403 status code + /// When receiving a 422 status code #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) @@ -68,6 +69,7 @@ public AuditEventsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { { "400", global::Substratal.Hub.Core.Api.Generated.Models.Error.CreateFromDiscriminatorValue }, { "403", global::Substratal.Hub.Core.Api.Generated.Models.Error.CreateFromDiscriminatorValue }, + { "422", global::Substratal.Hub.Core.Api.Generated.Models.Error.CreateFromDiscriminatorValue }, }; return await RequestAdapter.SendAsync(requestInfo, global::Substratal.Hub.Core.Api.Generated.Models.AuditEventPage.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } @@ -161,6 +163,9 @@ public partial class AuditEventsRequestBuilderGetQueryParameters public string Cursor { get; set; } #pragma warning restore CS1591 #endif + /// `total` adds `page.total` and `page.total_capped`: the number of rows matching the current filters across every page, counted up to 10,000 (Conventions → Pagination). Omitted unless requested. + [QueryParameter("include")] + public global::Substratal.Hub.Core.Api.Generated.AuditEvents.GetIncludeQueryParameterType? Include { get; set; } #pragma warning disable CS1591 [QueryParameter("limit")] public int? Limit { get; set; } @@ -177,6 +182,16 @@ public partial class AuditEventsRequestBuilderGetQueryParameters [QueryParameter("organization_id")] public string OrganizationId { get; set; } #pragma warning restore CS1591 +#endif + /// Events written by one request: the X-Request-Id it sent or was given. Exact match. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("request_id")] + public string? RequestId { get; set; } +#nullable restore +#else + [QueryParameter("request_id")] + public string RequestId { get; set; } #endif #pragma warning disable CS1591 [QueryParameter("since")] diff --git a/src/Substratal.Hub.Core/Api/Generated/AuditEvents/GetIncludeQueryParameterType.cs b/src/Substratal.Hub.Core/Api/Generated/AuditEvents/GetIncludeQueryParameterType.cs new file mode 100644 index 0000000..020c3ce --- /dev/null +++ b/src/Substratal.Hub.Core/Api/Generated/AuditEvents/GetIncludeQueryParameterType.cs @@ -0,0 +1,16 @@ +// +using System.Runtime.Serialization; +using System; +namespace Substratal.Hub.Core.Api.Generated.AuditEvents +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetIncludeQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "total")] + #pragma warning disable CS1591 + Total, + #pragma warning restore CS1591 + } +} diff --git a/src/Substratal.Hub.Core/Api/Generated/Auth/AuthRequestBuilder.cs b/src/Substratal.Hub.Core/Api/Generated/Auth/AuthRequestBuilder.cs index ea443ad..82971de 100644 --- a/src/Substratal.Hub.Core/Api/Generated/Auth/AuthRequestBuilder.cs +++ b/src/Substratal.Hub.Core/Api/Generated/Auth/AuthRequestBuilder.cs @@ -10,6 +10,7 @@ using Substratal.Hub.Core.Api.Generated.Auth.Mfa; using Substratal.Hub.Core.Api.Generated.Auth.Oauth; using Substratal.Hub.Core.Api.Generated.Auth.Password; +using Substratal.Hub.Core.Api.Generated.Auth.Reauthenticate; using Substratal.Hub.Core.Api.Generated.Auth.Signup; using Substratal.Hub.Core.Api.Generated.Auth.Sso; using Substratal.Hub.Core.Api.Generated.Auth.Token; @@ -65,6 +66,11 @@ public partial class AuthRequestBuilder : BaseRequestBuilder { get => new global::Substratal.Hub.Core.Api.Generated.Auth.Password.PasswordRequestBuilder(PathParameters, RequestAdapter); } + /// The reauthenticate property + public global::Substratal.Hub.Core.Api.Generated.Auth.Reauthenticate.ReauthenticateRequestBuilder Reauthenticate + { + get => new global::Substratal.Hub.Core.Api.Generated.Auth.Reauthenticate.ReauthenticateRequestBuilder(PathParameters, RequestAdapter); + } /// The signup property public global::Substratal.Hub.Core.Api.Generated.Auth.Signup.SignupRequestBuilder Signup { diff --git a/src/Substratal.Hub.Core/Api/Generated/Auth/Reauthenticate/ReauthenticatePostRequestBody.cs b/src/Substratal.Hub.Core/Api/Generated/Auth/Reauthenticate/ReauthenticatePostRequestBody.cs new file mode 100644 index 0000000..9f7cc52 --- /dev/null +++ b/src/Substratal.Hub.Core/Api/Generated/Auth/Reauthenticate/ReauthenticatePostRequestBody.cs @@ -0,0 +1,99 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System; +namespace Substratal.Hub.Core.Api.Generated.Auth.Reauthenticate +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ReauthenticatePostRequestBody : IAdditionalDataHolder, IBackedModel, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData + { + get { return BackingStore.Get>("AdditionalData") ?? new Dictionary(); } + set { BackingStore.Set("AdditionalData", value); } + } + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// The code property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Code + { + get { return BackingStore?.Get("code"); } + set { BackingStore?.Set("code", value); } + } +#nullable restore +#else + public string Code + { + get { return BackingStore?.Get("code"); } + set { BackingStore?.Set("code", value); } + } +#endif + /// The recovery_code property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RecoveryCode + { + get { return BackingStore?.Get("recovery_code"); } + set { BackingStore?.Set("recovery_code", value); } + } +#nullable restore +#else + public string RecoveryCode + { + get { return BackingStore?.Get("recovery_code"); } + set { BackingStore?.Set("recovery_code", value); } + } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ReauthenticatePostRequestBody() + { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Substratal.Hub.Core.Api.Generated.Auth.Reauthenticate.ReauthenticatePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Substratal.Hub.Core.Api.Generated.Auth.Reauthenticate.ReauthenticatePostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "code", n => { Code = n.GetStringValue(); } }, + { "recovery_code", n => { RecoveryCode = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("code", Code); + writer.WriteStringValue("recovery_code", RecoveryCode); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Substratal.Hub.Core/Api/Generated/Auth/Reauthenticate/ReauthenticateRequestBuilder.cs b/src/Substratal.Hub.Core/Api/Generated/Auth/Reauthenticate/ReauthenticateRequestBuilder.cs new file mode 100644 index 0000000..2db3415 --- /dev/null +++ b/src/Substratal.Hub.Core/Api/Generated/Auth/Reauthenticate/ReauthenticateRequestBuilder.cs @@ -0,0 +1,100 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using Substratal.Hub.Core.Api.Generated.Models; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Substratal.Hub.Core.Api.Generated.Auth.Reauthenticate +{ + /// + /// Builds and executes requests for operations under \auth\reauthenticate + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ReauthenticateRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ReauthenticateRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/auth/reauthenticate", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ReauthenticateRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/auth/reauthenticate", rawUrl) + { + } + /// + /// Records a fresh MFA check on the calling session (mfa_verified_at), so operations marked x-substratal-step-up work for the next 10 minutes. Send exactly one of code (a current TOTP code) or recovery_code (a single-use recovery code). The response is a new access token carrying the updated mfa_verified_at claim; the refresh token is unchanged. Wrong codes count toward a lockout: after 5 in 15 minutes it is 429 too_many_attempts. 409 mfa_not_enabled when the User has no TOTP. + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code + /// When receiving a 409 status code + /// When receiving a 429 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Substratal.Hub.Core.Api.Generated.Auth.Reauthenticate.ReauthenticatePostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Substratal.Hub.Core.Api.Generated.Auth.Reauthenticate.ReauthenticatePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Substratal.Hub.Core.Api.Generated.Models.Error.CreateFromDiscriminatorValue }, + { "401", global::Substratal.Hub.Core.Api.Generated.Models.Error.CreateFromDiscriminatorValue }, + { "409", global::Substratal.Hub.Core.Api.Generated.Models.Error.CreateFromDiscriminatorValue }, + { "429", global::Substratal.Hub.Core.Api.Generated.Models.Error.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Substratal.Hub.Core.Api.Generated.Models.Reauthentication.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Records a fresh MFA check on the calling session (mfa_verified_at), so operations marked x-substratal-step-up work for the next 10 minutes. Send exactly one of code (a current TOTP code) or recovery_code (a single-use recovery code). The response is a new access token carrying the updated mfa_verified_at claim; the refresh token is unchanged. Wrong codes count toward a lockout: after 5 in 15 minutes it is 429 too_many_attempts. 409 mfa_not_enabled when the User has no TOTP. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Substratal.Hub.Core.Api.Generated.Auth.Reauthenticate.ReauthenticatePostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Substratal.Hub.Core.Api.Generated.Auth.Reauthenticate.ReauthenticatePostRequestBody body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Substratal.Hub.Core.Api.Generated.Auth.Reauthenticate.ReauthenticateRequestBuilder WithUrl(string rawUrl) + { + return new global::Substratal.Hub.Core.Api.Generated.Auth.Reauthenticate.ReauthenticateRequestBuilder(rawUrl, RequestAdapter); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Substratal.Hub.Core/Api/Generated/Entitlements/BulkUpdate/BulkUpdatePostRequestBody.cs b/src/Substratal.Hub.Core/Api/Generated/Entitlements/BulkUpdate/BulkUpdatePostRequestBody.cs new file mode 100644 index 0000000..2bd1383 --- /dev/null +++ b/src/Substratal.Hub.Core/Api/Generated/Entitlements/BulkUpdate/BulkUpdatePostRequestBody.cs @@ -0,0 +1,81 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System; +namespace Substratal.Hub.Core.Api.Generated.Entitlements.BulkUpdate +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class BulkUpdatePostRequestBody : IAdditionalDataHolder, IBackedModel, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData + { + get { return BackingStore.Get>("AdditionalData") ?? new Dictionary(); } + set { BackingStore.Set("AdditionalData", value); } + } + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// The items property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Items + { + get { return BackingStore?.Get?>("items"); } + set { BackingStore?.Set("items", value); } + } +#nullable restore +#else + public List Items + { + get { return BackingStore?.Get>("items"); } + set { BackingStore?.Set("items", value); } + } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public BulkUpdatePostRequestBody() + { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Substratal.Hub.Core.Api.Generated.Entitlements.BulkUpdate.BulkUpdatePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Substratal.Hub.Core.Api.Generated.Entitlements.BulkUpdate.BulkUpdatePostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "items", n => { Items = n.GetCollectionOfObjectValues(global::Substratal.Hub.Core.Api.Generated.Entitlements.BulkUpdate.BulkUpdatePostRequestBody_items.CreateFromDiscriminatorValue)?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("items", Items); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Substratal.Hub.Core/Api/Generated/Entitlements/BulkUpdate/BulkUpdatePostRequestBody_items.cs b/src/Substratal.Hub.Core/Api/Generated/Entitlements/BulkUpdate/BulkUpdatePostRequestBody_items.cs new file mode 100644 index 0000000..4a67c54 --- /dev/null +++ b/src/Substratal.Hub.Core/Api/Generated/Entitlements/BulkUpdate/BulkUpdatePostRequestBody_items.cs @@ -0,0 +1,108 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using Substratal.Hub.Core.Api.Generated.Models; +using System.Collections.Generic; +using System.IO; +using System; +namespace Substratal.Hub.Core.Api.Generated.Entitlements.BulkUpdate +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class BulkUpdatePostRequestBody_items : IAdditionalDataHolder, IBackedModel, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData + { + get { return BackingStore.Get>("AdditionalData") ?? new Dictionary(); } + set { BackingStore.Set("AdditionalData", value); } + } + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// The disabled_reason property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DisabledReason + { + get { return BackingStore?.Get("disabled_reason"); } + set { BackingStore?.Set("disabled_reason", value); } + } +#nullable restore +#else + public string DisabledReason + { + get { return BackingStore?.Get("disabled_reason"); } + set { BackingStore?.Set("disabled_reason", value); } + } +#endif + /// The id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Id + { + get { return BackingStore?.Get("id"); } + set { BackingStore?.Set("id", value); } + } +#nullable restore +#else + public string Id + { + get { return BackingStore?.Get("id"); } + set { BackingStore?.Set("id", value); } + } +#endif + /// The status property + public global::Substratal.Hub.Core.Api.Generated.Models.EntitlementStatus? Status + { + get { return BackingStore?.Get("status"); } + set { BackingStore?.Set("status", value); } + } + /// + /// Instantiates a new and sets the default values. + /// + public BulkUpdatePostRequestBody_items() + { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Substratal.Hub.Core.Api.Generated.Entitlements.BulkUpdate.BulkUpdatePostRequestBody_items CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Substratal.Hub.Core.Api.Generated.Entitlements.BulkUpdate.BulkUpdatePostRequestBody_items(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "disabled_reason", n => { DisabledReason = n.GetStringValue(); } }, + { "id", n => { Id = n.GetStringValue(); } }, + { "status", n => { Status = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("disabled_reason", DisabledReason); + writer.WriteStringValue("id", Id); + writer.WriteEnumValue("status", Status); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Substratal.Hub.Core/Api/Generated/Entitlements/BulkUpdate/BulkUpdateRequestBuilder.cs b/src/Substratal.Hub.Core/Api/Generated/Entitlements/BulkUpdate/BulkUpdateRequestBuilder.cs new file mode 100644 index 0000000..61789cb --- /dev/null +++ b/src/Substratal.Hub.Core/Api/Generated/Entitlements/BulkUpdate/BulkUpdateRequestBuilder.cs @@ -0,0 +1,100 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using Substratal.Hub.Core.Api.Generated.Models; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Substratal.Hub.Core.Api.Generated.Entitlements.BulkUpdate +{ + /// + /// Builds and executes requests for operations under \entitlements\bulk-update + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class BulkUpdateRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public BulkUpdateRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/entitlements/bulk-update", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public BulkUpdateRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/entitlements/bulk-update", rawUrl) + { + } + /// + /// Each item is PATCH /entitlements/{id} with its status and disabled_reason: the same access rules and transition table, processed independently, each with its own Audit Event and webhooks. Each item counts against PATCH /entitlements/{id}'s rate limit. The response is 200 with one result per item, in request order; an item's status is what the PATCH would have returned. An item that disables or revokes is refused (403 destructive_operation_restricted) for a restrict_destructive key; the other items go ahead. See /api-reference/conventions/#bulk-operations. + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 403 status code + /// When receiving a 409 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Substratal.Hub.Core.Api.Generated.Entitlements.BulkUpdate.BulkUpdatePostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Substratal.Hub.Core.Api.Generated.Entitlements.BulkUpdate.BulkUpdatePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Substratal.Hub.Core.Api.Generated.Models.Error.CreateFromDiscriminatorValue }, + { "403", global::Substratal.Hub.Core.Api.Generated.Models.Error.CreateFromDiscriminatorValue }, + { "409", global::Substratal.Hub.Core.Api.Generated.Models.Error.CreateFromDiscriminatorValue }, + { "422", global::Substratal.Hub.Core.Api.Generated.Models.Error.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Substratal.Hub.Core.Api.Generated.Models.BulkResults.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Each item is PATCH /entitlements/{id} with its status and disabled_reason: the same access rules and transition table, processed independently, each with its own Audit Event and webhooks. Each item counts against PATCH /entitlements/{id}'s rate limit. The response is 200 with one result per item, in request order; an item's status is what the PATCH would have returned. An item that disables or revokes is refused (403 destructive_operation_restricted) for a restrict_destructive key; the other items go ahead. See /api-reference/conventions/#bulk-operations. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Substratal.Hub.Core.Api.Generated.Entitlements.BulkUpdate.BulkUpdatePostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Substratal.Hub.Core.Api.Generated.Entitlements.BulkUpdate.BulkUpdatePostRequestBody body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Substratal.Hub.Core.Api.Generated.Entitlements.BulkUpdate.BulkUpdateRequestBuilder WithUrl(string rawUrl) + { + return new global::Substratal.Hub.Core.Api.Generated.Entitlements.BulkUpdate.BulkUpdateRequestBuilder(rawUrl, RequestAdapter); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Substratal.Hub.Core/Api/Generated/Entitlements/EntitlementsRequestBuilder.cs b/src/Substratal.Hub.Core/Api/Generated/Entitlements/EntitlementsRequestBuilder.cs index 2e8e129..95e75c0 100644 --- a/src/Substratal.Hub.Core/Api/Generated/Entitlements/EntitlementsRequestBuilder.cs +++ b/src/Substratal.Hub.Core/Api/Generated/Entitlements/EntitlementsRequestBuilder.cs @@ -3,6 +3,7 @@ using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; +using Substratal.Hub.Core.Api.Generated.Entitlements.BulkUpdate; using Substratal.Hub.Core.Api.Generated.Entitlements.Item; using Substratal.Hub.Core.Api.Generated.Models; using System.Collections.Generic; @@ -18,6 +19,11 @@ namespace Substratal.Hub.Core.Api.Generated.Entitlements [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] public partial class EntitlementsRequestBuilder : BaseRequestBuilder { + /// The bulkUpdate property + public global::Substratal.Hub.Core.Api.Generated.Entitlements.BulkUpdate.BulkUpdateRequestBuilder BulkUpdate + { + get => new global::Substratal.Hub.Core.Api.Generated.Entitlements.BulkUpdate.BulkUpdateRequestBuilder(PathParameters, RequestAdapter); + } /// Gets an item from the Substratal.Hub.Core.Api.Generated.entitlements.item collection /// Unique identifier of the item /// A @@ -35,7 +41,7 @@ public partial class EntitlementsRequestBuilder : BaseRequestBuilder /// /// Path parameters for the request /// The request adapter to use to execute the requests. - public EntitlementsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/entitlements{?application_id*,cursor*,ends_before*,include_inactive*,limit*,order_id*,organization_id*,source*,status*,user_id*}", pathParameters) + public EntitlementsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/entitlements{?application_id*,cursor*,ends_before*,include*,include_inactive*,limit*,order_id*,organization_id*,source*,status*,user_id*}", pathParameters) { } /// @@ -43,7 +49,7 @@ public EntitlementsRequestBuilder(Dictionary pathParameters, IRe /// /// The raw URL to use for the request builder. /// The request adapter to use to execute the requests. - public EntitlementsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/entitlements{?application_id*,cursor*,ends_before*,include_inactive*,limit*,order_id*,organization_id*,source*,status*,user_id*}", rawUrl) + public EntitlementsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/entitlements{?application_id*,cursor*,ends_before*,include*,include_inactive*,limit*,order_id*,organization_id*,source*,status*,user_id*}", rawUrl) { } /// @@ -135,6 +141,9 @@ public partial class EntitlementsRequestBuilderGetQueryParameters [QueryParameter("ends_before")] public DateTimeOffset? EndsBefore { get; set; } #pragma warning restore CS1591 + /// `total` adds `page.total` and `page.total_capped`: the number of rows matching the current filters across every page, counted up to 10,000 (Conventions → Pagination). Omitted unless requested. + [QueryParameter("include")] + public global::Substratal.Hub.Core.Api.Generated.Entitlements.GetIncludeQueryParameterType? Include { get; set; } #pragma warning disable CS1591 [QueryParameter("include_inactive")] public bool? IncludeInactive { get; set; } diff --git a/src/Substratal.Hub.Core/Api/Generated/Entitlements/GetIncludeQueryParameterType.cs b/src/Substratal.Hub.Core/Api/Generated/Entitlements/GetIncludeQueryParameterType.cs new file mode 100644 index 0000000..6a856bf --- /dev/null +++ b/src/Substratal.Hub.Core/Api/Generated/Entitlements/GetIncludeQueryParameterType.cs @@ -0,0 +1,16 @@ +// +using System.Runtime.Serialization; +using System; +namespace Substratal.Hub.Core.Api.Generated.Entitlements +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetIncludeQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "total")] + #pragma warning disable CS1591 + Total, + #pragma warning restore CS1591 + } +} diff --git a/src/Substratal.Hub.Core/Api/Generated/Models/ApiKeyWrite.cs b/src/Substratal.Hub.Core/Api/Generated/Models/ApiKeyWrite.cs index 9610393..0159c6b 100644 --- a/src/Substratal.Hub.Core/Api/Generated/Models/ApiKeyWrite.cs +++ b/src/Substratal.Hub.Core/Api/Generated/Models/ApiKeyWrite.cs @@ -71,6 +71,12 @@ public List Permissions set { BackingStore?.Set("permissions", value); } } #endif + /// Replaces the default 100 requests/minute for this key. Null (the default) means the platform default. Operations with their own ceiling keep it. Only platform api_keys.manage may send it; anyone else gets 403 forbidden. + public int? RateLimitPerMinute + { + get { return BackingStore?.Get("rate_limit_per_minute"); } + set { BackingStore?.Set("rate_limit_per_minute", value); } + } /// When true, every operation marked x-substratal-destructive is rejected with 403 destructive_operation_restricted. public bool? RestrictDestructive { @@ -125,6 +131,7 @@ public virtual IDictionary> GetFieldDeserializers() { "mode", n => { Mode = n.GetEnumValue(); } }, { "name", n => { Name = n.GetStringValue(); } }, { "permissions", n => { Permissions = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "rate_limit_per_minute", n => { RateLimitPerMinute = n.GetIntValue(); } }, { "restrict_destructive", n => { RestrictDestructive = n.GetBoolValue(); } }, { "scope", n => { Scope = n.GetStringValue(); } }, }; @@ -141,6 +148,7 @@ public virtual void Serialize(ISerializationWriter writer) writer.WriteEnumValue("mode", Mode); writer.WriteStringValue("name", Name); writer.WriteCollectionOfPrimitiveValues("permissions", Permissions); + writer.WriteIntValue("rate_limit_per_minute", RateLimitPerMinute); writer.WriteBoolValue("restrict_destructive", RestrictDestructive); writer.WriteStringValue("scope", Scope); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Substratal.Hub.Core/Api/Generated/Models/Application.cs b/src/Substratal.Hub.Core/Api/Generated/Models/Application.cs index 9717c7e..0bcd9a0 100644 --- a/src/Substratal.Hub.Core/Api/Generated/Models/Application.cs +++ b/src/Substratal.Hub.Core/Api/Generated/Models/Application.cs @@ -34,6 +34,12 @@ public string Id set { BackingStore?.Set("id", value); } } #endif + /// When the Application last entered pending_review. See Application. + public DateTimeOffset? ReviewRequestedAt + { + get { return BackingStore?.Get("review_requested_at"); } + set { BackingStore?.Set("review_requested_at", value); } + } /// true when a developer submitted it themselves, not staff. A self-registered Application must use the hosted sign-in flow (POST /auth/app-tokens returns 403 embedded_login_not_allowed), and only applications.manage can turn on receives_platform_notifications for it. public bool? SelfRegistered { @@ -104,6 +110,7 @@ public override IDictionary> GetFieldDeserializers() { { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, { "id", n => { Id = n.GetStringValue(); } }, + { "review_requested_at", n => { ReviewRequestedAt = n.GetDateTimeOffsetValue(); } }, { "self_registered", n => { SelfRegistered = n.GetBoolValue(); } }, { "settings_schema_stats", n => { SettingsSchemaStats = n.GetObjectValue(global::Substratal.Hub.Core.Api.Generated.Models.Application_settings_schema_stats.CreateFromDiscriminatorValue); } }, { "tenant_id", n => { TenantId = n.GetStringValue(); } }, diff --git a/src/Substratal.Hub.Core/Api/Generated/Models/ApplicationAccessTier.cs b/src/Substratal.Hub.Core/Api/Generated/Models/ApplicationAccessTier.cs index 9ad2717..aeb5fd9 100644 --- a/src/Substratal.Hub.Core/Api/Generated/Models/ApplicationAccessTier.cs +++ b/src/Substratal.Hub.Core/Api/Generated/Models/ApplicationAccessTier.cs @@ -3,7 +3,7 @@ using System; namespace Substratal.Hub.Core.Api.Generated.Models { - /// Which plan unlocks the Application: free for every User, standard for Users covered by a Standard subscription. Set by applications.manage; defaults to standard. + /// Who gets in without a grant. free: every User. standard: Users covered by a Standard subscription; first_party (Substratal's own) Applications only. restricted: only the people the developer grants Entitlements to, from their own billing or none. A first-party Application defaults to standard and only applications.manage changes its tier. Any other Application defaults to restricted, and its owner chooses free or restricted while it's approved or pending_review (409 application_not_available otherwise, at most 10 changes a day). standard on one that isn't first-party is 422 access_tier_reserved. [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] public enum ApplicationAccessTier { @@ -15,5 +15,9 @@ public enum ApplicationAccessTier #pragma warning disable CS1591 Standard, #pragma warning restore CS1591 + [EnumMember(Value = "restricted")] + #pragma warning disable CS1591 + Restricted, + #pragma warning restore CS1591 } } diff --git a/src/Substratal.Hub.Core/Api/Generated/Models/ApplicationReviewStatus.cs b/src/Substratal.Hub.Core/Api/Generated/Models/ApplicationReviewStatus.cs index c01d07f..0cb62a0 100644 --- a/src/Substratal.Hub.Core/Api/Generated/Models/ApplicationReviewStatus.cs +++ b/src/Substratal.Hub.Core/Api/Generated/Models/ApplicationReviewStatus.cs @@ -24,5 +24,9 @@ public enum ApplicationReviewStatus #pragma warning disable CS1591 Suspended, #pragma warning restore CS1591 + [EnumMember(Value = "retired")] + #pragma warning disable CS1591 + Retired, + #pragma warning restore CS1591 } } diff --git a/src/Substratal.Hub.Core/Api/Generated/Models/ApplicationSummary.cs b/src/Substratal.Hub.Core/Api/Generated/Models/ApplicationSummary.cs index be915a3..3b20caf 100644 --- a/src/Substratal.Hub.Core/Api/Generated/Models/ApplicationSummary.cs +++ b/src/Substratal.Hub.Core/Api/Generated/Models/ApplicationSummary.cs @@ -13,7 +13,7 @@ namespace Substratal.Hub.Core.Api.Generated.Models public partial class ApplicationSummary : IAdditionalDataHolder, IBackedModel, IParsable #pragma warning restore CS1591 { - /// Which plan unlocks the Application: free for every User, standard for Users covered by a Standard subscription. Set by applications.manage; defaults to standard. + /// Who gets in without a grant. free: every User. standard: Users covered by a Standard subscription; first_party (Substratal's own) Applications only. restricted: only the people the developer grants Entitlements to, from their own billing or none. A first-party Application defaults to standard and only applications.manage changes its tier. Any other Application defaults to restricted, and its owner chooses free or restricted while it's approved or pending_review (409 application_not_available otherwise, at most 10 changes a day). standard on one that isn't first-party is 422 access_tier_reserved. public global::Substratal.Hub.Core.Api.Generated.Models.ApplicationAccessTier? AccessTier { get { return BackingStore?.Get("access_tier"); } @@ -43,6 +43,12 @@ public string Description set { BackingStore?.Set("description", value); } } #endif + /// Active Entitlements for the Application; a User grant and an Organization grant count once each + public int? HolderCount + { + get { return BackingStore?.Get("holder_count"); } + set { BackingStore?.Set("holder_count", value); } + } /// The icon_url property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -91,6 +97,44 @@ public string Name set { BackingStore?.Set("name", value); } } #endif + /// The owner_organization_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OwnerOrganizationId + { + get { return BackingStore?.Get("owner_organization_id"); } + set { BackingStore?.Set("owner_organization_id", value); } + } +#nullable restore +#else + public string OwnerOrganizationId + { + get { return BackingStore?.Get("owner_organization_id"); } + set { BackingStore?.Set("owner_organization_id", value); } + } +#endif + /// The owner_user_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OwnerUserId + { + get { return BackingStore?.Get("owner_user_id"); } + set { BackingStore?.Set("owner_user_id", value); } + } +#nullable restore +#else + public string OwnerUserId + { + get { return BackingStore?.Get("owner_user_id"); } + set { BackingStore?.Set("owner_user_id", value); } + } +#endif + /// When the Application last entered pending_review. See Application. + public DateTimeOffset? ReviewRequestedAt + { + get { return BackingStore?.Get("review_requested_at"); } + set { BackingStore?.Set("review_requested_at", value); } + } /// The review_status property public global::Substratal.Hub.Core.Api.Generated.Models.ApplicationReviewStatus? ReviewStatus { @@ -147,9 +191,13 @@ public virtual IDictionary> GetFieldDeserializers() { { "access_tier", n => { AccessTier = n.GetEnumValue(); } }, { "description", n => { Description = n.GetStringValue(); } }, + { "holder_count", n => { HolderCount = n.GetIntValue(); } }, { "icon_url", n => { IconUrl = n.GetStringValue(); } }, { "id", n => { Id = n.GetStringValue(); } }, { "name", n => { Name = n.GetStringValue(); } }, + { "owner_organization_id", n => { OwnerOrganizationId = n.GetStringValue(); } }, + { "owner_user_id", n => { OwnerUserId = n.GetStringValue(); } }, + { "review_requested_at", n => { ReviewRequestedAt = n.GetDateTimeOffsetValue(); } }, { "review_status", n => { ReviewStatus = n.GetEnumValue(); } }, { "slug", n => { Slug = n.GetStringValue(); } }, { "visibility", n => { Visibility = n.GetEnumValue(); } }, @@ -164,9 +212,12 @@ public virtual void Serialize(ISerializationWriter writer) if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("access_tier", AccessTier); writer.WriteStringValue("description", Description); + writer.WriteIntValue("holder_count", HolderCount); writer.WriteStringValue("icon_url", IconUrl); writer.WriteStringValue("id", Id); writer.WriteStringValue("name", Name); + writer.WriteStringValue("owner_organization_id", OwnerOrganizationId); + writer.WriteStringValue("owner_user_id", OwnerUserId); writer.WriteEnumValue("review_status", ReviewStatus); writer.WriteStringValue("slug", Slug); writer.WriteEnumValue("visibility", Visibility); diff --git a/src/Substratal.Hub.Core/Api/Generated/Models/ApplicationWrite.cs b/src/Substratal.Hub.Core/Api/Generated/Models/ApplicationWrite.cs index e87ac8c..30f9aa9 100644 --- a/src/Substratal.Hub.Core/Api/Generated/Models/ApplicationWrite.cs +++ b/src/Substratal.Hub.Core/Api/Generated/Models/ApplicationWrite.cs @@ -13,7 +13,7 @@ namespace Substratal.Hub.Core.Api.Generated.Models public partial class ApplicationWrite : IAdditionalDataHolder, IBackedModel, IParsable #pragma warning restore CS1591 { - /// Which plan unlocks the Application: free for every User, standard for Users covered by a Standard subscription. Set by applications.manage; defaults to standard. + /// Who gets in without a grant. free: every User. standard: Users covered by a Standard subscription; first_party (Substratal's own) Applications only. restricted: only the people the developer grants Entitlements to, from their own billing or none. A first-party Application defaults to standard and only applications.manage changes its tier. Any other Application defaults to restricted, and its owner chooses free or restricted while it's approved or pending_review (409 application_not_available otherwise, at most 10 changes a day). standard on one that isn't first-party is 422 access_tier_reserved. public global::Substratal.Hub.Core.Api.Generated.Models.ApplicationAccessTier? AccessTier { get { return BackingStore?.Get("access_tier"); } @@ -91,6 +91,12 @@ public string EmailFromName set { BackingStore?.Set("email_from_name", value); } } #endif + /// Substratal's own Application. Only applications.manage sets it, and only a first-party Application can be access_tier standard. Staff-created customer Applications (concierge onboarding) aren't first-party. + public bool? FirstParty + { + get { return BackingStore?.Get("first_party"); } + set { BackingStore?.Set("first_party", value); } + } /// The icon_url property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -292,6 +298,7 @@ public ApplicationWrite() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); AdditionalData = new Dictionary(); + FirstParty = false; ReceivesPlatformNotifications = false; } /// @@ -317,6 +324,7 @@ public virtual IDictionary> GetFieldDeserializers() { "default_app_role", n => { DefaultAppRole = n.GetStringValue(); } }, { "description", n => { Description = n.GetStringValue(); } }, { "email_from_name", n => { EmailFromName = n.GetStringValue(); } }, + { "first_party", n => { FirstParty = n.GetBoolValue(); } }, { "icon_url", n => { IconUrl = n.GetStringValue(); } }, { "launch_url", n => { LaunchUrl = n.GetStringValue(); } }, { "name", n => { Name = n.GetStringValue(); } }, @@ -345,6 +353,7 @@ public virtual void Serialize(ISerializationWriter writer) writer.WriteStringValue("default_app_role", DefaultAppRole); writer.WriteStringValue("description", Description); writer.WriteStringValue("email_from_name", EmailFromName); + writer.WriteBoolValue("first_party", FirstParty); writer.WriteStringValue("icon_url", IconUrl); writer.WriteStringValue("launch_url", LaunchUrl); writer.WriteStringValue("name", Name); diff --git a/src/Substratal.Hub.Core/Api/Generated/Models/AuditAction.cs b/src/Substratal.Hub.Core/Api/Generated/Models/AuditAction.cs index d435660..4c3fc36 100644 --- a/src/Substratal.Hub.Core/Api/Generated/Models/AuditAction.cs +++ b/src/Substratal.Hub.Core/Api/Generated/Models/AuditAction.cs @@ -76,6 +76,22 @@ public enum AuditAction #pragma warning disable CS1591 AuditExported, #pragma warning restore CS1591 + [EnumMember(Value = "application.retired")] + #pragma warning disable CS1591 + ApplicationRetired, + #pragma warning restore CS1591 + [EnumMember(Value = "application.deleted")] + #pragma warning disable CS1591 + ApplicationDeleted, + #pragma warning restore CS1591 + [EnumMember(Value = "profile.avatar_changed")] + #pragma warning disable CS1591 + ProfileAvatar_changed, + #pragma warning restore CS1591 + [EnumMember(Value = "application.icon_changed")] + #pragma warning disable CS1591 + ApplicationIcon_changed, + #pragma warning restore CS1591 [EnumMember(Value = "entitlement.granted")] #pragma warning disable CS1591 EntitlementGranted, @@ -252,5 +268,9 @@ public enum AuditAction #pragma warning disable CS1591 DeviceDeleted, #pragma warning restore CS1591 + [EnumMember(Value = "platform.settings_updated")] + #pragma warning disable CS1591 + PlatformSettings_updated, + #pragma warning restore CS1591 } } diff --git a/src/Substratal.Hub.Core/Api/Generated/Models/AuditExportRequest.cs b/src/Substratal.Hub.Core/Api/Generated/Models/AuditExportRequest.cs index af779b0..53b3942 100644 --- a/src/Substratal.Hub.Core/Api/Generated/Models/AuditExportRequest.cs +++ b/src/Substratal.Hub.Core/Api/Generated/Models/AuditExportRequest.cs @@ -97,6 +97,22 @@ public string OrganizationId get { return BackingStore?.Get("organization_id"); } set { BackingStore?.Set("organization_id", value); } } +#endif + /// The request_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RequestId + { + get { return BackingStore?.Get("request_id"); } + set { BackingStore?.Set("request_id", value); } + } +#nullable restore +#else + public string RequestId + { + get { return BackingStore?.Get("request_id"); } + set { BackingStore?.Set("request_id", value); } + } #endif /// The since property public DateTimeOffset? Since @@ -197,6 +213,7 @@ public virtual IDictionary> GetFieldDeserializers() { "application_id", n => { ApplicationId = n.GetStringValue(); } }, { "format", n => { Format = n.GetEnumValue(); } }, { "organization_id", n => { OrganizationId = n.GetStringValue(); } }, + { "request_id", n => { RequestId = n.GetStringValue(); } }, { "since", n => { Since = n.GetDateTimeOffsetValue(); } }, { "target_id", n => { TargetId = n.GetStringValue(); } }, { "target_type", n => { TargetType = n.GetEnumValue(); } }, @@ -218,6 +235,7 @@ public virtual void Serialize(ISerializationWriter writer) writer.WriteStringValue("application_id", ApplicationId); writer.WriteEnumValue("format", Format); writer.WriteStringValue("organization_id", OrganizationId); + writer.WriteStringValue("request_id", RequestId); writer.WriteDateTimeOffsetValue("since", Since); writer.WriteStringValue("target_id", TargetId); writer.WriteEnumValue("target_type", TargetType); diff --git a/src/Substratal.Hub.Core/Api/Generated/Models/AuditTargetType.cs b/src/Substratal.Hub.Core/Api/Generated/Models/AuditTargetType.cs index 7172127..53e4f2e 100644 --- a/src/Substratal.Hub.Core/Api/Generated/Models/AuditTargetType.cs +++ b/src/Substratal.Hub.Core/Api/Generated/Models/AuditTargetType.cs @@ -64,5 +64,9 @@ public enum AuditTargetType #pragma warning disable CS1591 Audit_export, #pragma warning restore CS1591 + [EnumMember(Value = "platform_settings")] + #pragma warning disable CS1591 + Platform_settings, + #pragma warning restore CS1591 } } diff --git a/src/Substratal.Hub.Core/Api/Generated/Models/BulkInviteResults.cs b/src/Substratal.Hub.Core/Api/Generated/Models/BulkInviteResults.cs new file mode 100644 index 0000000..fd85235 --- /dev/null +++ b/src/Substratal.Hub.Core/Api/Generated/Models/BulkInviteResults.cs @@ -0,0 +1,82 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System; +namespace Substratal.Hub.Core.Api.Generated.Models +{ + /// + /// One result per requested email, in request order (Conventions → Bulk operations). + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class BulkInviteResults : IAdditionalDataHolder, IBackedModel, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData + { + get { return BackingStore.Get>("AdditionalData") ?? new Dictionary(); } + set { BackingStore.Set("AdditionalData", value); } + } + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// The results property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Results + { + get { return BackingStore?.Get?>("results"); } + set { BackingStore?.Set("results", value); } + } +#nullable restore +#else + public List Results + { + get { return BackingStore?.Get>("results"); } + set { BackingStore?.Set("results", value); } + } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public BulkInviteResults() + { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Substratal.Hub.Core.Api.Generated.Models.BulkInviteResults CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Substratal.Hub.Core.Api.Generated.Models.BulkInviteResults(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "results", n => { Results = n.GetCollectionOfObjectValues(global::Substratal.Hub.Core.Api.Generated.Models.BulkInviteResults_results.CreateFromDiscriminatorValue)?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("results", Results); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Substratal.Hub.Core/Api/Generated/Models/BulkInviteResults_results.cs b/src/Substratal.Hub.Core/Api/Generated/Models/BulkInviteResults_results.cs new file mode 100644 index 0000000..a597666 --- /dev/null +++ b/src/Substratal.Hub.Core/Api/Generated/Models/BulkInviteResults_results.cs @@ -0,0 +1,125 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System; +namespace Substratal.Hub.Core.Api.Generated.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class BulkInviteResults_results : IAdditionalDataHolder, IBackedModel, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData + { + get { return BackingStore.Get>("AdditionalData") ?? new Dictionary(); } + set { BackingStore.Set("AdditionalData", value); } + } + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// The email +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Email + { + get { return BackingStore?.Get("email"); } + set { BackingStore?.Set("email", value); } + } +#nullable restore +#else + public string Email + { + get { return BackingStore?.Get("email"); } + set { BackingStore?.Set("email", value); } + } +#endif + /// The error object the single call would have returned, without the outer error envelope. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Substratal.Hub.Core.Api.Generated.Models.BulkItemError? Error + { + get { return BackingStore?.Get("error"); } + set { BackingStore?.Set("error", value); } + } +#nullable restore +#else + public global::Substratal.Hub.Core.Api.Generated.Models.BulkItemError Error + { + get { return BackingStore?.Get("error"); } + set { BackingStore?.Set("error", value); } + } +#endif + /// The status POST /users would have returned: 201 on success, otherwise the error's 4xx or 500 + public int? Status + { + get { return BackingStore?.Get("status"); } + set { BackingStore?.Set("status", value); } + } + /// The new User's id. Present only on 201. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? UserId + { + get { return BackingStore?.Get("user_id"); } + set { BackingStore?.Set("user_id", value); } + } +#nullable restore +#else + public string UserId + { + get { return BackingStore?.Get("user_id"); } + set { BackingStore?.Set("user_id", value); } + } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public BulkInviteResults_results() + { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Substratal.Hub.Core.Api.Generated.Models.BulkInviteResults_results CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Substratal.Hub.Core.Api.Generated.Models.BulkInviteResults_results(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "email", n => { Email = n.GetStringValue(); } }, + { "error", n => { Error = n.GetObjectValue(global::Substratal.Hub.Core.Api.Generated.Models.BulkItemError.CreateFromDiscriminatorValue); } }, + { "status", n => { Status = n.GetIntValue(); } }, + { "user_id", n => { UserId = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("email", Email); + writer.WriteObjectValue("error", Error); + writer.WriteIntValue("status", Status); + writer.WriteStringValue("user_id", UserId); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Substratal.Hub.Core/Api/Generated/Models/BulkItemError.cs b/src/Substratal.Hub.Core/Api/Generated/Models/BulkItemError.cs new file mode 100644 index 0000000..d525225 --- /dev/null +++ b/src/Substratal.Hub.Core/Api/Generated/Models/BulkItemError.cs @@ -0,0 +1,118 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System; +namespace Substratal.Hub.Core.Api.Generated.Models +{ + /// + /// The error object the single call would have returned, without the outer error envelope. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class BulkItemError : IAdditionalDataHolder, IBackedModel, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData + { + get { return BackingStore.Get>("AdditionalData") ?? new Dictionary(); } + set { BackingStore.Set("AdditionalData", value); } + } + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// The code property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Code + { + get { return BackingStore?.Get("code"); } + set { BackingStore?.Set("code", value); } + } +#nullable restore +#else + public string Code + { + get { return BackingStore?.Get("code"); } + set { BackingStore?.Set("code", value); } + } +#endif + /// The details property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Substratal.Hub.Core.Api.Generated.Models.BulkItemError_details? Details + { + get { return BackingStore?.Get("details"); } + set { BackingStore?.Set("details", value); } + } +#nullable restore +#else + public global::Substratal.Hub.Core.Api.Generated.Models.BulkItemError_details Details + { + get { return BackingStore?.Get("details"); } + set { BackingStore?.Set("details", value); } + } +#endif + /// The message property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Message + { + get { return BackingStore?.Get("message"); } + set { BackingStore?.Set("message", value); } + } +#nullable restore +#else + public string Message + { + get { return BackingStore?.Get("message"); } + set { BackingStore?.Set("message", value); } + } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public BulkItemError() + { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Substratal.Hub.Core.Api.Generated.Models.BulkItemError CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Substratal.Hub.Core.Api.Generated.Models.BulkItemError(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "code", n => { Code = n.GetStringValue(); } }, + { "details", n => { Details = n.GetObjectValue(global::Substratal.Hub.Core.Api.Generated.Models.BulkItemError_details.CreateFromDiscriminatorValue); } }, + { "message", n => { Message = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("code", Code); + writer.WriteObjectValue("details", Details); + writer.WriteStringValue("message", Message); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Substratal.Hub.Core/Api/Generated/Models/BulkItemError_details.cs b/src/Substratal.Hub.Core/Api/Generated/Models/BulkItemError_details.cs new file mode 100644 index 0000000..5abd35d --- /dev/null +++ b/src/Substratal.Hub.Core/Api/Generated/Models/BulkItemError_details.cs @@ -0,0 +1,63 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System; +namespace Substratal.Hub.Core.Api.Generated.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class BulkItemError_details : IAdditionalDataHolder, IBackedModel, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData + { + get { return BackingStore.Get>("AdditionalData") ?? new Dictionary(); } + set { BackingStore.Set("AdditionalData", value); } + } + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// + /// Instantiates a new and sets the default values. + /// + public BulkItemError_details() + { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Substratal.Hub.Core.Api.Generated.Models.BulkItemError_details CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Substratal.Hub.Core.Api.Generated.Models.BulkItemError_details(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Substratal.Hub.Core/Api/Generated/Models/BulkResults.cs b/src/Substratal.Hub.Core/Api/Generated/Models/BulkResults.cs new file mode 100644 index 0000000..eecb8a9 --- /dev/null +++ b/src/Substratal.Hub.Core/Api/Generated/Models/BulkResults.cs @@ -0,0 +1,82 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System; +namespace Substratal.Hub.Core.Api.Generated.Models +{ + /// + /// One result per requested item, in request order (Conventions → Bulk operations). + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class BulkResults : IAdditionalDataHolder, IBackedModel, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData + { + get { return BackingStore.Get>("AdditionalData") ?? new Dictionary(); } + set { BackingStore.Set("AdditionalData", value); } + } + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// The results property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Results + { + get { return BackingStore?.Get?>("results"); } + set { BackingStore?.Set("results", value); } + } +#nullable restore +#else + public List Results + { + get { return BackingStore?.Get>("results"); } + set { BackingStore?.Set("results", value); } + } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public BulkResults() + { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Substratal.Hub.Core.Api.Generated.Models.BulkResults CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Substratal.Hub.Core.Api.Generated.Models.BulkResults(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "results", n => { Results = n.GetCollectionOfObjectValues(global::Substratal.Hub.Core.Api.Generated.Models.BulkResults_results.CreateFromDiscriminatorValue)?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("results", Results); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Substratal.Hub.Core/Api/Generated/Models/BulkResults_results.cs b/src/Substratal.Hub.Core/Api/Generated/Models/BulkResults_results.cs new file mode 100644 index 0000000..a5d48f9 --- /dev/null +++ b/src/Substratal.Hub.Core/Api/Generated/Models/BulkResults_results.cs @@ -0,0 +1,107 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System; +namespace Substratal.Hub.Core.Api.Generated.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class BulkResults_results : IAdditionalDataHolder, IBackedModel, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData + { + get { return BackingStore.Get>("AdditionalData") ?? new Dictionary(); } + set { BackingStore.Set("AdditionalData", value); } + } + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// The error object the single call would have returned, without the outer error envelope. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Substratal.Hub.Core.Api.Generated.Models.BulkItemError? Error + { + get { return BackingStore?.Get("error"); } + set { BackingStore?.Set("error", value); } + } +#nullable restore +#else + public global::Substratal.Hub.Core.Api.Generated.Models.BulkItemError Error + { + get { return BackingStore?.Get("error"); } + set { BackingStore?.Set("error", value); } + } +#endif + /// The item's id +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Id + { + get { return BackingStore?.Get("id"); } + set { BackingStore?.Set("id", value); } + } +#nullable restore +#else + public string Id + { + get { return BackingStore?.Get("id"); } + set { BackingStore?.Set("id", value); } + } +#endif + /// The status the single call would have returned: 200 on success, otherwise the error's 4xx or 500 + public int? Status + { + get { return BackingStore?.Get("status"); } + set { BackingStore?.Set("status", value); } + } + /// + /// Instantiates a new and sets the default values. + /// + public BulkResults_results() + { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Substratal.Hub.Core.Api.Generated.Models.BulkResults_results CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Substratal.Hub.Core.Api.Generated.Models.BulkResults_results(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "error", n => { Error = n.GetObjectValue(global::Substratal.Hub.Core.Api.Generated.Models.BulkItemError.CreateFromDiscriminatorValue); } }, + { "id", n => { Id = n.GetStringValue(); } }, + { "status", n => { Status = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("error", Error); + writer.WriteStringValue("id", Id); + writer.WriteIntValue("status", Status); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Substratal.Hub.Core/Api/Generated/Models/DeviceInactiveReason.cs b/src/Substratal.Hub.Core/Api/Generated/Models/DeviceInactiveReason.cs index 4582f7e..bbccec3 100644 --- a/src/Substratal.Hub.Core/Api/Generated/Models/DeviceInactiveReason.cs +++ b/src/Substratal.Hub.Core/Api/Generated/Models/DeviceInactiveReason.cs @@ -40,5 +40,9 @@ public enum DeviceInactiveReason #pragma warning disable CS1591 Credential_removed, #pragma warning restore CS1591 + [EnumMember(Value = "application_retired")] + #pragma warning disable CS1591 + Application_retired, + #pragma warning restore CS1591 } } diff --git a/src/Substratal.Hub.Core/Api/Generated/Models/ImageUpload.cs b/src/Substratal.Hub.Core/Api/Generated/Models/ImageUpload.cs new file mode 100644 index 0000000..e21f124 --- /dev/null +++ b/src/Substratal.Hub.Core/Api/Generated/Models/ImageUpload.cs @@ -0,0 +1,142 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System; +namespace Substratal.Hub.Core.Api.Generated.Models +{ + /// + /// A presigned POST. Send multipart/form-data to url with every entry of fields, then the file as the last field, named file. The upload is accepted only with that content_type and at most max_bytes, until expires_at. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ImageUpload : IAdditionalDataHolder, IBackedModel, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData + { + get { return BackingStore.Get>("AdditionalData") ?? new Dictionary(); } + set { BackingStore.Set("AdditionalData", value); } + } + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// The content_type property + public global::Substratal.Hub.Core.Api.Generated.Models.ImageUpload_content_type? ContentType + { + get { return BackingStore?.Get("content_type"); } + set { BackingStore?.Set("content_type", value); } + } + /// The expires_at property + public DateTimeOffset? ExpiresAt + { + get { return BackingStore?.Get("expires_at"); } + set { BackingStore?.Set("expires_at", value); } + } + /// Form fields to send unchanged, including key, Content-Type, policy, and signature. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Substratal.Hub.Core.Api.Generated.Models.ImageUpload_fields? Fields + { + get { return BackingStore?.Get("fields"); } + set { BackingStore?.Set("fields", value); } + } +#nullable restore +#else + public global::Substratal.Hub.Core.Api.Generated.Models.ImageUpload_fields Fields + { + get { return BackingStore?.Get("fields"); } + set { BackingStore?.Set("fields", value); } + } +#endif + /// The upload id (upl_…) to complete. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Id + { + get { return BackingStore?.Get("id"); } + set { BackingStore?.Set("id", value); } + } +#nullable restore +#else + public string Id + { + get { return BackingStore?.Get("id"); } + set { BackingStore?.Set("id", value); } + } +#endif + /// The max_bytes property + public int? MaxBytes + { + get { return BackingStore?.Get("max_bytes"); } + set { BackingStore?.Set("max_bytes", value); } + } + /// Where to POST the form. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url + { + get { return BackingStore?.Get("url"); } + set { BackingStore?.Set("url", value); } + } +#nullable restore +#else + public string Url + { + get { return BackingStore?.Get("url"); } + set { BackingStore?.Set("url", value); } + } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ImageUpload() + { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Substratal.Hub.Core.Api.Generated.Models.ImageUpload CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Substratal.Hub.Core.Api.Generated.Models.ImageUpload(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "content_type", n => { ContentType = n.GetEnumValue(); } }, + { "expires_at", n => { ExpiresAt = n.GetDateTimeOffsetValue(); } }, + { "fields", n => { Fields = n.GetObjectValue(global::Substratal.Hub.Core.Api.Generated.Models.ImageUpload_fields.CreateFromDiscriminatorValue); } }, + { "id", n => { Id = n.GetStringValue(); } }, + { "max_bytes", n => { MaxBytes = n.GetIntValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("content_type", ContentType); + writer.WriteDateTimeOffsetValue("expires_at", ExpiresAt); + writer.WriteObjectValue("fields", Fields); + writer.WriteStringValue("id", Id); + writer.WriteIntValue("max_bytes", MaxBytes); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Substratal.Hub.Core/Api/Generated/Models/ImageUploadRequest.cs b/src/Substratal.Hub.Core/Api/Generated/Models/ImageUploadRequest.cs new file mode 100644 index 0000000..9320b19 --- /dev/null +++ b/src/Substratal.Hub.Core/Api/Generated/Models/ImageUploadRequest.cs @@ -0,0 +1,79 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System; +namespace Substratal.Hub.Core.Api.Generated.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ImageUploadRequest : IAdditionalDataHolder, IBackedModel, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData + { + get { return BackingStore.Get>("AdditionalData") ?? new Dictionary(); } + set { BackingStore.Set("AdditionalData", value); } + } + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// The file's size in bytes. At most 2097152 for an avatar, 1048576 for an icon. + public int? ContentLength + { + get { return BackingStore?.Get("content_length"); } + set { BackingStore?.Set("content_length", value); } + } + /// The content_type property + public global::Substratal.Hub.Core.Api.Generated.Models.ImageUploadRequest_content_type? ContentType + { + get { return BackingStore?.Get("content_type"); } + set { BackingStore?.Set("content_type", value); } + } + /// + /// Instantiates a new and sets the default values. + /// + public ImageUploadRequest() + { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Substratal.Hub.Core.Api.Generated.Models.ImageUploadRequest CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Substratal.Hub.Core.Api.Generated.Models.ImageUploadRequest(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "content_length", n => { ContentLength = n.GetIntValue(); } }, + { "content_type", n => { ContentType = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("content_length", ContentLength); + writer.WriteEnumValue("content_type", ContentType); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Substratal.Hub.Core/Api/Generated/Models/ImageUploadRequest_content_type.cs b/src/Substratal.Hub.Core/Api/Generated/Models/ImageUploadRequest_content_type.cs new file mode 100644 index 0000000..0173e1e --- /dev/null +++ b/src/Substratal.Hub.Core/Api/Generated/Models/ImageUploadRequest_content_type.cs @@ -0,0 +1,24 @@ +// +using System.Runtime.Serialization; +using System; +namespace Substratal.Hub.Core.Api.Generated.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum ImageUploadRequest_content_type + #pragma warning restore CS1591 + { + [EnumMember(Value = "image/png")] + #pragma warning disable CS1591 + ImagePng, + #pragma warning restore CS1591 + [EnumMember(Value = "image/jpeg")] + #pragma warning disable CS1591 + ImageJpeg, + #pragma warning restore CS1591 + [EnumMember(Value = "image/webp")] + #pragma warning disable CS1591 + ImageWebp, + #pragma warning restore CS1591 + } +} diff --git a/src/Substratal.Hub.Core/Api/Generated/Models/ImageUpload_content_type.cs b/src/Substratal.Hub.Core/Api/Generated/Models/ImageUpload_content_type.cs new file mode 100644 index 0000000..feb74a5 --- /dev/null +++ b/src/Substratal.Hub.Core/Api/Generated/Models/ImageUpload_content_type.cs @@ -0,0 +1,24 @@ +// +using System.Runtime.Serialization; +using System; +namespace Substratal.Hub.Core.Api.Generated.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum ImageUpload_content_type + #pragma warning restore CS1591 + { + [EnumMember(Value = "image/png")] + #pragma warning disable CS1591 + ImagePng, + #pragma warning restore CS1591 + [EnumMember(Value = "image/jpeg")] + #pragma warning disable CS1591 + ImageJpeg, + #pragma warning restore CS1591 + [EnumMember(Value = "image/webp")] + #pragma warning disable CS1591 + ImageWebp, + #pragma warning restore CS1591 + } +} diff --git a/src/Substratal.Hub.Core/Api/Generated/Models/ImageUpload_fields.cs b/src/Substratal.Hub.Core/Api/Generated/Models/ImageUpload_fields.cs new file mode 100644 index 0000000..e33172c --- /dev/null +++ b/src/Substratal.Hub.Core/Api/Generated/Models/ImageUpload_fields.cs @@ -0,0 +1,64 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System; +namespace Substratal.Hub.Core.Api.Generated.Models +{ + /// + /// Form fields to send unchanged, including key, Content-Type, policy, and signature. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ImageUpload_fields : IAdditionalDataHolder, IBackedModel, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData + { + get { return BackingStore.Get>("AdditionalData") ?? new Dictionary(); } + set { BackingStore.Set("AdditionalData", value); } + } + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// + /// Instantiates a new and sets the default values. + /// + public ImageUpload_fields() + { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Substratal.Hub.Core.Api.Generated.Models.ImageUpload_fields CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Substratal.Hub.Core.Api.Generated.Models.ImageUpload_fields(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Substratal.Hub.Core/Api/Generated/Models/PageInfo.cs b/src/Substratal.Hub.Core/Api/Generated/Models/PageInfo.cs index fa94ad6..8b5621c 100644 --- a/src/Substratal.Hub.Core/Api/Generated/Models/PageInfo.cs +++ b/src/Substratal.Hub.Core/Api/Generated/Models/PageInfo.cs @@ -43,6 +43,18 @@ public string NextCursor set { BackingStore?.Set("next_cursor", value); } } #endif + /// Only with `include=total`. Rows matching the current filters across every page, ignoring `cursor`; 10000 when capped. + public int? Total + { + get { return BackingStore?.Get("total"); } + set { BackingStore?.Set("total", value); } + } + /// Only with `include=total`. True when there are more than 10,000 matching rows. + public bool? TotalCapped + { + get { return BackingStore?.Get("total_capped"); } + set { BackingStore?.Set("total_capped", value); } + } /// /// Instantiates a new and sets the default values. /// @@ -71,6 +83,8 @@ public virtual IDictionary> GetFieldDeserializers() { { "has_more", n => { HasMore = n.GetBoolValue(); } }, { "next_cursor", n => { NextCursor = n.GetStringValue(); } }, + { "total", n => { Total = n.GetIntValue(); } }, + { "total_capped", n => { TotalCapped = n.GetBoolValue(); } }, }; } /// @@ -82,6 +96,8 @@ public virtual void Serialize(ISerializationWriter writer) if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("has_more", HasMore); writer.WriteStringValue("next_cursor", NextCursor); + writer.WriteIntValue("total", Total); + writer.WriteBoolValue("total_capped", TotalCapped); writer.WriteAdditionalData(AdditionalData); } } diff --git a/src/Substratal.Hub.Core/Api/Generated/Models/PlatformAnnouncement.cs b/src/Substratal.Hub.Core/Api/Generated/Models/PlatformAnnouncement.cs new file mode 100644 index 0000000..ea21c00 --- /dev/null +++ b/src/Substratal.Hub.Core/Api/Generated/Models/PlatformAnnouncement.cs @@ -0,0 +1,81 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System; +namespace Substratal.Hub.Core.Api.Generated.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PlatformAnnouncement : IBackedModel, IParsable + #pragma warning restore CS1591 + { + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// The level property + public global::Substratal.Hub.Core.Api.Generated.Models.PlatformAnnouncement_level? Level + { + get { return BackingStore?.Get("level"); } + set { BackingStore?.Set("level", value); } + } + /// The text property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Text + { + get { return BackingStore?.Get("text"); } + set { BackingStore?.Set("text", value); } + } +#nullable restore +#else + public string Text + { + get { return BackingStore?.Get("text"); } + set { BackingStore?.Set("text", value); } + } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public PlatformAnnouncement() + { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Substratal.Hub.Core.Api.Generated.Models.PlatformAnnouncement CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Substratal.Hub.Core.Api.Generated.Models.PlatformAnnouncement(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "level", n => { Level = n.GetEnumValue(); } }, + { "text", n => { Text = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("level", Level); + writer.WriteStringValue("text", Text); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Substratal.Hub.Core/Api/Generated/Models/PlatformAnnouncement_level.cs b/src/Substratal.Hub.Core/Api/Generated/Models/PlatformAnnouncement_level.cs new file mode 100644 index 0000000..1d34908 --- /dev/null +++ b/src/Substratal.Hub.Core/Api/Generated/Models/PlatformAnnouncement_level.cs @@ -0,0 +1,24 @@ +// +using System.Runtime.Serialization; +using System; +namespace Substratal.Hub.Core.Api.Generated.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum PlatformAnnouncement_level + #pragma warning restore CS1591 + { + [EnumMember(Value = "info")] + #pragma warning disable CS1591 + Info, + #pragma warning restore CS1591 + [EnumMember(Value = "warning")] + #pragma warning disable CS1591 + Warning, + #pragma warning restore CS1591 + [EnumMember(Value = "critical")] + #pragma warning disable CS1591 + Critical, + #pragma warning restore CS1591 + } +} diff --git a/src/Substratal.Hub.Core/Api/Generated/Models/PlatformSettings.cs b/src/Substratal.Hub.Core/Api/Generated/Models/PlatformSettings.cs new file mode 100644 index 0000000..f5364eb --- /dev/null +++ b/src/Substratal.Hub.Core/Api/Generated/Models/PlatformSettings.cs @@ -0,0 +1,124 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System; +namespace Substratal.Hub.Core.Api.Generated.Models +{ + /// + /// signup_open and announcement are always present. client_flags needs an authenticated caller; read_only and updated_at need operations.view. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PlatformSettings : IAdditionalDataHolder, IBackedModel, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData + { + get { return BackingStore.Get>("AdditionalData") ?? new Dictionary(); } + set { BackingStore.Set("AdditionalData", value); } + } + /// A banner for clients to show, or null. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Substratal.Hub.Core.Api.Generated.Models.PlatformAnnouncement? Announcement + { + get { return BackingStore?.Get("announcement"); } + set { BackingStore?.Set("announcement", value); } + } +#nullable restore +#else + public global::Substratal.Hub.Core.Api.Generated.Models.PlatformAnnouncement Announcement + { + get { return BackingStore?.Get("announcement"); } + set { BackingStore?.Set("announcement", value); } + } +#endif + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// Remote-configurable client feature flags, flag name to boolean. At most 100. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Substratal.Hub.Core.Api.Generated.Models.PlatformSettings_client_flags? ClientFlags + { + get { return BackingStore?.Get("client_flags"); } + set { BackingStore?.Set("client_flags", value); } + } +#nullable restore +#else + public global::Substratal.Hub.Core.Api.Generated.Models.PlatformSettings_client_flags ClientFlags + { + get { return BackingStore?.Get("client_flags"); } + set { BackingStore?.Set("client_flags", value); } + } +#endif + /// true answers every non-GET from a caller without superadmin with 503 service_unavailable and Retry-After: 300. Sign-in, refresh, logout, session revocation, and token issuance stay open. + public bool? ReadOnly + { + get { return BackingStore?.Get("read_only"); } + set { BackingStore?.Set("read_only", value); } + } + /// false closes POST /auth/signup (403 signup_closed). Invitations still work. + public bool? SignupOpen + { + get { return BackingStore?.Get("signup_open"); } + set { BackingStore?.Set("signup_open", value); } + } + /// The updated_at property + public DateTimeOffset? UpdatedAt + { + get { return BackingStore?.Get("updated_at"); } + set { BackingStore?.Set("updated_at", value); } + } + /// + /// Instantiates a new and sets the default values. + /// + public PlatformSettings() + { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Substratal.Hub.Core.Api.Generated.Models.PlatformSettings CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Substratal.Hub.Core.Api.Generated.Models.PlatformSettings(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "announcement", n => { Announcement = n.GetObjectValue(global::Substratal.Hub.Core.Api.Generated.Models.PlatformAnnouncement.CreateFromDiscriminatorValue); } }, + { "client_flags", n => { ClientFlags = n.GetObjectValue(global::Substratal.Hub.Core.Api.Generated.Models.PlatformSettings_client_flags.CreateFromDiscriminatorValue); } }, + { "read_only", n => { ReadOnly = n.GetBoolValue(); } }, + { "signup_open", n => { SignupOpen = n.GetBoolValue(); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("announcement", Announcement); + writer.WriteObjectValue("client_flags", ClientFlags); + writer.WriteBoolValue("read_only", ReadOnly); + writer.WriteBoolValue("signup_open", SignupOpen); + writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Substratal.Hub.Core/Api/Generated/Models/PlatformSettingsWrite.cs b/src/Substratal.Hub.Core/Api/Generated/Models/PlatformSettingsWrite.cs new file mode 100644 index 0000000..ab0ed3e --- /dev/null +++ b/src/Substratal.Hub.Core/Api/Generated/Models/PlatformSettingsWrite.cs @@ -0,0 +1,115 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System; +namespace Substratal.Hub.Core.Api.Generated.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PlatformSettingsWrite : IAdditionalDataHolder, IBackedModel, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData + { + get { return BackingStore.Get>("AdditionalData") ?? new Dictionary(); } + set { BackingStore.Set("AdditionalData", value); } + } + /// Replaces the announcement; null clears it. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Substratal.Hub.Core.Api.Generated.Models.PlatformAnnouncement? Announcement + { + get { return BackingStore?.Get("announcement"); } + set { BackingStore?.Set("announcement", value); } + } +#nullable restore +#else + public global::Substratal.Hub.Core.Api.Generated.Models.PlatformAnnouncement Announcement + { + get { return BackingStore?.Get("announcement"); } + set { BackingStore?.Set("announcement", value); } + } +#endif + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// Merged one level deep: each flag sent replaces that flag, and a flag sent as null is removed. Names match ^[a-z][a-z0-9_]{0,63}$; at most 100 after the merge. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Substratal.Hub.Core.Api.Generated.Models.PlatformSettingsWrite_client_flags? ClientFlags + { + get { return BackingStore?.Get("client_flags"); } + set { BackingStore?.Set("client_flags", value); } + } +#nullable restore +#else + public global::Substratal.Hub.Core.Api.Generated.Models.PlatformSettingsWrite_client_flags ClientFlags + { + get { return BackingStore?.Get("client_flags"); } + set { BackingStore?.Set("client_flags", value); } + } +#endif + /// The read_only property + public bool? ReadOnly + { + get { return BackingStore?.Get("read_only"); } + set { BackingStore?.Set("read_only", value); } + } + /// The signup_open property + public bool? SignupOpen + { + get { return BackingStore?.Get("signup_open"); } + set { BackingStore?.Set("signup_open", value); } + } + /// + /// Instantiates a new and sets the default values. + /// + public PlatformSettingsWrite() + { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Substratal.Hub.Core.Api.Generated.Models.PlatformSettingsWrite CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Substratal.Hub.Core.Api.Generated.Models.PlatformSettingsWrite(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "announcement", n => { Announcement = n.GetObjectValue(global::Substratal.Hub.Core.Api.Generated.Models.PlatformAnnouncement.CreateFromDiscriminatorValue); } }, + { "client_flags", n => { ClientFlags = n.GetObjectValue(global::Substratal.Hub.Core.Api.Generated.Models.PlatformSettingsWrite_client_flags.CreateFromDiscriminatorValue); } }, + { "read_only", n => { ReadOnly = n.GetBoolValue(); } }, + { "signup_open", n => { SignupOpen = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("announcement", Announcement); + writer.WriteObjectValue("client_flags", ClientFlags); + writer.WriteBoolValue("read_only", ReadOnly); + writer.WriteBoolValue("signup_open", SignupOpen); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Substratal.Hub.Core/Api/Generated/Models/PlatformSettingsWrite_client_flags.cs b/src/Substratal.Hub.Core/Api/Generated/Models/PlatformSettingsWrite_client_flags.cs new file mode 100644 index 0000000..0a3cb0b --- /dev/null +++ b/src/Substratal.Hub.Core/Api/Generated/Models/PlatformSettingsWrite_client_flags.cs @@ -0,0 +1,64 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System; +namespace Substratal.Hub.Core.Api.Generated.Models +{ + /// + /// Merged one level deep: each flag sent replaces that flag, and a flag sent as null is removed. Names match ^[a-z][a-z0-9_]{0,63}$; at most 100 after the merge. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PlatformSettingsWrite_client_flags : IAdditionalDataHolder, IBackedModel, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData + { + get { return BackingStore.Get>("AdditionalData") ?? new Dictionary(); } + set { BackingStore.Set("AdditionalData", value); } + } + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// + /// Instantiates a new and sets the default values. + /// + public PlatformSettingsWrite_client_flags() + { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Substratal.Hub.Core.Api.Generated.Models.PlatformSettingsWrite_client_flags CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Substratal.Hub.Core.Api.Generated.Models.PlatformSettingsWrite_client_flags(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Substratal.Hub.Core/Api/Generated/Models/PlatformSettings_client_flags.cs b/src/Substratal.Hub.Core/Api/Generated/Models/PlatformSettings_client_flags.cs new file mode 100644 index 0000000..82e21cb --- /dev/null +++ b/src/Substratal.Hub.Core/Api/Generated/Models/PlatformSettings_client_flags.cs @@ -0,0 +1,64 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System; +namespace Substratal.Hub.Core.Api.Generated.Models +{ + /// + /// Remote-configurable client feature flags, flag name to boolean. At most 100. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PlatformSettings_client_flags : IAdditionalDataHolder, IBackedModel, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData + { + get { return BackingStore.Get>("AdditionalData") ?? new Dictionary(); } + set { BackingStore.Set("AdditionalData", value); } + } + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// + /// Instantiates a new and sets the default values. + /// + public PlatformSettings_client_flags() + { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Substratal.Hub.Core.Api.Generated.Models.PlatformSettings_client_flags CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Substratal.Hub.Core.Api.Generated.Models.PlatformSettings_client_flags(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Substratal.Hub.Core/Api/Generated/Models/PushCredential.cs b/src/Substratal.Hub.Core/Api/Generated/Models/PushCredential.cs index efec2b7..a3f3489 100644 --- a/src/Substratal.Hub.Core/Api/Generated/Models/PushCredential.cs +++ b/src/Substratal.Hub.Core/Api/Generated/Models/PushCredential.cs @@ -141,7 +141,7 @@ public string ProjectId get { return BackingStore?.Get("provider"); } set { BackingStore?.Set("provider", value); } } - /// The status property + /// disabled: the Application was retired. public global::Substratal.Hub.Core.Api.Generated.Models.PushCredential_status? Status { get { return BackingStore?.Get("status"); } diff --git a/src/Substratal.Hub.Core/Api/Generated/Models/PushCredentialPage.cs b/src/Substratal.Hub.Core/Api/Generated/Models/PushCredentialPage.cs new file mode 100644 index 0000000..2546149 --- /dev/null +++ b/src/Substratal.Hub.Core/Api/Generated/Models/PushCredentialPage.cs @@ -0,0 +1,64 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Substratal.Hub.Core.Api.Generated.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PushCredentialPage : global::Substratal.Hub.Core.Api.Generated.Models.PageEnvelope, IParsable + #pragma warning restore CS1591 + { + /// The data property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Data + { + get { return BackingStore?.Get?>("data"); } + set { BackingStore?.Set("data", value); } + } +#nullable restore +#else + public List Data + { + get { return BackingStore?.Get>("data"); } + set { BackingStore?.Set("data", value); } + } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Substratal.Hub.Core.Api.Generated.Models.PushCredentialPage CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Substratal.Hub.Core.Api.Generated.Models.PushCredentialPage(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "data", n => { Data = n.GetCollectionOfObjectValues(global::Substratal.Hub.Core.Api.Generated.Models.PushCredential.CreateFromDiscriminatorValue)?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public override void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + writer.WriteCollectionOfObjectValues("data", Data); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Substratal.Hub.Core/Api/Generated/Models/PushCredential_status.cs b/src/Substratal.Hub.Core/Api/Generated/Models/PushCredential_status.cs index 75ba4f0..6cd2442 100644 --- a/src/Substratal.Hub.Core/Api/Generated/Models/PushCredential_status.cs +++ b/src/Substratal.Hub.Core/Api/Generated/Models/PushCredential_status.cs @@ -3,10 +3,9 @@ using System; namespace Substratal.Hub.Core.Api.Generated.Models { + /// disabled: the Application was retired. [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] - #pragma warning disable CS1591 public enum PushCredential_status - #pragma warning restore CS1591 { [EnumMember(Value = "active")] #pragma warning disable CS1591 @@ -16,5 +15,9 @@ public enum PushCredential_status #pragma warning disable CS1591 Failed, #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 } } diff --git a/src/Substratal.Hub.Core/Api/Generated/Models/Reauthentication.cs b/src/Substratal.Hub.Core/Api/Generated/Models/Reauthentication.cs new file mode 100644 index 0000000..bda0cd8 --- /dev/null +++ b/src/Substratal.Hub.Core/Api/Generated/Models/Reauthentication.cs @@ -0,0 +1,105 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System; +namespace Substratal.Hub.Core.Api.Generated.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Reauthentication : IAdditionalDataHolder, IBackedModel, IParsable + #pragma warning restore CS1591 + { + /// A new platform access token for the same session, carrying the updated mfa_verified_at claim. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AccessToken + { + get { return BackingStore?.Get("access_token"); } + set { BackingStore?.Set("access_token", value); } + } +#nullable restore +#else + public string AccessToken + { + get { return BackingStore?.Get("access_token"); } + set { BackingStore?.Set("access_token", value); } + } +#endif + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData + { + get { return BackingStore.Get>("AdditionalData") ?? new Dictionary(); } + set { BackingStore.Set("AdditionalData", value); } + } + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// The expires_in property + public int? ExpiresIn + { + get { return BackingStore?.Get("expires_in"); } + set { BackingStore?.Set("expires_in", value); } + } + /// When this session last proved a second factor: now. + public DateTimeOffset? MfaVerifiedAt + { + get { return BackingStore?.Get("mfa_verified_at"); } + set { BackingStore?.Set("mfa_verified_at", value); } + } + /// The token_type property + public global::Substratal.Hub.Core.Api.Generated.Models.Reauthentication_token_type? TokenType + { + get { return BackingStore?.Get("token_type"); } + set { BackingStore?.Set("token_type", value); } + } + /// + /// Instantiates a new and sets the default values. + /// + public Reauthentication() + { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Substratal.Hub.Core.Api.Generated.Models.Reauthentication CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Substratal.Hub.Core.Api.Generated.Models.Reauthentication(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "access_token", n => { AccessToken = n.GetStringValue(); } }, + { "expires_in", n => { ExpiresIn = n.GetIntValue(); } }, + { "mfa_verified_at", n => { MfaVerifiedAt = n.GetDateTimeOffsetValue(); } }, + { "token_type", n => { TokenType = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("access_token", AccessToken); + writer.WriteIntValue("expires_in", ExpiresIn); + writer.WriteDateTimeOffsetValue("mfa_verified_at", MfaVerifiedAt); + writer.WriteEnumValue("token_type", TokenType); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Substratal.Hub.Core/Api/Generated/Models/Reauthentication_token_type.cs b/src/Substratal.Hub.Core/Api/Generated/Models/Reauthentication_token_type.cs new file mode 100644 index 0000000..7cff71a --- /dev/null +++ b/src/Substratal.Hub.Core/Api/Generated/Models/Reauthentication_token_type.cs @@ -0,0 +1,16 @@ +// +using System.Runtime.Serialization; +using System; +namespace Substratal.Hub.Core.Api.Generated.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum Reauthentication_token_type + #pragma warning restore CS1591 + { + [EnumMember(Value = "Bearer")] + #pragma warning disable CS1591 + Bearer, + #pragma warning restore CS1591 + } +} diff --git a/src/Substratal.Hub.Core/Api/Generated/Models/Stats.cs b/src/Substratal.Hub.Core/Api/Generated/Models/Stats.cs new file mode 100644 index 0000000..fa63727 --- /dev/null +++ b/src/Substratal.Hub.Core/Api/Generated/Models/Stats.cs @@ -0,0 +1,509 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System; +namespace Substratal.Hub.Core.Api.Generated.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Stats : IAdditionalDataHolder, IBackedModel, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData + { + get { return BackingStore.Get>("AdditionalData") ?? new Dictionary(); } + set { BackingStore.Set("AdditionalData", value); } + } + /// The applications property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Substratal.Hub.Core.Api.Generated.Models.Stats_applications? Applications + { + get { return BackingStore?.Get("applications"); } + set { BackingStore?.Set("applications", value); } + } +#nullable restore +#else + public global::Substratal.Hub.Core.Api.Generated.Models.Stats_applications Applications + { + get { return BackingStore?.Get("applications"); } + set { BackingStore?.Set("applications", value); } + } +#endif + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// Entitlements by status. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Substratal.Hub.Core.Api.Generated.Models.Stats_entitlements? Entitlements + { + get { return BackingStore?.Get("entitlements"); } + set { BackingStore?.Set("entitlements", value); } + } +#nullable restore +#else + public global::Substratal.Hub.Core.Api.Generated.Models.Stats_entitlements Entitlements + { + get { return BackingStore?.Get("entitlements"); } + set { BackingStore?.Set("entitlements", value); } + } +#endif + /// When these counts were computed. At most a minute old. + public DateTimeOffset? GeneratedAt + { + get { return BackingStore?.Get("generated_at"); } + set { BackingStore?.Set("generated_at", value); } + } + /// Organizations by status. null when tenant_id is set. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Substratal.Hub.Core.Api.Generated.Models.Stats.Stats_organizations? Organizations + { + get { return BackingStore?.Get("organizations"); } + set { BackingStore?.Set("organizations", value); } + } +#nullable restore +#else + public global::Substratal.Hub.Core.Api.Generated.Models.Stats.Stats_organizations Organizations + { + get { return BackingStore?.Get("organizations"); } + set { BackingStore?.Set("organizations", value); } + } +#endif + /// Applications' push credentials by status. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Substratal.Hub.Core.Api.Generated.Models.Stats_push_credentials? PushCredentials + { + get { return BackingStore?.Get("push_credentials"); } + set { BackingStore?.Set("push_credentials", value); } + } +#nullable restore +#else + public global::Substratal.Hub.Core.Api.Generated.Models.Stats_push_credentials PushCredentials + { + get { return BackingStore?.Get("push_credentials"); } + set { BackingStore?.Set("push_credentials", value); } + } +#endif + /// Covering subscriptions (active, trialing, or past_due) by subscriber type. null when tenant_id is set. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Substratal.Hub.Core.Api.Generated.Models.Stats.Stats_subscriptions? Subscriptions + { + get { return BackingStore?.Get("subscriptions"); } + set { BackingStore?.Set("subscriptions", value); } + } +#nullable restore +#else + public global::Substratal.Hub.Core.Api.Generated.Models.Stats.Stats_subscriptions Subscriptions + { + get { return BackingStore?.Get("subscriptions"); } + set { BackingStore?.Set("subscriptions", value); } + } +#endif + /// The Tenant the counts are confined to, or null for platform-wide. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TenantId + { + get { return BackingStore?.Get("tenant_id"); } + set { BackingStore?.Set("tenant_id", value); } + } +#nullable restore +#else + public string TenantId + { + get { return BackingStore?.Get("tenant_id"); } + set { BackingStore?.Set("tenant_id", value); } + } +#endif + /// The tier_change_requests property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Substratal.Hub.Core.Api.Generated.Models.Stats_tier_change_requests? TierChangeRequests + { + get { return BackingStore?.Get("tier_change_requests"); } + set { BackingStore?.Set("tier_change_requests", value); } + } +#nullable restore +#else + public global::Substratal.Hub.Core.Api.Generated.Models.Stats_tier_change_requests TierChangeRequests + { + get { return BackingStore?.Get("tier_change_requests"); } + set { BackingStore?.Set("tier_change_requests", value); } + } +#endif + /// Users by status. null when tenant_id is set. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Substratal.Hub.Core.Api.Generated.Models.Stats.Stats_users? Users + { + get { return BackingStore?.Get("users"); } + set { BackingStore?.Set("users", value); } + } +#nullable restore +#else + public global::Substratal.Hub.Core.Api.Generated.Models.Stats.Stats_users Users + { + get { return BackingStore?.Get("users"); } + set { BackingStore?.Set("users", value); } + } +#endif + /// Webhook subscriptions by status. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Substratal.Hub.Core.Api.Generated.Models.Stats_webhook_subscriptions? WebhookSubscriptions + { + get { return BackingStore?.Get("webhook_subscriptions"); } + set { BackingStore?.Set("webhook_subscriptions", value); } + } +#nullable restore +#else + public global::Substratal.Hub.Core.Api.Generated.Models.Stats_webhook_subscriptions WebhookSubscriptions + { + get { return BackingStore?.Get("webhook_subscriptions"); } + set { BackingStore?.Set("webhook_subscriptions", value); } + } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Stats() + { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Substratal.Hub.Core.Api.Generated.Models.Stats CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Substratal.Hub.Core.Api.Generated.Models.Stats(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "applications", n => { Applications = n.GetObjectValue(global::Substratal.Hub.Core.Api.Generated.Models.Stats_applications.CreateFromDiscriminatorValue); } }, + { "entitlements", n => { Entitlements = n.GetObjectValue(global::Substratal.Hub.Core.Api.Generated.Models.Stats_entitlements.CreateFromDiscriminatorValue); } }, + { "generated_at", n => { GeneratedAt = n.GetDateTimeOffsetValue(); } }, + { "organizations", n => { Organizations = n.GetObjectValue(global::Substratal.Hub.Core.Api.Generated.Models.Stats.Stats_organizations.CreateFromDiscriminatorValue); } }, + { "push_credentials", n => { PushCredentials = n.GetObjectValue(global::Substratal.Hub.Core.Api.Generated.Models.Stats_push_credentials.CreateFromDiscriminatorValue); } }, + { "subscriptions", n => { Subscriptions = n.GetObjectValue(global::Substratal.Hub.Core.Api.Generated.Models.Stats.Stats_subscriptions.CreateFromDiscriminatorValue); } }, + { "tenant_id", n => { TenantId = n.GetStringValue(); } }, + { "tier_change_requests", n => { TierChangeRequests = n.GetObjectValue(global::Substratal.Hub.Core.Api.Generated.Models.Stats_tier_change_requests.CreateFromDiscriminatorValue); } }, + { "users", n => { Users = n.GetObjectValue(global::Substratal.Hub.Core.Api.Generated.Models.Stats.Stats_users.CreateFromDiscriminatorValue); } }, + { "webhook_subscriptions", n => { WebhookSubscriptions = n.GetObjectValue(global::Substratal.Hub.Core.Api.Generated.Models.Stats_webhook_subscriptions.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("applications", Applications); + writer.WriteObjectValue("entitlements", Entitlements); + writer.WriteDateTimeOffsetValue("generated_at", GeneratedAt); + writer.WriteObjectValue("organizations", Organizations); + writer.WriteObjectValue("push_credentials", PushCredentials); + writer.WriteObjectValue("subscriptions", Subscriptions); + writer.WriteStringValue("tenant_id", TenantId); + writer.WriteObjectValue("tier_change_requests", TierChangeRequests); + writer.WriteObjectValue("users", Users); + writer.WriteObjectValue("webhook_subscriptions", WebhookSubscriptions); + writer.WriteAdditionalData(AdditionalData); + } + /// + /// Composed type wrapper for classes , + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Stats_organizations : IBackedModel, IComposedTypeWrapper, IParsable + { + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Substratal.Hub.Core.Api.Generated.Models.Stats_organizationsMember1? StatsOrganizationsMember1 + { + get { return BackingStore?.Get("Stats_organizationsMember1"); } + set { BackingStore?.Set("Stats_organizationsMember1", value); } + } +#nullable restore +#else + public global::Substratal.Hub.Core.Api.Generated.Models.Stats_organizationsMember1 StatsOrganizationsMember1 + { + get { return BackingStore?.Get("Stats_organizationsMember1"); } + set { BackingStore?.Set("Stats_organizationsMember1", value); } + } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Substratal.Hub.Core.Api.Generated.Models.Stats_organizationsMember2? StatsOrganizationsMember2 + { + get { return BackingStore?.Get("Stats_organizationsMember2"); } + set { BackingStore?.Set("Stats_organizationsMember2", value); } + } +#nullable restore +#else + public global::Substratal.Hub.Core.Api.Generated.Models.Stats_organizationsMember2 StatsOrganizationsMember2 + { + get { return BackingStore?.Get("Stats_organizationsMember2"); } + set { BackingStore?.Set("Stats_organizationsMember2", value); } + } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Stats_organizations() + { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Substratal.Hub.Core.Api.Generated.Models.Stats.Stats_organizations CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + var mappingValue = parseNode.GetChildNode("")?.GetStringValue(); + var result = new global::Substratal.Hub.Core.Api.Generated.Models.Stats.Stats_organizations(); + return result; + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + if(StatsOrganizationsMember1 != null) + { + return StatsOrganizationsMember1.GetFieldDeserializers(); + } + else if(StatsOrganizationsMember2 != null) + { + return StatsOrganizationsMember2.GetFieldDeserializers(); + } + return new Dictionary>(); + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + if(StatsOrganizationsMember1 != null) + { + writer.WriteObjectValue(null, StatsOrganizationsMember1); + } + else if(StatsOrganizationsMember2 != null) + { + writer.WriteObjectValue(null, StatsOrganizationsMember2); + } + } + } + /// + /// Composed type wrapper for classes , + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Stats_subscriptions : IBackedModel, IComposedTypeWrapper, IParsable + { + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Substratal.Hub.Core.Api.Generated.Models.Stats_subscriptionsMember1? StatsSubscriptionsMember1 + { + get { return BackingStore?.Get("Stats_subscriptionsMember1"); } + set { BackingStore?.Set("Stats_subscriptionsMember1", value); } + } +#nullable restore +#else + public global::Substratal.Hub.Core.Api.Generated.Models.Stats_subscriptionsMember1 StatsSubscriptionsMember1 + { + get { return BackingStore?.Get("Stats_subscriptionsMember1"); } + set { BackingStore?.Set("Stats_subscriptionsMember1", value); } + } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Substratal.Hub.Core.Api.Generated.Models.Stats_subscriptionsMember2? StatsSubscriptionsMember2 + { + get { return BackingStore?.Get("Stats_subscriptionsMember2"); } + set { BackingStore?.Set("Stats_subscriptionsMember2", value); } + } +#nullable restore +#else + public global::Substratal.Hub.Core.Api.Generated.Models.Stats_subscriptionsMember2 StatsSubscriptionsMember2 + { + get { return BackingStore?.Get("Stats_subscriptionsMember2"); } + set { BackingStore?.Set("Stats_subscriptionsMember2", value); } + } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Stats_subscriptions() + { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Substratal.Hub.Core.Api.Generated.Models.Stats.Stats_subscriptions CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + var mappingValue = parseNode.GetChildNode("")?.GetStringValue(); + var result = new global::Substratal.Hub.Core.Api.Generated.Models.Stats.Stats_subscriptions(); + return result; + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + if(StatsSubscriptionsMember1 != null) + { + return StatsSubscriptionsMember1.GetFieldDeserializers(); + } + else if(StatsSubscriptionsMember2 != null) + { + return StatsSubscriptionsMember2.GetFieldDeserializers(); + } + return new Dictionary>(); + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + if(StatsSubscriptionsMember1 != null) + { + writer.WriteObjectValue(null, StatsSubscriptionsMember1); + } + else if(StatsSubscriptionsMember2 != null) + { + writer.WriteObjectValue(null, StatsSubscriptionsMember2); + } + } + } + /// + /// Composed type wrapper for classes , + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Stats_users : IBackedModel, IComposedTypeWrapper, IParsable + { + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Substratal.Hub.Core.Api.Generated.Models.Stats_usersMember1? StatsUsersMember1 + { + get { return BackingStore?.Get("Stats_usersMember1"); } + set { BackingStore?.Set("Stats_usersMember1", value); } + } +#nullable restore +#else + public global::Substratal.Hub.Core.Api.Generated.Models.Stats_usersMember1 StatsUsersMember1 + { + get { return BackingStore?.Get("Stats_usersMember1"); } + set { BackingStore?.Set("Stats_usersMember1", value); } + } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Substratal.Hub.Core.Api.Generated.Models.Stats_usersMember2? StatsUsersMember2 + { + get { return BackingStore?.Get("Stats_usersMember2"); } + set { BackingStore?.Set("Stats_usersMember2", value); } + } +#nullable restore +#else + public global::Substratal.Hub.Core.Api.Generated.Models.Stats_usersMember2 StatsUsersMember2 + { + get { return BackingStore?.Get("Stats_usersMember2"); } + set { BackingStore?.Set("Stats_usersMember2", value); } + } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Stats_users() + { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Substratal.Hub.Core.Api.Generated.Models.Stats.Stats_users CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + var mappingValue = parseNode.GetChildNode("")?.GetStringValue(); + var result = new global::Substratal.Hub.Core.Api.Generated.Models.Stats.Stats_users(); + return result; + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + if(StatsUsersMember1 != null) + { + return StatsUsersMember1.GetFieldDeserializers(); + } + else if(StatsUsersMember2 != null) + { + return StatsUsersMember2.GetFieldDeserializers(); + } + return new Dictionary>(); + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + if(StatsUsersMember1 != null) + { + writer.WriteObjectValue(null, StatsUsersMember1); + } + else if(StatsUsersMember2 != null) + { + writer.WriteObjectValue(null, StatsUsersMember2); + } + } + } + } +} +#pragma warning restore CS0618 diff --git a/src/Substratal.Hub.Core/Api/Generated/Models/Stats_applications.cs b/src/Substratal.Hub.Core/Api/Generated/Models/Stats_applications.cs new file mode 100644 index 0000000..49a1ab3 --- /dev/null +++ b/src/Substratal.Hub.Core/Api/Generated/Models/Stats_applications.cs @@ -0,0 +1,99 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System; +namespace Substratal.Hub.Core.Api.Generated.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Stats_applications : IAdditionalDataHolder, IBackedModel, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData + { + get { return BackingStore.Get>("AdditionalData") ?? new Dictionary(); } + set { BackingStore.Set("AdditionalData", value); } + } + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// The by_access_tier property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Substratal.Hub.Core.Api.Generated.Models.Stats_applications_by_access_tier? ByAccessTier + { + get { return BackingStore?.Get("by_access_tier"); } + set { BackingStore?.Set("by_access_tier", value); } + } +#nullable restore +#else + public global::Substratal.Hub.Core.Api.Generated.Models.Stats_applications_by_access_tier ByAccessTier + { + get { return BackingStore?.Get("by_access_tier"); } + set { BackingStore?.Set("by_access_tier", value); } + } +#endif + /// The by_review_status property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Substratal.Hub.Core.Api.Generated.Models.Stats_applications_by_review_status? ByReviewStatus + { + get { return BackingStore?.Get("by_review_status"); } + set { BackingStore?.Set("by_review_status", value); } + } +#nullable restore +#else + public global::Substratal.Hub.Core.Api.Generated.Models.Stats_applications_by_review_status ByReviewStatus + { + get { return BackingStore?.Get("by_review_status"); } + set { BackingStore?.Set("by_review_status", value); } + } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Stats_applications() + { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Substratal.Hub.Core.Api.Generated.Models.Stats_applications CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Substratal.Hub.Core.Api.Generated.Models.Stats_applications(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "by_access_tier", n => { ByAccessTier = n.GetObjectValue(global::Substratal.Hub.Core.Api.Generated.Models.Stats_applications_by_access_tier.CreateFromDiscriminatorValue); } }, + { "by_review_status", n => { ByReviewStatus = n.GetObjectValue(global::Substratal.Hub.Core.Api.Generated.Models.Stats_applications_by_review_status.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("by_access_tier", ByAccessTier); + writer.WriteObjectValue("by_review_status", ByReviewStatus); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Substratal.Hub.Core/Api/Generated/Models/Stats_applications_by_access_tier.cs b/src/Substratal.Hub.Core/Api/Generated/Models/Stats_applications_by_access_tier.cs new file mode 100644 index 0000000..9280b0b --- /dev/null +++ b/src/Substratal.Hub.Core/Api/Generated/Models/Stats_applications_by_access_tier.cs @@ -0,0 +1,79 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System; +namespace Substratal.Hub.Core.Api.Generated.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Stats_applications_by_access_tier : IAdditionalDataHolder, IBackedModel, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData + { + get { return BackingStore.Get>("AdditionalData") ?? new Dictionary(); } + set { BackingStore.Set("AdditionalData", value); } + } + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// The free property + public int? Free + { + get { return BackingStore?.Get("free"); } + set { BackingStore?.Set("free", value); } + } + /// The standard property + public int? Standard + { + get { return BackingStore?.Get("standard"); } + set { BackingStore?.Set("standard", value); } + } + /// + /// Instantiates a new and sets the default values. + /// + public Stats_applications_by_access_tier() + { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Substratal.Hub.Core.Api.Generated.Models.Stats_applications_by_access_tier CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Substratal.Hub.Core.Api.Generated.Models.Stats_applications_by_access_tier(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "free", n => { Free = n.GetIntValue(); } }, + { "standard", n => { Standard = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("free", Free); + writer.WriteIntValue("standard", Standard); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Substratal.Hub.Core/Api/Generated/Models/Stats_applications_by_review_status.cs b/src/Substratal.Hub.Core/Api/Generated/Models/Stats_applications_by_review_status.cs new file mode 100644 index 0000000..74fa5db --- /dev/null +++ b/src/Substratal.Hub.Core/Api/Generated/Models/Stats_applications_by_review_status.cs @@ -0,0 +1,103 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System; +namespace Substratal.Hub.Core.Api.Generated.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Stats_applications_by_review_status : IAdditionalDataHolder, IBackedModel, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData + { + get { return BackingStore.Get>("AdditionalData") ?? new Dictionary(); } + set { BackingStore.Set("AdditionalData", value); } + } + /// The approved property + public int? Approved + { + get { return BackingStore?.Get("approved"); } + set { BackingStore?.Set("approved", value); } + } + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// The pending_review property + public int? PendingReview + { + get { return BackingStore?.Get("pending_review"); } + set { BackingStore?.Set("pending_review", value); } + } + /// The rejected property + public int? Rejected + { + get { return BackingStore?.Get("rejected"); } + set { BackingStore?.Set("rejected", value); } + } + /// The retired property + public int? Retired + { + get { return BackingStore?.Get("retired"); } + set { BackingStore?.Set("retired", value); } + } + /// The suspended property + public int? Suspended + { + get { return BackingStore?.Get("suspended"); } + set { BackingStore?.Set("suspended", value); } + } + /// + /// Instantiates a new and sets the default values. + /// + public Stats_applications_by_review_status() + { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Substratal.Hub.Core.Api.Generated.Models.Stats_applications_by_review_status CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Substratal.Hub.Core.Api.Generated.Models.Stats_applications_by_review_status(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "approved", n => { Approved = n.GetIntValue(); } }, + { "pending_review", n => { PendingReview = n.GetIntValue(); } }, + { "rejected", n => { Rejected = n.GetIntValue(); } }, + { "retired", n => { Retired = n.GetIntValue(); } }, + { "suspended", n => { Suspended = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("approved", Approved); + writer.WriteIntValue("pending_review", PendingReview); + writer.WriteIntValue("rejected", Rejected); + writer.WriteIntValue("retired", Retired); + writer.WriteIntValue("suspended", Suspended); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Substratal.Hub.Core/Api/Generated/Models/Stats_entitlements.cs b/src/Substratal.Hub.Core/Api/Generated/Models/Stats_entitlements.cs new file mode 100644 index 0000000..7f34762 --- /dev/null +++ b/src/Substratal.Hub.Core/Api/Generated/Models/Stats_entitlements.cs @@ -0,0 +1,96 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System; +namespace Substratal.Hub.Core.Api.Generated.Models +{ + /// + /// Entitlements by status. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Stats_entitlements : IAdditionalDataHolder, IBackedModel, IParsable + { + /// The active property + public int? Active + { + get { return BackingStore?.Get("active"); } + set { BackingStore?.Set("active", value); } + } + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData + { + get { return BackingStore.Get>("AdditionalData") ?? new Dictionary(); } + set { BackingStore.Set("AdditionalData", value); } + } + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// The disabled property + public int? Disabled + { + get { return BackingStore?.Get("disabled"); } + set { BackingStore?.Set("disabled", value); } + } + /// The expired property + public int? Expired + { + get { return BackingStore?.Get("expired"); } + set { BackingStore?.Set("expired", value); } + } + /// The revoked property + public int? Revoked + { + get { return BackingStore?.Get("revoked"); } + set { BackingStore?.Set("revoked", value); } + } + /// + /// Instantiates a new and sets the default values. + /// + public Stats_entitlements() + { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Substratal.Hub.Core.Api.Generated.Models.Stats_entitlements CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Substratal.Hub.Core.Api.Generated.Models.Stats_entitlements(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "active", n => { Active = n.GetIntValue(); } }, + { "disabled", n => { Disabled = n.GetIntValue(); } }, + { "expired", n => { Expired = n.GetIntValue(); } }, + { "revoked", n => { Revoked = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("active", Active); + writer.WriteIntValue("disabled", Disabled); + writer.WriteIntValue("expired", Expired); + writer.WriteIntValue("revoked", Revoked); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Substratal.Hub.Core/Api/Generated/Models/Stats_organizationsMember1.cs b/src/Substratal.Hub.Core/Api/Generated/Models/Stats_organizationsMember1.cs new file mode 100644 index 0000000..f61c9c6 --- /dev/null +++ b/src/Substratal.Hub.Core/Api/Generated/Models/Stats_organizationsMember1.cs @@ -0,0 +1,63 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System; +namespace Substratal.Hub.Core.Api.Generated.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Stats_organizationsMember1 : IAdditionalDataHolder, IBackedModel, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData + { + get { return BackingStore.Get>("AdditionalData") ?? new Dictionary(); } + set { BackingStore.Set("AdditionalData", value); } + } + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// + /// Instantiates a new and sets the default values. + /// + public Stats_organizationsMember1() + { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Substratal.Hub.Core.Api.Generated.Models.Stats_organizationsMember1 CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Substratal.Hub.Core.Api.Generated.Models.Stats_organizationsMember1(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Substratal.Hub.Core/Api/Generated/Models/Stats_organizationsMember2.cs b/src/Substratal.Hub.Core/Api/Generated/Models/Stats_organizationsMember2.cs new file mode 100644 index 0000000..bbb0695 --- /dev/null +++ b/src/Substratal.Hub.Core/Api/Generated/Models/Stats_organizationsMember2.cs @@ -0,0 +1,79 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System; +namespace Substratal.Hub.Core.Api.Generated.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Stats_organizationsMember2 : IAdditionalDataHolder, IBackedModel, IParsable + #pragma warning restore CS1591 + { + /// The active property + public int? Active + { + get { return BackingStore?.Get("active"); } + set { BackingStore?.Set("active", value); } + } + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData + { + get { return BackingStore.Get>("AdditionalData") ?? new Dictionary(); } + set { BackingStore.Set("AdditionalData", value); } + } + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// The suspended property + public int? Suspended + { + get { return BackingStore?.Get("suspended"); } + set { BackingStore?.Set("suspended", value); } + } + /// + /// Instantiates a new and sets the default values. + /// + public Stats_organizationsMember2() + { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Substratal.Hub.Core.Api.Generated.Models.Stats_organizationsMember2 CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Substratal.Hub.Core.Api.Generated.Models.Stats_organizationsMember2(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "active", n => { Active = n.GetIntValue(); } }, + { "suspended", n => { Suspended = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("active", Active); + writer.WriteIntValue("suspended", Suspended); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Substratal.Hub.Core/Api/Generated/Models/Stats_push_credentials.cs b/src/Substratal.Hub.Core/Api/Generated/Models/Stats_push_credentials.cs new file mode 100644 index 0000000..5b755cf --- /dev/null +++ b/src/Substratal.Hub.Core/Api/Generated/Models/Stats_push_credentials.cs @@ -0,0 +1,88 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System; +namespace Substratal.Hub.Core.Api.Generated.Models +{ + /// + /// Applications' push credentials by status. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Stats_push_credentials : IAdditionalDataHolder, IBackedModel, IParsable + { + /// The active property + public int? Active + { + get { return BackingStore?.Get("active"); } + set { BackingStore?.Set("active", value); } + } + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData + { + get { return BackingStore.Get>("AdditionalData") ?? new Dictionary(); } + set { BackingStore.Set("AdditionalData", value); } + } + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// The disabled property + public int? Disabled + { + get { return BackingStore?.Get("disabled"); } + set { BackingStore?.Set("disabled", value); } + } + /// The failed property + public int? Failed + { + get { return BackingStore?.Get("failed"); } + set { BackingStore?.Set("failed", value); } + } + /// + /// Instantiates a new and sets the default values. + /// + public Stats_push_credentials() + { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Substratal.Hub.Core.Api.Generated.Models.Stats_push_credentials CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Substratal.Hub.Core.Api.Generated.Models.Stats_push_credentials(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "active", n => { Active = n.GetIntValue(); } }, + { "disabled", n => { Disabled = n.GetIntValue(); } }, + { "failed", n => { Failed = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("active", Active); + writer.WriteIntValue("disabled", Disabled); + writer.WriteIntValue("failed", Failed); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Substratal.Hub.Core/Api/Generated/Models/Stats_subscriptionsMember1.cs b/src/Substratal.Hub.Core/Api/Generated/Models/Stats_subscriptionsMember1.cs new file mode 100644 index 0000000..d41cbb4 --- /dev/null +++ b/src/Substratal.Hub.Core/Api/Generated/Models/Stats_subscriptionsMember1.cs @@ -0,0 +1,63 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System; +namespace Substratal.Hub.Core.Api.Generated.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Stats_subscriptionsMember1 : IAdditionalDataHolder, IBackedModel, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData + { + get { return BackingStore.Get>("AdditionalData") ?? new Dictionary(); } + set { BackingStore.Set("AdditionalData", value); } + } + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// + /// Instantiates a new and sets the default values. + /// + public Stats_subscriptionsMember1() + { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Substratal.Hub.Core.Api.Generated.Models.Stats_subscriptionsMember1 CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Substratal.Hub.Core.Api.Generated.Models.Stats_subscriptionsMember1(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Substratal.Hub.Core/Api/Generated/Models/Stats_subscriptionsMember2.cs b/src/Substratal.Hub.Core/Api/Generated/Models/Stats_subscriptionsMember2.cs new file mode 100644 index 0000000..39c5aee --- /dev/null +++ b/src/Substratal.Hub.Core/Api/Generated/Models/Stats_subscriptionsMember2.cs @@ -0,0 +1,79 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System; +namespace Substratal.Hub.Core.Api.Generated.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Stats_subscriptionsMember2 : IAdditionalDataHolder, IBackedModel, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData + { + get { return BackingStore.Get>("AdditionalData") ?? new Dictionary(); } + set { BackingStore.Set("AdditionalData", value); } + } + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// The organization property + public int? Organization + { + get { return BackingStore?.Get("organization"); } + set { BackingStore?.Set("organization", value); } + } + /// The user property + public int? User + { + get { return BackingStore?.Get("user"); } + set { BackingStore?.Set("user", value); } + } + /// + /// Instantiates a new and sets the default values. + /// + public Stats_subscriptionsMember2() + { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Substratal.Hub.Core.Api.Generated.Models.Stats_subscriptionsMember2 CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Substratal.Hub.Core.Api.Generated.Models.Stats_subscriptionsMember2(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "organization", n => { Organization = n.GetIntValue(); } }, + { "user", n => { User = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("organization", Organization); + writer.WriteIntValue("user", User); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Substratal.Hub.Core/Api/Generated/Models/Stats_tier_change_requests.cs b/src/Substratal.Hub.Core/Api/Generated/Models/Stats_tier_change_requests.cs new file mode 100644 index 0000000..fe2f126 --- /dev/null +++ b/src/Substratal.Hub.Core/Api/Generated/Models/Stats_tier_change_requests.cs @@ -0,0 +1,71 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System; +namespace Substratal.Hub.Core.Api.Generated.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Stats_tier_change_requests : IAdditionalDataHolder, IBackedModel, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData + { + get { return BackingStore.Get>("AdditionalData") ?? new Dictionary(); } + set { BackingStore.Set("AdditionalData", value); } + } + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// Requests that are pending, scheduled, or in_progress. + public int? Open + { + get { return BackingStore?.Get("open"); } + set { BackingStore?.Set("open", value); } + } + /// + /// Instantiates a new and sets the default values. + /// + public Stats_tier_change_requests() + { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Substratal.Hub.Core.Api.Generated.Models.Stats_tier_change_requests CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Substratal.Hub.Core.Api.Generated.Models.Stats_tier_change_requests(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "open", n => { Open = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("open", Open); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Substratal.Hub.Core/Api/Generated/Models/Stats_usersMember1.cs b/src/Substratal.Hub.Core/Api/Generated/Models/Stats_usersMember1.cs new file mode 100644 index 0000000..50d8964 --- /dev/null +++ b/src/Substratal.Hub.Core/Api/Generated/Models/Stats_usersMember1.cs @@ -0,0 +1,63 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System; +namespace Substratal.Hub.Core.Api.Generated.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Stats_usersMember1 : IAdditionalDataHolder, IBackedModel, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData + { + get { return BackingStore.Get>("AdditionalData") ?? new Dictionary(); } + set { BackingStore.Set("AdditionalData", value); } + } + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// + /// Instantiates a new and sets the default values. + /// + public Stats_usersMember1() + { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Substratal.Hub.Core.Api.Generated.Models.Stats_usersMember1 CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Substratal.Hub.Core.Api.Generated.Models.Stats_usersMember1(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Substratal.Hub.Core/Api/Generated/Models/Stats_usersMember2.cs b/src/Substratal.Hub.Core/Api/Generated/Models/Stats_usersMember2.cs new file mode 100644 index 0000000..7dc904d --- /dev/null +++ b/src/Substratal.Hub.Core/Api/Generated/Models/Stats_usersMember2.cs @@ -0,0 +1,95 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System; +namespace Substratal.Hub.Core.Api.Generated.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Stats_usersMember2 : IAdditionalDataHolder, IBackedModel, IParsable + #pragma warning restore CS1591 + { + /// The active property + public int? Active + { + get { return BackingStore?.Get("active"); } + set { BackingStore?.Set("active", value); } + } + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData + { + get { return BackingStore.Get>("AdditionalData") ?? new Dictionary(); } + set { BackingStore.Set("AdditionalData", value); } + } + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// The deleted property + public int? Deleted + { + get { return BackingStore?.Get("deleted"); } + set { BackingStore?.Set("deleted", value); } + } + /// The invited property + public int? Invited + { + get { return BackingStore?.Get("invited"); } + set { BackingStore?.Set("invited", value); } + } + /// The suspended property + public int? Suspended + { + get { return BackingStore?.Get("suspended"); } + set { BackingStore?.Set("suspended", value); } + } + /// + /// Instantiates a new and sets the default values. + /// + public Stats_usersMember2() + { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Substratal.Hub.Core.Api.Generated.Models.Stats_usersMember2 CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Substratal.Hub.Core.Api.Generated.Models.Stats_usersMember2(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "active", n => { Active = n.GetIntValue(); } }, + { "deleted", n => { Deleted = n.GetIntValue(); } }, + { "invited", n => { Invited = n.GetIntValue(); } }, + { "suspended", n => { Suspended = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("active", Active); + writer.WriteIntValue("deleted", Deleted); + writer.WriteIntValue("invited", Invited); + writer.WriteIntValue("suspended", Suspended); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Substratal.Hub.Core/Api/Generated/Models/Stats_webhook_subscriptions.cs b/src/Substratal.Hub.Core/Api/Generated/Models/Stats_webhook_subscriptions.cs new file mode 100644 index 0000000..293377f --- /dev/null +++ b/src/Substratal.Hub.Core/Api/Generated/Models/Stats_webhook_subscriptions.cs @@ -0,0 +1,88 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System; +namespace Substratal.Hub.Core.Api.Generated.Models +{ + /// + /// Webhook subscriptions by status. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Stats_webhook_subscriptions : IAdditionalDataHolder, IBackedModel, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData + { + get { return BackingStore.Get>("AdditionalData") ?? new Dictionary(); } + set { BackingStore.Set("AdditionalData", value); } + } + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// The disabled property + public int? Disabled + { + get { return BackingStore?.Get("disabled"); } + set { BackingStore?.Set("disabled", value); } + } + /// The healthy property + public int? Healthy + { + get { return BackingStore?.Get("healthy"); } + set { BackingStore?.Set("healthy", value); } + } + /// The unhealthy property + public int? Unhealthy + { + get { return BackingStore?.Get("unhealthy"); } + set { BackingStore?.Set("unhealthy", value); } + } + /// + /// Instantiates a new and sets the default values. + /// + public Stats_webhook_subscriptions() + { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Substratal.Hub.Core.Api.Generated.Models.Stats_webhook_subscriptions CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Substratal.Hub.Core.Api.Generated.Models.Stats_webhook_subscriptions(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "disabled", n => { Disabled = n.GetIntValue(); } }, + { "healthy", n => { Healthy = n.GetIntValue(); } }, + { "unhealthy", n => { Unhealthy = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("disabled", Disabled); + writer.WriteIntValue("healthy", Healthy); + writer.WriteIntValue("unhealthy", Unhealthy); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Substratal.Hub.Core/Api/Generated/Models/SubscriptionListItem.cs b/src/Substratal.Hub.Core/Api/Generated/Models/SubscriptionListItem.cs new file mode 100644 index 0000000..a609464 --- /dev/null +++ b/src/Substratal.Hub.Core/Api/Generated/Models/SubscriptionListItem.cs @@ -0,0 +1,82 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Substratal.Hub.Core.Api.Generated.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SubscriptionListItem : global::Substratal.Hub.Core.Api.Generated.Models.Subscription, IParsable + #pragma warning restore CS1591 + { + /// Organization subscriptions: the Organization's name, for display. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OrganizationName + { + get { return BackingStore?.Get("organization_name"); } + set { BackingStore?.Set("organization_name", value); } + } +#nullable restore +#else + public string OrganizationName + { + get { return BackingStore?.Get("organization_name"); } + set { BackingStore?.Set("organization_name", value); } + } +#endif + /// Individual subscriptions: the User's email, for display. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? UserEmail + { + get { return BackingStore?.Get("user_email"); } + set { BackingStore?.Set("user_email", value); } + } +#nullable restore +#else + public string UserEmail + { + get { return BackingStore?.Get("user_email"); } + set { BackingStore?.Set("user_email", value); } + } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Substratal.Hub.Core.Api.Generated.Models.SubscriptionListItem CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Substratal.Hub.Core.Api.Generated.Models.SubscriptionListItem(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "organization_name", n => { OrganizationName = n.GetStringValue(); } }, + { "user_email", n => { UserEmail = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public override void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + writer.WriteStringValue("organization_name", OrganizationName); + writer.WriteStringValue("user_email", UserEmail); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Substratal.Hub.Core/Api/Generated/Models/SubscriptionPage.cs b/src/Substratal.Hub.Core/Api/Generated/Models/SubscriptionPage.cs new file mode 100644 index 0000000..0810760 --- /dev/null +++ b/src/Substratal.Hub.Core/Api/Generated/Models/SubscriptionPage.cs @@ -0,0 +1,64 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Substratal.Hub.Core.Api.Generated.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SubscriptionPage : global::Substratal.Hub.Core.Api.Generated.Models.PageEnvelope, IParsable + #pragma warning restore CS1591 + { + /// The data property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Data + { + get { return BackingStore?.Get?>("data"); } + set { BackingStore?.Set("data", value); } + } +#nullable restore +#else + public List Data + { + get { return BackingStore?.Get>("data"); } + set { BackingStore?.Set("data", value); } + } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Substratal.Hub.Core.Api.Generated.Models.SubscriptionPage CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Substratal.Hub.Core.Api.Generated.Models.SubscriptionPage(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "data", n => { Data = n.GetCollectionOfObjectValues(global::Substratal.Hub.Core.Api.Generated.Models.SubscriptionListItem.CreateFromDiscriminatorValue)?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public override void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + writer.WriteCollectionOfObjectValues("data", Data); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Substratal.Hub.Core/Api/Generated/Models/UsageReport.cs b/src/Substratal.Hub.Core/Api/Generated/Models/UsageReport.cs new file mode 100644 index 0000000..0abe5f4 --- /dev/null +++ b/src/Substratal.Hub.Core/Api/Generated/Models/UsageReport.cs @@ -0,0 +1,124 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System; +namespace Substratal.Hub.Core.Api.Generated.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class UsageReport : IAdditionalDataHolder, IBackedModel, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData + { + get { return BackingStore.Get>("AdditionalData") ?? new Dictionary(); } + set { BackingStore.Set("AdditionalData", value); } + } + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// Oldest period first, then by the grouped dimensions. Periods and groups with no requests are omitted. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Data + { + get { return BackingStore?.Get?>("data"); } + set { BackingStore?.Set("data", value); } + } +#nullable restore +#else + public List Data + { + get { return BackingStore?.Get>("data"); } + set { BackingStore?.Set("data", value); } + } +#endif + /// The granularity property + public global::Substratal.Hub.Core.Api.Generated.Models.UsageReport_granularity? Granularity + { + get { return BackingStore?.Get("granularity"); } + set { BackingStore?.Set("granularity", value); } + } + /// The group_by property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? GroupBy + { + get { return BackingStore?.Get?>("group_by"); } + set { BackingStore?.Set("group_by", value); } + } +#nullable restore +#else + public List GroupBy + { + get { return BackingStore?.Get>("group_by"); } + set { BackingStore?.Set("group_by", value); } + } +#endif + /// The since property + public Date? Since + { + get { return BackingStore?.Get("since"); } + set { BackingStore?.Set("since", value); } + } + /// The until property + public Date? Until + { + get { return BackingStore?.Get("until"); } + set { BackingStore?.Set("until", value); } + } + /// + /// Instantiates a new and sets the default values. + /// + public UsageReport() + { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Substratal.Hub.Core.Api.Generated.Models.UsageReport CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Substratal.Hub.Core.Api.Generated.Models.UsageReport(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "data", n => { Data = n.GetCollectionOfObjectValues(global::Substratal.Hub.Core.Api.Generated.Models.UsageRow.CreateFromDiscriminatorValue)?.AsList(); } }, + { "granularity", n => { Granularity = n.GetEnumValue(); } }, + { "group_by", n => { GroupBy = n.GetCollectionOfEnumValues()?.AsList(); } }, + { "since", n => { Since = n.GetDateValue(); } }, + { "until", n => { Until = n.GetDateValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("data", Data); + writer.WriteEnumValue("granularity", Granularity); + writer.WriteCollectionOfEnumValues("group_by", GroupBy); + writer.WriteDateValue("since", Since); + writer.WriteDateValue("until", Until); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Substratal.Hub.Core/Api/Generated/Models/UsageReport_granularity.cs b/src/Substratal.Hub.Core/Api/Generated/Models/UsageReport_granularity.cs new file mode 100644 index 0000000..a006fd8 --- /dev/null +++ b/src/Substratal.Hub.Core/Api/Generated/Models/UsageReport_granularity.cs @@ -0,0 +1,24 @@ +// +using System.Runtime.Serialization; +using System; +namespace Substratal.Hub.Core.Api.Generated.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum UsageReport_granularity + #pragma warning restore CS1591 + { + [EnumMember(Value = "day")] + #pragma warning disable CS1591 + Day, + #pragma warning restore CS1591 + [EnumMember(Value = "week")] + #pragma warning disable CS1591 + Week, + #pragma warning restore CS1591 + [EnumMember(Value = "month")] + #pragma warning disable CS1591 + Month, + #pragma warning restore CS1591 + } +} diff --git a/src/Substratal.Hub.Core/Api/Generated/Models/UsageReport_group_by.cs b/src/Substratal.Hub.Core/Api/Generated/Models/UsageReport_group_by.cs new file mode 100644 index 0000000..a44ff19 --- /dev/null +++ b/src/Substratal.Hub.Core/Api/Generated/Models/UsageReport_group_by.cs @@ -0,0 +1,24 @@ +// +using System.Runtime.Serialization; +using System; +namespace Substratal.Hub.Core.Api.Generated.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum UsageReport_group_by + #pragma warning restore CS1591 + { + [EnumMember(Value = "application")] + #pragma warning disable CS1591 + Application, + #pragma warning restore CS1591 + [EnumMember(Value = "api_key")] + #pragma warning disable CS1591 + Api_key, + #pragma warning restore CS1591 + [EnumMember(Value = "operation")] + #pragma warning disable CS1591 + Operation, + #pragma warning restore CS1591 + } +} diff --git a/src/Substratal.Hub.Core/Api/Generated/Models/UsageRow.cs b/src/Substratal.Hub.Core/Api/Generated/Models/UsageRow.cs new file mode 100644 index 0000000..dd2873f --- /dev/null +++ b/src/Substratal.Hub.Core/Api/Generated/Models/UsageRow.cs @@ -0,0 +1,166 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System; +namespace Substratal.Hub.Core.Api.Generated.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class UsageRow : IAdditionalDataHolder, IBackedModel, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData + { + get { return BackingStore.Get>("AdditionalData") ?? new Dictionary(); } + set { BackingStore.Set("AdditionalData", value); } + } + /// Only with group_by=api_key. null for requests made without an API Key. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ApiKeyId + { + get { return BackingStore?.Get("api_key_id"); } + set { BackingStore?.Set("api_key_id", value); } + } +#nullable restore +#else + public string ApiKeyId + { + get { return BackingStore?.Get("api_key_id"); } + set { BackingStore?.Set("api_key_id", value); } + } +#endif + /// Only with group_by=application. null for requests that didn't resolve to exactly one Application. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ApplicationId + { + get { return BackingStore?.Get("application_id"); } + set { BackingStore?.Set("application_id", value); } + } +#nullable restore +#else + public string ApplicationId + { + get { return BackingStore?.Get("application_id"); } + set { BackingStore?.Set("application_id", value); } + } +#endif + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// The errors_4xx property + public int? Errors4xx + { + get { return BackingStore?.Get("errors_4xx"); } + set { BackingStore?.Set("errors_4xx", value); } + } + /// The errors_5xx property + public int? Errors5xx + { + get { return BackingStore?.Get("errors_5xx"); } + set { BackingStore?.Set("errors_5xx", value); } + } + /// Mean latency, rounded to the millisecond. + public int? LatencyMsAvg + { + get { return BackingStore?.Get("latency_ms_avg"); } + set { BackingStore?.Set("latency_ms_avg", value); } + } + /// The latency_ms_max property + public int? LatencyMsMax + { + get { return BackingStore?.Get("latency_ms_max"); } + set { BackingStore?.Set("latency_ms_max", value); } + } + /// Only with group_by=operation. The operationId. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Operation + { + get { return BackingStore?.Get("operation"); } + set { BackingStore?.Set("operation", value); } + } +#nullable restore +#else + public string Operation + { + get { return BackingStore?.Get("operation"); } + set { BackingStore?.Set("operation", value); } + } +#endif + /// The bucket's first day (UTC). + public Date? Period + { + get { return BackingStore?.Get("period"); } + set { BackingStore?.Set("period", value); } + } + /// The requests property + public int? Requests + { + get { return BackingStore?.Get("requests"); } + set { BackingStore?.Set("requests", value); } + } + /// + /// Instantiates a new and sets the default values. + /// + public UsageRow() + { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Substratal.Hub.Core.Api.Generated.Models.UsageRow CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Substratal.Hub.Core.Api.Generated.Models.UsageRow(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "api_key_id", n => { ApiKeyId = n.GetStringValue(); } }, + { "application_id", n => { ApplicationId = n.GetStringValue(); } }, + { "errors_4xx", n => { Errors4xx = n.GetIntValue(); } }, + { "errors_5xx", n => { Errors5xx = n.GetIntValue(); } }, + { "latency_ms_avg", n => { LatencyMsAvg = n.GetIntValue(); } }, + { "latency_ms_max", n => { LatencyMsMax = n.GetIntValue(); } }, + { "operation", n => { Operation = n.GetStringValue(); } }, + { "period", n => { Period = n.GetDateValue(); } }, + { "requests", n => { Requests = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("api_key_id", ApiKeyId); + writer.WriteStringValue("application_id", ApplicationId); + writer.WriteIntValue("errors_4xx", Errors4xx); + writer.WriteIntValue("errors_5xx", Errors5xx); + writer.WriteIntValue("latency_ms_avg", LatencyMsAvg); + writer.WriteIntValue("latency_ms_max", LatencyMsMax); + writer.WriteStringValue("operation", Operation); + writer.WriteDateValue("period", Period); + writer.WriteIntValue("requests", Requests); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Substratal.Hub.Core/Api/Generated/Models/User.cs b/src/Substratal.Hub.Core/Api/Generated/Models/User.cs index 84aee79..7ed84cd 100644 --- a/src/Substratal.Hub.Core/Api/Generated/Models/User.cs +++ b/src/Substratal.Hub.Core/Api/Generated/Models/User.cs @@ -83,6 +83,12 @@ public bool? MfaEnabled get { return BackingStore?.Get("mfa_enabled"); } set { BackingStore?.Set("mfa_enabled", value); } } + /// Staff (holding a platform Role that grants a permission) without TOTP. Once staff MFA is enforced, their sessions can only enroll, read themselves, change password, and log out (Auth → Staff MFA). + public bool? MfaEnrollmentRequired + { + get { return BackingStore?.Get("mfa_enrollment_required"); } + set { BackingStore?.Set("mfa_enrollment_required", value); } + } /// The pending_email property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -188,6 +194,7 @@ public virtual IDictionary> GetFieldDeserializers() { "id", n => { Id = n.GetStringValue(); } }, { "last_login_at", n => { LastLoginAt = n.GetDateTimeOffsetValue(); } }, { "mfa_enabled", n => { MfaEnabled = n.GetBoolValue(); } }, + { "mfa_enrollment_required", n => { MfaEnrollmentRequired = n.GetBoolValue(); } }, { "pending_email", n => { PendingEmail = n.GetStringValue(); } }, { "plan", n => { Plan = n.GetEnumValue(); } }, { "plan_sources", n => { PlanSources = n.GetCollectionOfObjectValues(global::Substratal.Hub.Core.Api.Generated.Models.PlanSource.CreateFromDiscriminatorValue)?.AsList(); } }, @@ -211,6 +218,7 @@ public virtual void Serialize(ISerializationWriter writer) writer.WriteStringValue("id", Id); writer.WriteDateTimeOffsetValue("last_login_at", LastLoginAt); writer.WriteBoolValue("mfa_enabled", MfaEnabled); + writer.WriteBoolValue("mfa_enrollment_required", MfaEnrollmentRequired); writer.WriteStringValue("pending_email", PendingEmail); writer.WriteEnumValue("plan", Plan); writer.WriteCollectionOfObjectValues("plan_sources", PlanSources); diff --git a/src/Substratal.Hub.Core/Api/Generated/Models/UserRoleAssignment.cs b/src/Substratal.Hub.Core/Api/Generated/Models/UserRoleAssignment.cs index fefe0cf..a9c6f96 100644 --- a/src/Substratal.Hub.Core/Api/Generated/Models/UserRoleAssignment.cs +++ b/src/Substratal.Hub.Core/Api/Generated/Models/UserRoleAssignment.cs @@ -65,6 +65,12 @@ public bool? Implicit get { return BackingStore?.Get("implicit"); } set { BackingStore?.Set("implicit", value); } } + /// On POST /users/{id}/roles/{roleId} only: the User is now staff but has no TOTP, so their platform Roles take effect once they enroll (Auth → Staff MFA). + public bool? MfaEnrollmentRequired + { + get { return BackingStore?.Get("mfa_enrollment_required"); } + set { BackingStore?.Set("mfa_enrollment_required", value); } + } /// The role_id property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -127,6 +133,7 @@ public virtual IDictionary> GetFieldDeserializers() { "assigned_at", n => { AssignedAt = n.GetDateTimeOffsetValue(); } }, { "assigned_by", n => { AssignedBy = n.GetObjectValue(global::Substratal.Hub.Core.Api.Generated.Models.Actor.CreateFromDiscriminatorValue); } }, { "implicit", n => { Implicit = n.GetBoolValue(); } }, + { "mfa_enrollment_required", n => { MfaEnrollmentRequired = n.GetBoolValue(); } }, { "role_id", n => { RoleId = n.GetStringValue(); } }, { "user_id", n => { UserId = n.GetStringValue(); } }, }; @@ -142,6 +149,7 @@ public virtual void Serialize(ISerializationWriter writer) writer.WriteDateTimeOffsetValue("assigned_at", AssignedAt); writer.WriteObjectValue("assigned_by", AssignedBy); writer.WriteBoolValue("implicit", Implicit); + writer.WriteBoolValue("mfa_enrollment_required", MfaEnrollmentRequired); writer.WriteStringValue("role_id", RoleId); writer.WriteStringValue("user_id", UserId); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Substratal.Hub.Core/Api/Generated/Models/WebhookDeliveryListItem.cs b/src/Substratal.Hub.Core/Api/Generated/Models/WebhookDeliveryListItem.cs new file mode 100644 index 0000000..ac42fa3 --- /dev/null +++ b/src/Substratal.Hub.Core/Api/Generated/Models/WebhookDeliveryListItem.cs @@ -0,0 +1,82 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Substratal.Hub.Core.Api.Generated.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WebhookDeliveryListItem : global::Substratal.Hub.Core.Api.Generated.Models.WebhookDelivery, IParsable + #pragma warning restore CS1591 + { + /// The subscription's scope: an application_id, or 'platform'. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Scope + { + get { return BackingStore?.Get("scope"); } + set { BackingStore?.Set("scope", value); } + } +#nullable restore +#else + public string Scope + { + get { return BackingStore?.Get("scope"); } + set { BackingStore?.Set("scope", value); } + } +#endif + /// The subscription_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SubscriptionId + { + get { return BackingStore?.Get("subscription_id"); } + set { BackingStore?.Set("subscription_id", value); } + } +#nullable restore +#else + public string SubscriptionId + { + get { return BackingStore?.Get("subscription_id"); } + set { BackingStore?.Set("subscription_id", value); } + } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Substratal.Hub.Core.Api.Generated.Models.WebhookDeliveryListItem CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Substratal.Hub.Core.Api.Generated.Models.WebhookDeliveryListItem(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "scope", n => { Scope = n.GetStringValue(); } }, + { "subscription_id", n => { SubscriptionId = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public override void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + writer.WriteStringValue("scope", Scope); + writer.WriteStringValue("subscription_id", SubscriptionId); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Substratal.Hub.Core/Api/Generated/Models/WebhookDeliveryPage.cs b/src/Substratal.Hub.Core/Api/Generated/Models/WebhookDeliveryPage.cs new file mode 100644 index 0000000..7d5937f --- /dev/null +++ b/src/Substratal.Hub.Core/Api/Generated/Models/WebhookDeliveryPage.cs @@ -0,0 +1,64 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Substratal.Hub.Core.Api.Generated.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WebhookDeliveryPage : global::Substratal.Hub.Core.Api.Generated.Models.PageEnvelope, IParsable + #pragma warning restore CS1591 + { + /// The data property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Data + { + get { return BackingStore?.Get?>("data"); } + set { BackingStore?.Set("data", value); } + } +#nullable restore +#else + public List Data + { + get { return BackingStore?.Get>("data"); } + set { BackingStore?.Set("data", value); } + } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Substratal.Hub.Core.Api.Generated.Models.WebhookDeliveryPage CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Substratal.Hub.Core.Api.Generated.Models.WebhookDeliveryPage(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "data", n => { Data = n.GetCollectionOfObjectValues(global::Substratal.Hub.Core.Api.Generated.Models.WebhookDeliveryListItem.CreateFromDiscriminatorValue)?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public override void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + writer.WriteCollectionOfObjectValues("data", Data); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Substratal.Hub.Core/Api/Generated/Organizations/GetIncludeQueryParameterType.cs b/src/Substratal.Hub.Core/Api/Generated/Organizations/GetIncludeQueryParameterType.cs new file mode 100644 index 0000000..235aeaa --- /dev/null +++ b/src/Substratal.Hub.Core/Api/Generated/Organizations/GetIncludeQueryParameterType.cs @@ -0,0 +1,16 @@ +// +using System.Runtime.Serialization; +using System; +namespace Substratal.Hub.Core.Api.Generated.Organizations +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetIncludeQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "total")] + #pragma warning disable CS1591 + Total, + #pragma warning restore CS1591 + } +} diff --git a/src/Substratal.Hub.Core/Api/Generated/Organizations/Item/Billing/CheckoutSessions/CheckoutSessionsRequestBuilder.cs b/src/Substratal.Hub.Core/Api/Generated/Organizations/Item/Billing/CheckoutSessions/CheckoutSessionsRequestBuilder.cs index 6ec3311..5ee3ec6 100644 --- a/src/Substratal.Hub.Core/Api/Generated/Organizations/Item/Billing/CheckoutSessions/CheckoutSessionsRequestBuilder.cs +++ b/src/Substratal.Hub.Core/Api/Generated/Organizations/Item/Billing/CheckoutSessions/CheckoutSessionsRequestBuilder.cs @@ -4,6 +4,7 @@ using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Substratal.Hub.Core.Api.Generated.Models; +using Substratal.Hub.Core.Api.Generated.Organizations.Item.Billing.CheckoutSessions.Item; using System.Collections.Generic; using System.IO; using System.Threading.Tasks; @@ -17,6 +18,18 @@ namespace Substratal.Hub.Core.Api.Generated.Organizations.Item.Billing.CheckoutS [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] public partial class CheckoutSessionsRequestBuilder : BaseRequestBuilder { + /// Gets an item from the Substratal.Hub.Core.Api.Generated.organizations.item.billing.checkoutSessions.item collection + /// The cs_… id Stripe puts in success_url's session_id. + /// A + public global::Substratal.Hub.Core.Api.Generated.Organizations.Item.Billing.CheckoutSessions.Item.WithSession_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("session_id", position); + return new global::Substratal.Hub.Core.Api.Generated.Organizations.Item.Billing.CheckoutSessions.Item.WithSession_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } /// /// Instantiates a new and sets the default values. /// diff --git a/src/Substratal.Hub.Core/Api/Generated/Organizations/Item/Billing/CheckoutSessions/Item/Confirm/ConfirmRequestBuilder.cs b/src/Substratal.Hub.Core/Api/Generated/Organizations/Item/Billing/CheckoutSessions/Item/Confirm/ConfirmRequestBuilder.cs new file mode 100644 index 0000000..6afa544 --- /dev/null +++ b/src/Substratal.Hub.Core/Api/Generated/Organizations/Item/Billing/CheckoutSessions/Item/Confirm/ConfirmRequestBuilder.cs @@ -0,0 +1,95 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using Substratal.Hub.Core.Api.Generated.Models; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Substratal.Hub.Core.Api.Generated.Organizations.Item.Billing.CheckoutSessions.Item.Confirm +{ + /// + /// Builds and executes requests for operations under \organizations\{id}\billing\checkout-sessions\{session_id}\confirm + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ConfirmRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ConfirmRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/organizations/{id}/billing/checkout-sessions/{session_id}/confirm", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ConfirmRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/organizations/{id}/billing/checkout-sessions/{session_id}/confirm", rawUrl) + { + } + /// + /// The Organization form of billing.confirmUserCheckoutSession: returns what GET /organizations/{id}/subscription would, after the sync. + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 503 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToPostRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Substratal.Hub.Core.Api.Generated.Models.Error.CreateFromDiscriminatorValue }, + { "403", global::Substratal.Hub.Core.Api.Generated.Models.Error.CreateFromDiscriminatorValue }, + { "404", global::Substratal.Hub.Core.Api.Generated.Models.Error.CreateFromDiscriminatorValue }, + { "503", global::Substratal.Hub.Core.Api.Generated.Models.Error.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Substratal.Hub.Core.Api.Generated.Models.OrganizationSubscription.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// The Organization form of billing.confirmUserCheckoutSession: returns what GET /organizations/{id}/subscription would, after the sync. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Substratal.Hub.Core.Api.Generated.Organizations.Item.Billing.CheckoutSessions.Item.Confirm.ConfirmRequestBuilder WithUrl(string rawUrl) + { + return new global::Substratal.Hub.Core.Api.Generated.Organizations.Item.Billing.CheckoutSessions.Item.Confirm.ConfirmRequestBuilder(rawUrl, RequestAdapter); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Substratal.Hub.Core/Api/Generated/Organizations/Item/Billing/CheckoutSessions/Item/WithSession_ItemRequestBuilder.cs b/src/Substratal.Hub.Core/Api/Generated/Organizations/Item/Billing/CheckoutSessions/Item/WithSession_ItemRequestBuilder.cs new file mode 100644 index 0000000..ebad8c6 --- /dev/null +++ b/src/Substratal.Hub.Core/Api/Generated/Organizations/Item/Billing/CheckoutSessions/Item/WithSession_ItemRequestBuilder.cs @@ -0,0 +1,41 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using Substratal.Hub.Core.Api.Generated.Organizations.Item.Billing.CheckoutSessions.Item.Confirm; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Substratal.Hub.Core.Api.Generated.Organizations.Item.Billing.CheckoutSessions.Item +{ + /// + /// Builds and executes requests for operations under \organizations\{id}\billing\checkout-sessions\{session_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithSession_ItemRequestBuilder : BaseRequestBuilder + { + /// The confirm property + public global::Substratal.Hub.Core.Api.Generated.Organizations.Item.Billing.CheckoutSessions.Item.Confirm.ConfirmRequestBuilder Confirm + { + get => new global::Substratal.Hub.Core.Api.Generated.Organizations.Item.Billing.CheckoutSessions.Item.Confirm.ConfirmRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithSession_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/organizations/{id}/billing/checkout-sessions/{session_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithSession_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/organizations/{id}/billing/checkout-sessions/{session_id}", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Substratal.Hub.Core/Api/Generated/Organizations/Item/Members/GetIncludeQueryParameterType.cs b/src/Substratal.Hub.Core/Api/Generated/Organizations/Item/Members/GetIncludeQueryParameterType.cs new file mode 100644 index 0000000..5369fab --- /dev/null +++ b/src/Substratal.Hub.Core/Api/Generated/Organizations/Item/Members/GetIncludeQueryParameterType.cs @@ -0,0 +1,16 @@ +// +using System.Runtime.Serialization; +using System; +namespace Substratal.Hub.Core.Api.Generated.Organizations.Item.Members +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetIncludeQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "total")] + #pragma warning disable CS1591 + Total, + #pragma warning restore CS1591 + } +} diff --git a/src/Substratal.Hub.Core/Api/Generated/Organizations/Item/Members/MembersRequestBuilder.cs b/src/Substratal.Hub.Core/Api/Generated/Organizations/Item/Members/MembersRequestBuilder.cs index 639ee6e..63edebf 100644 --- a/src/Substratal.Hub.Core/Api/Generated/Organizations/Item/Members/MembersRequestBuilder.cs +++ b/src/Substratal.Hub.Core/Api/Generated/Organizations/Item/Members/MembersRequestBuilder.cs @@ -41,7 +41,7 @@ public partial class MembersRequestBuilder : BaseRequestBuilder /// /// Path parameters for the request /// The request adapter to use to execute the requests. - public MembersRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/organizations/{id}/members{?cursor*,limit*,membership_status*,q*,role*}", pathParameters) + public MembersRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/organizations/{id}/members{?cursor*,include*,limit*,membership_status*,q*,role*}", pathParameters) { } /// @@ -49,7 +49,7 @@ public MembersRequestBuilder(Dictionary pathParameters, IRequest /// /// The raw URL to use for the request builder. /// The request adapter to use to execute the requests. - public MembersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/organizations/{id}/members{?cursor*,limit*,membership_status*,q*,role*}", rawUrl) + public MembersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/organizations/{id}/members{?cursor*,include*,limit*,membership_status*,q*,role*}", rawUrl) { } /// @@ -175,6 +175,9 @@ public partial class MembersRequestBuilderGetQueryParameters public string Cursor { get; set; } #pragma warning restore CS1591 #endif + /// `total` adds `page.total` and `page.total_capped`: the number of rows matching the current filters across every page, counted up to 10,000 (Conventions → Pagination). Omitted unless requested. + [QueryParameter("include")] + public global::Substratal.Hub.Core.Api.Generated.Organizations.Item.Members.GetIncludeQueryParameterType? Include { get; set; } #pragma warning disable CS1591 [QueryParameter("limit")] public int? Limit { get; set; } diff --git a/src/Substratal.Hub.Core/Api/Generated/Organizations/OrganizationsRequestBuilder.cs b/src/Substratal.Hub.Core/Api/Generated/Organizations/OrganizationsRequestBuilder.cs index 43e2143..7e7dc12 100644 --- a/src/Substratal.Hub.Core/Api/Generated/Organizations/OrganizationsRequestBuilder.cs +++ b/src/Substratal.Hub.Core/Api/Generated/Organizations/OrganizationsRequestBuilder.cs @@ -35,7 +35,7 @@ public partial class OrganizationsRequestBuilder : BaseRequestBuilder /// /// Path parameters for the request /// The request adapter to use to execute the requests. - public OrganizationsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/organizations{?cursor*,limit*,q*,status*}", pathParameters) + public OrganizationsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/organizations{?cursor*,include*,limit*,q*,status*}", pathParameters) { } /// @@ -43,7 +43,7 @@ public OrganizationsRequestBuilder(Dictionary pathParameters, IR /// /// The raw URL to use for the request builder. /// The request adapter to use to execute the requests. - public OrganizationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/organizations{?cursor*,limit*,q*,status*}", rawUrl) + public OrganizationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/organizations{?cursor*,include*,limit*,q*,status*}", rawUrl) { } /// @@ -165,6 +165,9 @@ public partial class OrganizationsRequestBuilderGetQueryParameters public string Cursor { get; set; } #pragma warning restore CS1591 #endif + /// `total` adds `page.total` and `page.total_capped`: the number of rows matching the current filters across every page, counted up to 10,000 (Conventions → Pagination). Omitted unless requested. + [QueryParameter("include")] + public global::Substratal.Hub.Core.Api.Generated.Organizations.GetIncludeQueryParameterType? Include { get; set; } #pragma warning disable CS1591 [QueryParameter("limit")] public int? Limit { get; set; } diff --git a/src/Substratal.Hub.Core/Api/Generated/Platform/PlatformRequestBuilder.cs b/src/Substratal.Hub.Core/Api/Generated/Platform/PlatformRequestBuilder.cs new file mode 100644 index 0000000..0479dde --- /dev/null +++ b/src/Substratal.Hub.Core/Api/Generated/Platform/PlatformRequestBuilder.cs @@ -0,0 +1,41 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using Substratal.Hub.Core.Api.Generated.Platform.Settings; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Substratal.Hub.Core.Api.Generated.Platform +{ + /// + /// Builds and executes requests for operations under \platform + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PlatformRequestBuilder : BaseRequestBuilder + { + /// The settings property + public global::Substratal.Hub.Core.Api.Generated.Platform.Settings.SettingsRequestBuilder Settings + { + get => new global::Substratal.Hub.Core.Api.Generated.Platform.Settings.SettingsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PlatformRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/platform", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PlatformRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/platform", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Substratal.Hub.Core/Api/Generated/Platform/Settings/SettingsRequestBuilder.cs b/src/Substratal.Hub.Core/Api/Generated/Platform/Settings/SettingsRequestBuilder.cs new file mode 100644 index 0000000..e073d16 --- /dev/null +++ b/src/Substratal.Hub.Core/Api/Generated/Platform/Settings/SettingsRequestBuilder.cs @@ -0,0 +1,156 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using Substratal.Hub.Core.Api.Generated.Models; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Substratal.Hub.Core.Api.Generated.Platform.Settings +{ + /// + /// Builds and executes requests for operations under \platform\settings + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SettingsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public SettingsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/platform/settings{?test_mode*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public SettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/platform/settings{?test_mode*}", rawUrl) + { + } + /// + /// Authentication is optional. Without a Bearer token: signup_open and announcement, for live mode, or for test mode with test_mode=true. With one: the caller's own mode, plus client_flags. With operations.view, also read_only and updated_at, read fresh; everyone else may get a copy up to 30 seconds old. ETag is the row's version. + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code + /// When receiving a 429 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Substratal.Hub.Core.Api.Generated.Models.Error.CreateFromDiscriminatorValue }, + { "401", global::Substratal.Hub.Core.Api.Generated.Models.Error.CreateFromDiscriminatorValue }, + { "429", global::Substratal.Hub.Core.Api.Generated.Models.Error.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Substratal.Hub.Core.Api.Generated.Models.PlatformSettings.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Changes the settings of the caller's mode. If-Match is required (400 if_match_required without it). client_flags is merged one level deep, and a flag sent as null is removed. announcement is replaced, and null clears it. Writes platform.settings_updated with before and after. Other API instances pick the change up within 30 seconds. It stays callable while read_only is on, so the freeze can always be lifted. + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 403 status code + /// When receiving a 409 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(global::Substratal.Hub.Core.Api.Generated.Models.PlatformSettingsWrite body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PatchAsync(global::Substratal.Hub.Core.Api.Generated.Models.PlatformSettingsWrite body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Substratal.Hub.Core.Api.Generated.Models.Error.CreateFromDiscriminatorValue }, + { "403", global::Substratal.Hub.Core.Api.Generated.Models.Error.CreateFromDiscriminatorValue }, + { "409", global::Substratal.Hub.Core.Api.Generated.Models.Error.CreateFromDiscriminatorValue }, + { "422", global::Substratal.Hub.Core.Api.Generated.Models.Error.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Substratal.Hub.Core.Api.Generated.Models.PlatformSettings.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Authentication is optional. Without a Bearer token: signup_open and announcement, for live mode, or for test mode with test_mode=true. With one: the caller's own mode, plus client_flags. With operations.view, also read_only and updated_at, read fresh; everyone else may get a copy up to 30 seconds old. ETag is the row's version. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Changes the settings of the caller's mode. If-Match is required (400 if_match_required without it). client_flags is merged one level deep, and a flag sent as null is removed. announcement is replaced, and null clears it. Writes platform.settings_updated with before and after. Other API instances pick the change up within 30 seconds. It stays callable while read_only is on, so the freeze can always be lifted. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(global::Substratal.Hub.Core.Api.Generated.Models.PlatformSettingsWrite body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(global::Substratal.Hub.Core.Api.Generated.Models.PlatformSettingsWrite body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Substratal.Hub.Core.Api.Generated.Platform.Settings.SettingsRequestBuilder WithUrl(string rawUrl) + { + return new global::Substratal.Hub.Core.Api.Generated.Platform.Settings.SettingsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Authentication is optional. Without a Bearer token: signup_open and announcement, for live mode, or for test mode with test_mode=true. With one: the caller's own mode, plus client_flags. With operations.view, also read_only and updated_at, read fresh; everyone else may get a copy up to 30 seconds old. ETag is the row's version. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SettingsRequestBuilderGetQueryParameters + { + /// Unauthenticated callers only: read test mode's settings. An authenticated caller always reads its own mode. + [QueryParameter("test_mode")] + public bool? TestMode { get; set; } + } + } +} +#pragma warning restore CS0618 diff --git a/src/Substratal.Hub.Core/Api/Generated/PushCredentials/GetIncludeQueryParameterType.cs b/src/Substratal.Hub.Core/Api/Generated/PushCredentials/GetIncludeQueryParameterType.cs new file mode 100644 index 0000000..d07e8a8 --- /dev/null +++ b/src/Substratal.Hub.Core/Api/Generated/PushCredentials/GetIncludeQueryParameterType.cs @@ -0,0 +1,16 @@ +// +using System.Runtime.Serialization; +using System; +namespace Substratal.Hub.Core.Api.Generated.PushCredentials +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetIncludeQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "total")] + #pragma warning disable CS1591 + Total, + #pragma warning restore CS1591 + } +} diff --git a/src/Substratal.Hub.Core/Api/Generated/PushCredentials/GetStatusQueryParameterType.cs b/src/Substratal.Hub.Core/Api/Generated/PushCredentials/GetStatusQueryParameterType.cs new file mode 100644 index 0000000..6e20133 --- /dev/null +++ b/src/Substratal.Hub.Core/Api/Generated/PushCredentials/GetStatusQueryParameterType.cs @@ -0,0 +1,24 @@ +// +using System.Runtime.Serialization; +using System; +namespace Substratal.Hub.Core.Api.Generated.PushCredentials +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetStatusQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "active")] + #pragma warning disable CS1591 + Active, + #pragma warning restore CS1591 + [EnumMember(Value = "failed")] + #pragma warning disable CS1591 + Failed, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + } +} diff --git a/src/Substratal.Hub.Core/Api/Generated/PushCredentials/PushCredentialsRequestBuilder.cs b/src/Substratal.Hub.Core/Api/Generated/PushCredentials/PushCredentialsRequestBuilder.cs new file mode 100644 index 0000000..747f1a9 --- /dev/null +++ b/src/Substratal.Hub.Core/Api/Generated/PushCredentials/PushCredentialsRequestBuilder.cs @@ -0,0 +1,128 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using Substratal.Hub.Core.Api.Generated.Models; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Substratal.Hub.Core.Api.Generated.PushCredentials +{ + /// + /// Builds and executes requests for operations under \push-credentials + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PushCredentialsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PushCredentialsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/push-credentials{?cursor*,include*,limit*,provider*,status*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PushCredentialsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/push-credentials{?cursor*,include*,limit*,provider*,status*}", rawUrl) + { + } + /// + /// applications.manage sees every Application's credentials. A User without it sees only the credentials of Applications they own (owner_user_id, or an active org_admin of the owning Organization); owning none is an empty list. Any other API Key, including an app key, gets 403 and uses GET /applications/{id}/push-credentials instead. Never returns key material. Newest first. + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 403 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Substratal.Hub.Core.Api.Generated.Models.Error.CreateFromDiscriminatorValue }, + { "403", global::Substratal.Hub.Core.Api.Generated.Models.Error.CreateFromDiscriminatorValue }, + { "422", global::Substratal.Hub.Core.Api.Generated.Models.Error.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Substratal.Hub.Core.Api.Generated.Models.PushCredentialPage.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// applications.manage sees every Application's credentials. A User without it sees only the credentials of Applications they own (owner_user_id, or an active org_admin of the owning Organization); owning none is an empty list. Any other API Key, including an app key, gets 403 and uses GET /applications/{id}/push-credentials instead. Never returns key material. Newest first. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Substratal.Hub.Core.Api.Generated.PushCredentials.PushCredentialsRequestBuilder WithUrl(string rawUrl) + { + return new global::Substratal.Hub.Core.Api.Generated.PushCredentials.PushCredentialsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// applications.manage sees every Application's credentials. A User without it sees only the credentials of Applications they own (owner_user_id, or an active org_admin of the owning Organization); owning none is an empty list. Any other API Key, including an app key, gets 403 and uses GET /applications/{id}/push-credentials instead. Never returns key material. Newest first. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PushCredentialsRequestBuilderGetQueryParameters + { +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + #pragma warning disable CS1591 + [QueryParameter("cursor")] + public string? Cursor { get; set; } + #pragma warning restore CS1591 +#nullable restore +#else + #pragma warning disable CS1591 + [QueryParameter("cursor")] + public string Cursor { get; set; } + #pragma warning restore CS1591 +#endif + /// `total` adds `page.total` and `page.total_capped`: the number of rows matching the current filters across every page, counted up to 10,000 (Conventions → Pagination). Omitted unless requested. + [QueryParameter("include")] + public global::Substratal.Hub.Core.Api.Generated.PushCredentials.GetIncludeQueryParameterType? Include { get; set; } + #pragma warning disable CS1591 + [QueryParameter("limit")] + public int? Limit { get; set; } + #pragma warning restore CS1591 + #pragma warning disable CS1591 + [QueryParameter("provider")] + public global::Substratal.Hub.Core.Api.Generated.Models.PushProvider? Provider { get; set; } + #pragma warning restore CS1591 + #pragma warning disable CS1591 + [QueryParameter("status")] + public global::Substratal.Hub.Core.Api.Generated.PushCredentials.GetStatusQueryParameterType? Status { get; set; } + #pragma warning restore CS1591 + } + } +} +#pragma warning restore CS0618 diff --git a/src/Substratal.Hub.Core/Api/Generated/Roles/GetIncludeQueryParameterType.cs b/src/Substratal.Hub.Core/Api/Generated/Roles/GetIncludeQueryParameterType.cs new file mode 100644 index 0000000..86f02c3 --- /dev/null +++ b/src/Substratal.Hub.Core/Api/Generated/Roles/GetIncludeQueryParameterType.cs @@ -0,0 +1,16 @@ +// +using System.Runtime.Serialization; +using System; +namespace Substratal.Hub.Core.Api.Generated.Roles +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetIncludeQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "total")] + #pragma warning disable CS1591 + Total, + #pragma warning restore CS1591 + } +} diff --git a/src/Substratal.Hub.Core/Api/Generated/Roles/Item/RolesItemRequestBuilder.cs b/src/Substratal.Hub.Core/Api/Generated/Roles/Item/RolesItemRequestBuilder.cs index 0203dc1..400c10e 100644 --- a/src/Substratal.Hub.Core/Api/Generated/Roles/Item/RolesItemRequestBuilder.cs +++ b/src/Substratal.Hub.Core/Api/Generated/Roles/Item/RolesItemRequestBuilder.cs @@ -85,7 +85,7 @@ public async Task DeleteAsync(Action(requestInfo, global::Substratal.Hub.Core.Api.Generated.Models.Role.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Change a Role's permissions or description + /// An app Role may be changed by platform roles.manage, the Application's own key holding roles.manage, or the Application's owner (its owner_user_id, or any active org_admin of its owner_organization_id) with no platform permission needed. Its permissions must be keys its own Application declares; a platform key, another Application's key, or an undeclared key returns 422 unknown_permission. A platform Role needs platform roles.manage, and every permission it grants must be one the caller holds (403 role_escalation_forbidden); seed Roles can't be changed (403 seed_role_immutable). A Role the caller can't see (another Application's, or a platform Role for a caller with no platform permission) returns 404 role_not_found; one it can see but not change returns 403 forbidden. /// /// A /// The request body @@ -93,6 +93,7 @@ public async Task DeleteAsync(ActionConfiguration for the request such as headers, query parameters, and middleware options. /// When receiving a 400 status code /// When receiving a 403 status code + /// When receiving a 404 status code /// When receiving a 409 status code /// When receiving a 422 status code #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -110,6 +111,7 @@ public async Task DeleteAsync(Action - /// Change a Role's permissions or description + /// An app Role may be changed by platform roles.manage, the Application's own key holding roles.manage, or the Application's owner (its owner_user_id, or any active org_admin of its owner_organization_id) with no platform permission needed. Its permissions must be keys its own Application declares; a platform key, another Application's key, or an undeclared key returns 422 unknown_permission. A platform Role needs platform roles.manage, and every permission it grants must be one the caller holds (403 role_escalation_forbidden); seed Roles can't be changed (403 seed_role_immutable). A Role the caller can't see (another Application's, or a platform Role for a caller with no platform permission) returns 404 role_not_found; one it can see but not change returns 403 forbidden. /// /// A /// The request body diff --git a/src/Substratal.Hub.Core/Api/Generated/Roles/RolesRequestBuilder.cs b/src/Substratal.Hub.Core/Api/Generated/Roles/RolesRequestBuilder.cs index c0c40c0..655cbcb 100644 --- a/src/Substratal.Hub.Core/Api/Generated/Roles/RolesRequestBuilder.cs +++ b/src/Substratal.Hub.Core/Api/Generated/Roles/RolesRequestBuilder.cs @@ -35,7 +35,7 @@ public partial class RolesRequestBuilder : BaseRequestBuilder /// /// Path parameters for the request /// The request adapter to use to execute the requests. - public RolesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/roles{?cursor*,limit*,scope*}", pathParameters) + public RolesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/roles{?cursor*,include*,limit*,scope*}", pathParameters) { } /// @@ -43,11 +43,11 @@ public RolesRequestBuilder(Dictionary pathParameters, IRequestAd /// /// The raw URL to use for the request builder. /// The request adapter to use to execute the requests. - public RolesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/roles{?cursor*,limit*,scope*}", rawUrl) + public RolesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/roles{?cursor*,include*,limit*,scope*}", rawUrl) { } /// - /// List Roles + /// Any authenticated caller; each sees only the Roles visible to it. Platform Roles are visible to Users holding any platform permission and to platform keys. An Application's Roles are visible to platform roles.manage holders, the Application's own key, and the Application's owner (its owner_user_id, or any active org_admin of its owner_organization_id), with no platform permission needed. An owner sees only the Roles of Applications they own: never another Application's, and never platform Roles unless they also hold a platform permission. A scope the caller can't see returns an empty page, not an error. /// /// A /// Cancellation token to use when cancelling requests @@ -101,7 +101,7 @@ public RolesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base return await RequestAdapter.SendAsync(requestInfo, global::Substratal.Hub.Core.Api.Generated.Models.Role.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// List Roles + /// Any authenticated caller; each sees only the Roles visible to it. Platform Roles are visible to Users holding any platform permission and to platform keys. An Application's Roles are visible to platform roles.manage holders, the Application's own key, and the Application's owner (its owner_user_id, or any active org_admin of its owner_organization_id), with no platform permission needed. An owner sees only the Roles of Applications they own: never another Application's, and never platform Roles unless they also hold a platform permission. A scope the caller can't see returns an empty page, not an error. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -151,7 +151,7 @@ public RequestInformation ToPostRequestInformation(global::Substratal.Hub.Core.A return new global::Substratal.Hub.Core.Api.Generated.Roles.RolesRequestBuilder(rawUrl, RequestAdapter); } /// - /// List Roles + /// Any authenticated caller; each sees only the Roles visible to it. Platform Roles are visible to Users holding any platform permission and to platform keys. An Application's Roles are visible to platform roles.manage holders, the Application's own key, and the Application's owner (its owner_user_id, or any active org_admin of its owner_organization_id), with no platform permission needed. An owner sees only the Roles of Applications they own: never another Application's, and never platform Roles unless they also hold a platform permission. A scope the caller can't see returns an empty page, not an error. /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] public partial class RolesRequestBuilderGetQueryParameters @@ -169,6 +169,9 @@ public partial class RolesRequestBuilderGetQueryParameters public string Cursor { get; set; } #pragma warning restore CS1591 #endif + /// `total` adds `page.total` and `page.total_capped`: the number of rows matching the current filters across every page, counted up to 10,000 (Conventions → Pagination). Omitted unless requested. + [QueryParameter("include")] + public global::Substratal.Hub.Core.Api.Generated.Roles.GetIncludeQueryParameterType? Include { get; set; } #pragma warning disable CS1591 [QueryParameter("limit")] public int? Limit { get; set; } diff --git a/src/Substratal.Hub.Core/Api/Generated/Stats/StatsRequestBuilder.cs b/src/Substratal.Hub.Core/Api/Generated/Stats/StatsRequestBuilder.cs new file mode 100644 index 0000000..0c774ef --- /dev/null +++ b/src/Substratal.Hub.Core/Api/Generated/Stats/StatsRequestBuilder.cs @@ -0,0 +1,113 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using Substratal.Hub.Core.Api.Generated.Models; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Substratal.Hub.Core.Api.Generated.Stats +{ + /// + /// Builds and executes requests for operations under \stats + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class StatsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public StatsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/stats{?tenant_id*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public StatsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/stats{?tenant_id*}", rawUrl) + { + } + /// + /// Live counts, grouped by status, computed at most once a minute per server instance (generated_at says when). Every known status is present, with 0 when nothing has it. Counts are in the caller's mode. Platform-wide with operations.view or users.list. With tenant_id, the counts are that Tenant's only, and its owner may call it too; users, subscriptions, and organizations are then null, since they don't belong to a Tenant. + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Substratal.Hub.Core.Api.Generated.Models.Error.CreateFromDiscriminatorValue }, + { "403", global::Substratal.Hub.Core.Api.Generated.Models.Error.CreateFromDiscriminatorValue }, + { "404", global::Substratal.Hub.Core.Api.Generated.Models.Error.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Substratal.Hub.Core.Api.Generated.Models.Stats.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Live counts, grouped by status, computed at most once a minute per server instance (generated_at says when). Every known status is present, with 0 when nothing has it. Counts are in the caller's mode. Platform-wide with operations.view or users.list. With tenant_id, the counts are that Tenant's only, and its owner may call it too; users, subscriptions, and organizations are then null, since they don't belong to a Tenant. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Substratal.Hub.Core.Api.Generated.Stats.StatsRequestBuilder WithUrl(string rawUrl) + { + return new global::Substratal.Hub.Core.Api.Generated.Stats.StatsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Live counts, grouped by status, computed at most once a minute per server instance (generated_at says when). Every known status is present, with 0 when nothing has it. Counts are in the caller's mode. Platform-wide with operations.view or users.list. With tenant_id, the counts are that Tenant's only, and its owner may call it too; users, subscriptions, and organizations are then null, since they don't belong to a Tenant. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class StatsRequestBuilderGetQueryParameters + { +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + #pragma warning disable CS1591 + [QueryParameter("tenant_id")] + public string? TenantId { get; set; } + #pragma warning restore CS1591 +#nullable restore +#else + #pragma warning disable CS1591 + [QueryParameter("tenant_id")] + public string TenantId { get; set; } + #pragma warning restore CS1591 +#endif + } + } +} +#pragma warning restore CS0618 diff --git a/src/Substratal.Hub.Core/Api/Generated/Subscriptions/GetIncludeQueryParameterType.cs b/src/Substratal.Hub.Core/Api/Generated/Subscriptions/GetIncludeQueryParameterType.cs new file mode 100644 index 0000000..6055973 --- /dev/null +++ b/src/Substratal.Hub.Core/Api/Generated/Subscriptions/GetIncludeQueryParameterType.cs @@ -0,0 +1,16 @@ +// +using System.Runtime.Serialization; +using System; +namespace Substratal.Hub.Core.Api.Generated.Subscriptions +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetIncludeQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "total")] + #pragma warning disable CS1591 + Total, + #pragma warning restore CS1591 + } +} diff --git a/src/Substratal.Hub.Core/Api/Generated/Subscriptions/GetSubscriber_typeQueryParameterType.cs b/src/Substratal.Hub.Core/Api/Generated/Subscriptions/GetSubscriber_typeQueryParameterType.cs new file mode 100644 index 0000000..dde008c --- /dev/null +++ b/src/Substratal.Hub.Core/Api/Generated/Subscriptions/GetSubscriber_typeQueryParameterType.cs @@ -0,0 +1,20 @@ +// +using System.Runtime.Serialization; +using System; +namespace Substratal.Hub.Core.Api.Generated.Subscriptions +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetSubscriber_typeQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "user")] + #pragma warning disable CS1591 + User, + #pragma warning restore CS1591 + [EnumMember(Value = "organization")] + #pragma warning disable CS1591 + Organization, + #pragma warning restore CS1591 + } +} diff --git a/src/Substratal.Hub.Core/Api/Generated/Subscriptions/SubscriptionsRequestBuilder.cs b/src/Substratal.Hub.Core/Api/Generated/Subscriptions/SubscriptionsRequestBuilder.cs new file mode 100644 index 0000000..883545d --- /dev/null +++ b/src/Substratal.Hub.Core/Api/Generated/Subscriptions/SubscriptionsRequestBuilder.cs @@ -0,0 +1,141 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using Substratal.Hub.Core.Api.Generated.Models; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Substratal.Hub.Core.Api.Generated.Subscriptions +{ + /// + /// Builds and executes requests for operations under \subscriptions + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SubscriptionsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public SubscriptionsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/subscriptions{?cancel_at_period_end*,current_period_end_before*,cursor*,include*,limit*,status*,subscriber_type*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public SubscriptionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/subscriptions{?cancel_at_period_end*,current_period_end_before*,cursor*,include*,limit*,status*,subscriber_type*}", rawUrl) + { + } + /// + /// Requires billing.manage. Every User's and Organization's subscription in the caller's mode, most recently updated first, with the subscriber's email or name for display. Revenue and invoices stay in Stripe. + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 403 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Substratal.Hub.Core.Api.Generated.Models.Error.CreateFromDiscriminatorValue }, + { "403", global::Substratal.Hub.Core.Api.Generated.Models.Error.CreateFromDiscriminatorValue }, + { "422", global::Substratal.Hub.Core.Api.Generated.Models.Error.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Substratal.Hub.Core.Api.Generated.Models.SubscriptionPage.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Requires billing.manage. Every User's and Organization's subscription in the caller's mode, most recently updated first, with the subscriber's email or name for display. Revenue and invoices stay in Stripe. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Substratal.Hub.Core.Api.Generated.Subscriptions.SubscriptionsRequestBuilder WithUrl(string rawUrl) + { + return new global::Substratal.Hub.Core.Api.Generated.Subscriptions.SubscriptionsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Requires billing.manage. Every User's and Organization's subscription in the caller's mode, most recently updated first, with the subscriber's email or name for display. Revenue and invoices stay in Stripe. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SubscriptionsRequestBuilderGetQueryParameters + { + #pragma warning disable CS1591 + [QueryParameter("cancel_at_period_end")] + public bool? CancelAtPeriodEnd { get; set; } + #pragma warning restore CS1591 + /// Subscriptions whose current period ends before this time. + [QueryParameter("current_period_end_before")] + public DateTimeOffset? CurrentPeriodEndBefore { get; set; } +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + #pragma warning disable CS1591 + [QueryParameter("cursor")] + public string? Cursor { get; set; } + #pragma warning restore CS1591 +#nullable restore +#else + #pragma warning disable CS1591 + [QueryParameter("cursor")] + public string Cursor { get; set; } + #pragma warning restore CS1591 +#endif + /// `total` adds `page.total` and `page.total_capped`: the number of rows matching the current filters across every page, counted up to 10,000 (Conventions → Pagination). Omitted unless requested. + [QueryParameter("include")] + public global::Substratal.Hub.Core.Api.Generated.Subscriptions.GetIncludeQueryParameterType? Include { get; set; } + #pragma warning disable CS1591 + [QueryParameter("limit")] + public int? Limit { get; set; } + #pragma warning restore CS1591 + /// Subscriptions in any of these statuses. Repeatable. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("status")] + public global::Substratal.Hub.Core.Api.Generated.Models.SubscriptionStatus[]? Status { get; set; } +#nullable restore +#else + [QueryParameter("status")] + public global::Substratal.Hub.Core.Api.Generated.Models.SubscriptionStatus[] Status { get; set; } +#endif + #pragma warning disable CS1591 + [QueryParameter("subscriber_type")] + public global::Substratal.Hub.Core.Api.Generated.Subscriptions.GetSubscriber_typeQueryParameterType? SubscriberType { get; set; } + #pragma warning restore CS1591 + } + } +} +#pragma warning restore CS0618 diff --git a/src/Substratal.Hub.Core/Api/Generated/SubstratalApiClient.cs b/src/Substratal.Hub.Core/Api/Generated/SubstratalApiClient.cs index 7a94729..134d99d 100644 --- a/src/Substratal.Hub.Core/Api/Generated/SubstratalApiClient.cs +++ b/src/Substratal.Hub.Core/Api/Generated/SubstratalApiClient.cs @@ -16,9 +16,15 @@ using Substratal.Hub.Core.Api.Generated.Health; using Substratal.Hub.Core.Api.Generated.Organizations; using Substratal.Hub.Core.Api.Generated.Permissions; +using Substratal.Hub.Core.Api.Generated.Platform; +using Substratal.Hub.Core.Api.Generated.PushCredentials; using Substratal.Hub.Core.Api.Generated.Roles; +using Substratal.Hub.Core.Api.Generated.Stats; +using Substratal.Hub.Core.Api.Generated.Subscriptions; using Substratal.Hub.Core.Api.Generated.Tenants; +using Substratal.Hub.Core.Api.Generated.Usage; using Substratal.Hub.Core.Api.Generated.Users; +using Substratal.Hub.Core.Api.Generated.WebhookDeliveries; using Substratal.Hub.Core.Api.Generated.Webhooks; using System.Collections.Generic; using System.IO; @@ -77,21 +83,51 @@ public partial class SubstratalApiClient : BaseRequestBuilder { get => new global::Substratal.Hub.Core.Api.Generated.Permissions.PermissionsRequestBuilder(PathParameters, RequestAdapter); } + /// The platform property + public global::Substratal.Hub.Core.Api.Generated.Platform.PlatformRequestBuilder Platform + { + get => new global::Substratal.Hub.Core.Api.Generated.Platform.PlatformRequestBuilder(PathParameters, RequestAdapter); + } + /// The pushCredentials property + public global::Substratal.Hub.Core.Api.Generated.PushCredentials.PushCredentialsRequestBuilder PushCredentials + { + get => new global::Substratal.Hub.Core.Api.Generated.PushCredentials.PushCredentialsRequestBuilder(PathParameters, RequestAdapter); + } /// The roles property public global::Substratal.Hub.Core.Api.Generated.Roles.RolesRequestBuilder Roles { get => new global::Substratal.Hub.Core.Api.Generated.Roles.RolesRequestBuilder(PathParameters, RequestAdapter); } + /// The stats property + public global::Substratal.Hub.Core.Api.Generated.Stats.StatsRequestBuilder Stats + { + get => new global::Substratal.Hub.Core.Api.Generated.Stats.StatsRequestBuilder(PathParameters, RequestAdapter); + } + /// The subscriptions property + public global::Substratal.Hub.Core.Api.Generated.Subscriptions.SubscriptionsRequestBuilder Subscriptions + { + get => new global::Substratal.Hub.Core.Api.Generated.Subscriptions.SubscriptionsRequestBuilder(PathParameters, RequestAdapter); + } /// The tenants property public global::Substratal.Hub.Core.Api.Generated.Tenants.TenantsRequestBuilder Tenants { get => new global::Substratal.Hub.Core.Api.Generated.Tenants.TenantsRequestBuilder(PathParameters, RequestAdapter); } + /// The usage property + public global::Substratal.Hub.Core.Api.Generated.Usage.UsageRequestBuilder Usage + { + get => new global::Substratal.Hub.Core.Api.Generated.Usage.UsageRequestBuilder(PathParameters, RequestAdapter); + } /// The users property public global::Substratal.Hub.Core.Api.Generated.Users.UsersRequestBuilder Users { get => new global::Substratal.Hub.Core.Api.Generated.Users.UsersRequestBuilder(PathParameters, RequestAdapter); } + /// The webhookDeliveries property + public global::Substratal.Hub.Core.Api.Generated.WebhookDeliveries.WebhookDeliveriesRequestBuilder WebhookDeliveries + { + get => new global::Substratal.Hub.Core.Api.Generated.WebhookDeliveries.WebhookDeliveriesRequestBuilder(PathParameters, RequestAdapter); + } /// The webhooks property public global::Substratal.Hub.Core.Api.Generated.Webhooks.WebhooksRequestBuilder Webhooks { diff --git a/src/Substratal.Hub.Core/Api/Generated/Usage/GetGranularityQueryParameterType.cs b/src/Substratal.Hub.Core/Api/Generated/Usage/GetGranularityQueryParameterType.cs new file mode 100644 index 0000000..9c17300 --- /dev/null +++ b/src/Substratal.Hub.Core/Api/Generated/Usage/GetGranularityQueryParameterType.cs @@ -0,0 +1,24 @@ +// +using System.Runtime.Serialization; +using System; +namespace Substratal.Hub.Core.Api.Generated.Usage +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetGranularityQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "day")] + #pragma warning disable CS1591 + Day, + #pragma warning restore CS1591 + [EnumMember(Value = "week")] + #pragma warning disable CS1591 + Week, + #pragma warning restore CS1591 + [EnumMember(Value = "month")] + #pragma warning disable CS1591 + Month, + #pragma warning restore CS1591 + } +} diff --git a/src/Substratal.Hub.Core/Api/Generated/Usage/GetGroup_byQueryParameterType.cs b/src/Substratal.Hub.Core/Api/Generated/Usage/GetGroup_byQueryParameterType.cs new file mode 100644 index 0000000..561b77d --- /dev/null +++ b/src/Substratal.Hub.Core/Api/Generated/Usage/GetGroup_byQueryParameterType.cs @@ -0,0 +1,24 @@ +// +using System.Runtime.Serialization; +using System; +namespace Substratal.Hub.Core.Api.Generated.Usage +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetGroup_byQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "application")] + #pragma warning disable CS1591 + Application, + #pragma warning restore CS1591 + [EnumMember(Value = "api_key")] + #pragma warning disable CS1591 + Api_key, + #pragma warning restore CS1591 + [EnumMember(Value = "operation")] + #pragma warning disable CS1591 + Operation, + #pragma warning restore CS1591 + } +} diff --git a/src/Substratal.Hub.Core/Api/Generated/Usage/UsageRequestBuilder.cs b/src/Substratal.Hub.Core/Api/Generated/Usage/UsageRequestBuilder.cs new file mode 100644 index 0000000..5d1b779 --- /dev/null +++ b/src/Substratal.Hub.Core/Api/Generated/Usage/UsageRequestBuilder.cs @@ -0,0 +1,156 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using Substratal.Hub.Core.Api.Generated.Models; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Substratal.Hub.Core.Api.Generated.Usage +{ + /// + /// Builds and executes requests for operations under \usage + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class UsageRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public UsageRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/usage{?api_key_id*,application_id*,granularity*,group_by*,operation*,since*,until*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public UsageRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/usage{?api_key_id*,application_id*,granularity*,group_by*,operation*,since*,until*}", rawUrl) + { + } + /// + /// From a daily rollup of the request log, refreshed hourly: the current UTC day covers up to the last complete hour. Buckets are UTC; week is ISO (Monday start); period is the bucket's first day, so the buckets at either end of the range may be partial. Rows are in the caller's mode. Platform operations.view sees every row. An app-confined API Key sees only its own Application's rows, and an Application's owner sees only that Application's rows by passing application_id; both are forced. Anyone else gets 403. + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 403 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Substratal.Hub.Core.Api.Generated.Models.Error.CreateFromDiscriminatorValue }, + { "403", global::Substratal.Hub.Core.Api.Generated.Models.Error.CreateFromDiscriminatorValue }, + { "422", global::Substratal.Hub.Core.Api.Generated.Models.Error.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Substratal.Hub.Core.Api.Generated.Models.UsageReport.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// From a daily rollup of the request log, refreshed hourly: the current UTC day covers up to the last complete hour. Buckets are UTC; week is ISO (Monday start); period is the bucket's first day, so the buckets at either end of the range may be partial. Rows are in the caller's mode. Platform operations.view sees every row. An app-confined API Key sees only its own Application's rows, and an Application's owner sees only that Application's rows by passing application_id; both are forced. Anyone else gets 403. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Substratal.Hub.Core.Api.Generated.Usage.UsageRequestBuilder WithUrl(string rawUrl) + { + return new global::Substratal.Hub.Core.Api.Generated.Usage.UsageRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// From a daily rollup of the request log, refreshed hourly: the current UTC day covers up to the last complete hour. Buckets are UTC; week is ISO (Monday start); period is the bucket's first day, so the buckets at either end of the range may be partial. Rows are in the caller's mode. Platform operations.view sees every row. An app-confined API Key sees only its own Application's rows, and an Application's owner sees only that Application's rows by passing application_id; both are forced. Anyone else gets 403. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class UsageRequestBuilderGetQueryParameters + { +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + #pragma warning disable CS1591 + [QueryParameter("api_key_id")] + public string? ApiKeyId { get; set; } + #pragma warning restore CS1591 +#nullable restore +#else + #pragma warning disable CS1591 + [QueryParameter("api_key_id")] + public string ApiKeyId { get; set; } + #pragma warning restore CS1591 +#endif +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + #pragma warning disable CS1591 + [QueryParameter("application_id")] + public string? ApplicationId { get; set; } + #pragma warning restore CS1591 +#nullable restore +#else + #pragma warning disable CS1591 + [QueryParameter("application_id")] + public string ApplicationId { get; set; } + #pragma warning restore CS1591 +#endif + #pragma warning disable CS1591 + [QueryParameter("granularity")] + public global::Substratal.Hub.Core.Api.Generated.Usage.GetGranularityQueryParameterType? Granularity { get; set; } + #pragma warning restore CS1591 + /// Split rows by these dimensions. Repeat for several. Without it, one row per period. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("group_by")] + public global::Substratal.Hub.Core.Api.Generated.Usage.GetGroup_byQueryParameterType[]? GroupBy { get; set; } +#nullable restore +#else + [QueryParameter("group_by")] + public global::Substratal.Hub.Core.Api.Generated.Usage.GetGroup_byQueryParameterType[] GroupBy { get; set; } +#endif + /// An operationId, such as users.list. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("operation")] + public string? Operation { get; set; } +#nullable restore +#else + [QueryParameter("operation")] + public string Operation { get; set; } +#endif + /// First day included (UTC). Default: 30 days before until. + [QueryParameter("since")] + public Date? Since { get; set; } + /// First day not included (UTC). Default: tomorrow, so today is included. At most 13 months after since. + [QueryParameter("until")] + public Date? Until { get; set; } + } + } +} +#pragma warning restore CS0618 diff --git a/src/Substratal.Hub.Core/Api/Generated/Users/BulkInvite/BulkInvitePostRequestBody.cs b/src/Substratal.Hub.Core/Api/Generated/Users/BulkInvite/BulkInvitePostRequestBody.cs new file mode 100644 index 0000000..429f8ba --- /dev/null +++ b/src/Substratal.Hub.Core/Api/Generated/Users/BulkInvite/BulkInvitePostRequestBody.cs @@ -0,0 +1,99 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System; +namespace Substratal.Hub.Core.Api.Generated.Users.BulkInvite +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class BulkInvitePostRequestBody : IAdditionalDataHolder, IBackedModel, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData + { + get { return BackingStore.Get>("AdditionalData") ?? new Dictionary(); } + set { BackingStore.Set("AdditionalData", value); } + } + /// The application_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ApplicationId + { + get { return BackingStore?.Get("application_id"); } + set { BackingStore?.Set("application_id", value); } + } +#nullable restore +#else + public string ApplicationId + { + get { return BackingStore?.Get("application_id"); } + set { BackingStore?.Set("application_id", value); } + } +#endif + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// The emails property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Emails + { + get { return BackingStore?.Get?>("emails"); } + set { BackingStore?.Set("emails", value); } + } +#nullable restore +#else + public List Emails + { + get { return BackingStore?.Get>("emails"); } + set { BackingStore?.Set("emails", value); } + } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public BulkInvitePostRequestBody() + { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Substratal.Hub.Core.Api.Generated.Users.BulkInvite.BulkInvitePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Substratal.Hub.Core.Api.Generated.Users.BulkInvite.BulkInvitePostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "application_id", n => { ApplicationId = n.GetStringValue(); } }, + { "emails", n => { Emails = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("application_id", ApplicationId); + writer.WriteCollectionOfPrimitiveValues("emails", Emails); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Substratal.Hub.Core/Api/Generated/Users/BulkInvite/BulkInviteRequestBuilder.cs b/src/Substratal.Hub.Core/Api/Generated/Users/BulkInvite/BulkInviteRequestBuilder.cs new file mode 100644 index 0000000..74ddf75 --- /dev/null +++ b/src/Substratal.Hub.Core/Api/Generated/Users/BulkInvite/BulkInviteRequestBuilder.cs @@ -0,0 +1,102 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using Substratal.Hub.Core.Api.Generated.Models; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Substratal.Hub.Core.Api.Generated.Users.BulkInvite +{ + /// + /// Builds and executes requests for operations under \users\bulk-invite + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class BulkInviteRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public BulkInviteRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/bulk-invite", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public BulkInviteRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/bulk-invite", rawUrl) + { + } + /// + /// Requires users.manage. Each email is POST /users with status invited and an invitation email, processed independently: one failing email doesn't stop the others, and each success writes its own user.created Audit Event. Each email counts against POST /users's rate limit (20/min), so emails past it get a per-item 429. The response is 200 with one result per email, in request order; an item's status is what POST /users would have returned (201, 409 email_taken, 422 validation_failed, 429 rate_limited). application_id, if given, becomes each new User's signup_application_id and brands the invitation email. See /api-reference/conventions/#bulk-operations. + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 409 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Substratal.Hub.Core.Api.Generated.Users.BulkInvite.BulkInvitePostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Substratal.Hub.Core.Api.Generated.Users.BulkInvite.BulkInvitePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Substratal.Hub.Core.Api.Generated.Models.Error.CreateFromDiscriminatorValue }, + { "403", global::Substratal.Hub.Core.Api.Generated.Models.Error.CreateFromDiscriminatorValue }, + { "404", global::Substratal.Hub.Core.Api.Generated.Models.Error.CreateFromDiscriminatorValue }, + { "409", global::Substratal.Hub.Core.Api.Generated.Models.Error.CreateFromDiscriminatorValue }, + { "422", global::Substratal.Hub.Core.Api.Generated.Models.Error.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Substratal.Hub.Core.Api.Generated.Models.BulkInviteResults.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Requires users.manage. Each email is POST /users with status invited and an invitation email, processed independently: one failing email doesn't stop the others, and each success writes its own user.created Audit Event. Each email counts against POST /users's rate limit (20/min), so emails past it get a per-item 429. The response is 200 with one result per email, in request order; an item's status is what POST /users would have returned (201, 409 email_taken, 422 validation_failed, 429 rate_limited). application_id, if given, becomes each new User's signup_application_id and brands the invitation email. See /api-reference/conventions/#bulk-operations. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Substratal.Hub.Core.Api.Generated.Users.BulkInvite.BulkInvitePostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Substratal.Hub.Core.Api.Generated.Users.BulkInvite.BulkInvitePostRequestBody body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Substratal.Hub.Core.Api.Generated.Users.BulkInvite.BulkInviteRequestBuilder WithUrl(string rawUrl) + { + return new global::Substratal.Hub.Core.Api.Generated.Users.BulkInvite.BulkInviteRequestBuilder(rawUrl, RequestAdapter); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Substratal.Hub.Core/Api/Generated/Users/BulkSuspend/BulkSuspendPostRequestBody.cs b/src/Substratal.Hub.Core/Api/Generated/Users/BulkSuspend/BulkSuspendPostRequestBody.cs new file mode 100644 index 0000000..59b7147 --- /dev/null +++ b/src/Substratal.Hub.Core/Api/Generated/Users/BulkSuspend/BulkSuspendPostRequestBody.cs @@ -0,0 +1,99 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System; +namespace Substratal.Hub.Core.Api.Generated.Users.BulkSuspend +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class BulkSuspendPostRequestBody : IAdditionalDataHolder, IBackedModel, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData + { + get { return BackingStore.Get>("AdditionalData") ?? new Dictionary(); } + set { BackingStore.Set("AdditionalData", value); } + } + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// The reason property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Reason + { + get { return BackingStore?.Get("reason"); } + set { BackingStore?.Set("reason", value); } + } +#nullable restore +#else + public string Reason + { + get { return BackingStore?.Get("reason"); } + set { BackingStore?.Set("reason", value); } + } +#endif + /// The user_ids property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? UserIds + { + get { return BackingStore?.Get?>("user_ids"); } + set { BackingStore?.Set("user_ids", value); } + } +#nullable restore +#else + public List UserIds + { + get { return BackingStore?.Get>("user_ids"); } + set { BackingStore?.Set("user_ids", value); } + } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public BulkSuspendPostRequestBody() + { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Substratal.Hub.Core.Api.Generated.Users.BulkSuspend.BulkSuspendPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Substratal.Hub.Core.Api.Generated.Users.BulkSuspend.BulkSuspendPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "reason", n => { Reason = n.GetStringValue(); } }, + { "user_ids", n => { UserIds = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("reason", Reason); + writer.WriteCollectionOfPrimitiveValues("user_ids", UserIds); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Substratal.Hub.Core/Api/Generated/Users/BulkSuspend/BulkSuspendRequestBuilder.cs b/src/Substratal.Hub.Core/Api/Generated/Users/BulkSuspend/BulkSuspendRequestBuilder.cs new file mode 100644 index 0000000..d5a7be3 --- /dev/null +++ b/src/Substratal.Hub.Core/Api/Generated/Users/BulkSuspend/BulkSuspendRequestBuilder.cs @@ -0,0 +1,100 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using Substratal.Hub.Core.Api.Generated.Models; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Substratal.Hub.Core.Api.Generated.Users.BulkSuspend +{ + /// + /// Builds and executes requests for operations under \users\bulk-suspend + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class BulkSuspendRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public BulkSuspendRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/bulk-suspend", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public BulkSuspendRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/bulk-suspend", rawUrl) + { + } + /// + /// Requires users.manage. Each id is POST /users/{id}/suspend with the shared reason, processed independently, each with its own user.suspended Audit Event and webhooks. The protected superadmin is a per-item 409 user_protected. Like POST /users/{id}/suspend it needs a recent MFA check (403 reauthentication_required for the whole batch). Each id counts against POST /users/{id}/suspend's rate limit. The response is 200 with one result per id, in request order; an item's status is what POST /users/{id}/suspend would have returned. See /api-reference/conventions/#bulk-operations. + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 403 status code + /// When receiving a 409 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Substratal.Hub.Core.Api.Generated.Users.BulkSuspend.BulkSuspendPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Substratal.Hub.Core.Api.Generated.Users.BulkSuspend.BulkSuspendPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Substratal.Hub.Core.Api.Generated.Models.Error.CreateFromDiscriminatorValue }, + { "403", global::Substratal.Hub.Core.Api.Generated.Models.Error.CreateFromDiscriminatorValue }, + { "409", global::Substratal.Hub.Core.Api.Generated.Models.Error.CreateFromDiscriminatorValue }, + { "422", global::Substratal.Hub.Core.Api.Generated.Models.Error.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Substratal.Hub.Core.Api.Generated.Models.BulkResults.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Requires users.manage. Each id is POST /users/{id}/suspend with the shared reason, processed independently, each with its own user.suspended Audit Event and webhooks. The protected superadmin is a per-item 409 user_protected. Like POST /users/{id}/suspend it needs a recent MFA check (403 reauthentication_required for the whole batch). Each id counts against POST /users/{id}/suspend's rate limit. The response is 200 with one result per id, in request order; an item's status is what POST /users/{id}/suspend would have returned. See /api-reference/conventions/#bulk-operations. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Substratal.Hub.Core.Api.Generated.Users.BulkSuspend.BulkSuspendPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Substratal.Hub.Core.Api.Generated.Users.BulkSuspend.BulkSuspendPostRequestBody body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Substratal.Hub.Core.Api.Generated.Users.BulkSuspend.BulkSuspendRequestBuilder WithUrl(string rawUrl) + { + return new global::Substratal.Hub.Core.Api.Generated.Users.BulkSuspend.BulkSuspendRequestBuilder(rawUrl, RequestAdapter); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Substratal.Hub.Core/Api/Generated/Users/GetIncludeQueryParameterType.cs b/src/Substratal.Hub.Core/Api/Generated/Users/GetIncludeQueryParameterType.cs new file mode 100644 index 0000000..b844ac8 --- /dev/null +++ b/src/Substratal.Hub.Core/Api/Generated/Users/GetIncludeQueryParameterType.cs @@ -0,0 +1,16 @@ +// +using System.Runtime.Serialization; +using System; +namespace Substratal.Hub.Core.Api.Generated.Users +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetIncludeQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "total")] + #pragma warning disable CS1591 + Total, + #pragma warning restore CS1591 + } +} diff --git a/src/Substratal.Hub.Core/Api/Generated/Users/Item/Avatar/AvatarRequestBuilder.cs b/src/Substratal.Hub.Core/Api/Generated/Users/Item/Avatar/AvatarRequestBuilder.cs new file mode 100644 index 0000000..9dca047 --- /dev/null +++ b/src/Substratal.Hub.Core/Api/Generated/Users/Item/Avatar/AvatarRequestBuilder.cs @@ -0,0 +1,98 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using Substratal.Hub.Core.Api.Generated.Models; +using Substratal.Hub.Core.Api.Generated.Users.Item.Avatar.Uploads; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Substratal.Hub.Core.Api.Generated.Users.Item.Avatar +{ + /// + /// Builds and executes requests for operations under \users\{id}\avatar + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AvatarRequestBuilder : BaseRequestBuilder + { + /// The uploads property + public global::Substratal.Hub.Core.Api.Generated.Users.Item.Avatar.Uploads.UploadsRequestBuilder Uploads + { + get => new global::Substratal.Hub.Core.Api.Generated.Users.Item.Avatar.Uploads.UploadsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AvatarRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{id}/avatar", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AvatarRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{id}/avatar", rawUrl) + { + } + /// + /// Sets avatar_url to null and deletes the hosted image, if it is one; an external https URL is just cleared. PATCH /users/{id}/profile with avatar_url null does the same. Writes profile.avatar_changed when someone other than the User does it. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Substratal.Hub.Core.Api.Generated.Models.Error.CreateFromDiscriminatorValue }, + { "403", global::Substratal.Hub.Core.Api.Generated.Models.Error.CreateFromDiscriminatorValue }, + { "404", global::Substratal.Hub.Core.Api.Generated.Models.Error.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Sets avatar_url to null and deletes the hosted image, if it is one; an external https URL is just cleared. PATCH /users/{id}/profile with avatar_url null does the same. Writes profile.avatar_changed when someone other than the User does it. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Substratal.Hub.Core.Api.Generated.Users.Item.Avatar.AvatarRequestBuilder WithUrl(string rawUrl) + { + return new global::Substratal.Hub.Core.Api.Generated.Users.Item.Avatar.AvatarRequestBuilder(rawUrl, RequestAdapter); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Substratal.Hub.Core/Api/Generated/Users/Item/Avatar/Uploads/Item/Complete/CompleteRequestBuilder.cs b/src/Substratal.Hub.Core/Api/Generated/Users/Item/Avatar/Uploads/Item/Complete/CompleteRequestBuilder.cs new file mode 100644 index 0000000..3da5638 --- /dev/null +++ b/src/Substratal.Hub.Core/Api/Generated/Users/Item/Avatar/Uploads/Item/Complete/CompleteRequestBuilder.cs @@ -0,0 +1,97 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using Substratal.Hub.Core.Api.Generated.Models; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Substratal.Hub.Core.Api.Generated.Users.Item.Avatar.Uploads.Item.Complete +{ + /// + /// Builds and executes requests for operations under \users\{id}\avatar\uploads\{uploadId}\complete + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CompleteRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CompleteRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{id}/avatar/uploads/{uploadId}/complete", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CompleteRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{id}/avatar/uploads/{uploadId}/complete", rawUrl) + { + } + /// + /// Checks the uploaded file's magic bytes against the declared content_type, its size, and its dimensions (at most 2048 × 2048), stores it at a content-addressed https://assets.substratalapps.com/avatars/… URL, sets avatar_url, and deletes the previous hosted avatar. A file that fails a check is deleted, and the call is 422 invalid_image with details.reason. An upload that was never sent, or was already completed, is 404 upload_not_found. Writes profile.avatar_changed when someone other than the User does it. + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 422 status code + /// When receiving a 503 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToPostRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Substratal.Hub.Core.Api.Generated.Models.Error.CreateFromDiscriminatorValue }, + { "403", global::Substratal.Hub.Core.Api.Generated.Models.Error.CreateFromDiscriminatorValue }, + { "404", global::Substratal.Hub.Core.Api.Generated.Models.Error.CreateFromDiscriminatorValue }, + { "422", global::Substratal.Hub.Core.Api.Generated.Models.Error.CreateFromDiscriminatorValue }, + { "503", global::Substratal.Hub.Core.Api.Generated.Models.Error.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Substratal.Hub.Core.Api.Generated.Models.Profile.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Checks the uploaded file's magic bytes against the declared content_type, its size, and its dimensions (at most 2048 × 2048), stores it at a content-addressed https://assets.substratalapps.com/avatars/… URL, sets avatar_url, and deletes the previous hosted avatar. A file that fails a check is deleted, and the call is 422 invalid_image with details.reason. An upload that was never sent, or was already completed, is 404 upload_not_found. Writes profile.avatar_changed when someone other than the User does it. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Substratal.Hub.Core.Api.Generated.Users.Item.Avatar.Uploads.Item.Complete.CompleteRequestBuilder WithUrl(string rawUrl) + { + return new global::Substratal.Hub.Core.Api.Generated.Users.Item.Avatar.Uploads.Item.Complete.CompleteRequestBuilder(rawUrl, RequestAdapter); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Substratal.Hub.Core/Api/Generated/Users/Item/Avatar/Uploads/Item/WithUploadItemRequestBuilder.cs b/src/Substratal.Hub.Core/Api/Generated/Users/Item/Avatar/Uploads/Item/WithUploadItemRequestBuilder.cs new file mode 100644 index 0000000..58d7304 --- /dev/null +++ b/src/Substratal.Hub.Core/Api/Generated/Users/Item/Avatar/Uploads/Item/WithUploadItemRequestBuilder.cs @@ -0,0 +1,41 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using Substratal.Hub.Core.Api.Generated.Users.Item.Avatar.Uploads.Item.Complete; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Substratal.Hub.Core.Api.Generated.Users.Item.Avatar.Uploads.Item +{ + /// + /// Builds and executes requests for operations under \users\{id}\avatar\uploads\{uploadId} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithUploadItemRequestBuilder : BaseRequestBuilder + { + /// The complete property + public global::Substratal.Hub.Core.Api.Generated.Users.Item.Avatar.Uploads.Item.Complete.CompleteRequestBuilder Complete + { + get => new global::Substratal.Hub.Core.Api.Generated.Users.Item.Avatar.Uploads.Item.Complete.CompleteRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithUploadItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{id}/avatar/uploads/{uploadId}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithUploadItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{id}/avatar/uploads/{uploadId}", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Substratal.Hub.Core/Api/Generated/Users/Item/Avatar/Uploads/UploadsRequestBuilder.cs b/src/Substratal.Hub.Core/Api/Generated/Users/Item/Avatar/Uploads/UploadsRequestBuilder.cs new file mode 100644 index 0000000..62744e9 --- /dev/null +++ b/src/Substratal.Hub.Core/Api/Generated/Users/Item/Avatar/Uploads/UploadsRequestBuilder.cs @@ -0,0 +1,117 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using Substratal.Hub.Core.Api.Generated.Models; +using Substratal.Hub.Core.Api.Generated.Users.Item.Avatar.Uploads.Item; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Substratal.Hub.Core.Api.Generated.Users.Item.Avatar.Uploads +{ + /// + /// Builds and executes requests for operations under \users\{id}\avatar\uploads + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class UploadsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Substratal.Hub.Core.Api.Generated.users.item.avatar.uploads.item collection + /// Unique identifier of the item + /// A + public global::Substratal.Hub.Core.Api.Generated.Users.Item.Avatar.Uploads.Item.WithUploadItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("uploadId", position); + return new global::Substratal.Hub.Core.Api.Generated.Users.Item.Avatar.Uploads.Item.WithUploadItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public UploadsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{id}/avatar/uploads", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public UploadsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{id}/avatar/uploads", rawUrl) + { + } + /// + /// Returns a presigned POST: send the image straight to url as multipart/form-data, with every entry of fields and then the file as the last field, named file, within 5 minutes. The API never sees the bytes. Then call POST /users/{id}/avatar/uploads/{uploadId}/complete. PNG, JPEG, or WebP, at most 2 MB (a larger content_length is 422 validation_failed). 10 upload starts per caller per hour, shared with Application icons. + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 422 status code + /// When receiving a 429 status code + /// When receiving a 503 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Substratal.Hub.Core.Api.Generated.Models.ImageUploadRequest body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Substratal.Hub.Core.Api.Generated.Models.ImageUploadRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Substratal.Hub.Core.Api.Generated.Models.Error.CreateFromDiscriminatorValue }, + { "403", global::Substratal.Hub.Core.Api.Generated.Models.Error.CreateFromDiscriminatorValue }, + { "404", global::Substratal.Hub.Core.Api.Generated.Models.Error.CreateFromDiscriminatorValue }, + { "422", global::Substratal.Hub.Core.Api.Generated.Models.Error.CreateFromDiscriminatorValue }, + { "429", global::Substratal.Hub.Core.Api.Generated.Models.Error.CreateFromDiscriminatorValue }, + { "503", global::Substratal.Hub.Core.Api.Generated.Models.Error.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Substratal.Hub.Core.Api.Generated.Models.ImageUpload.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Returns a presigned POST: send the image straight to url as multipart/form-data, with every entry of fields and then the file as the last field, named file, within 5 minutes. The API never sees the bytes. Then call POST /users/{id}/avatar/uploads/{uploadId}/complete. PNG, JPEG, or WebP, at most 2 MB (a larger content_length is 422 validation_failed). 10 upload starts per caller per hour, shared with Application icons. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Substratal.Hub.Core.Api.Generated.Models.ImageUploadRequest body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Substratal.Hub.Core.Api.Generated.Models.ImageUploadRequest body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Substratal.Hub.Core.Api.Generated.Users.Item.Avatar.Uploads.UploadsRequestBuilder WithUrl(string rawUrl) + { + return new global::Substratal.Hub.Core.Api.Generated.Users.Item.Avatar.Uploads.UploadsRequestBuilder(rawUrl, RequestAdapter); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Substratal.Hub.Core/Api/Generated/Users/Item/Entitlements/EntitlementsRequestBuilder.cs b/src/Substratal.Hub.Core/Api/Generated/Users/Item/Entitlements/EntitlementsRequestBuilder.cs index 87ecfbc..67595fe 100644 --- a/src/Substratal.Hub.Core/Api/Generated/Users/Item/Entitlements/EntitlementsRequestBuilder.cs +++ b/src/Substratal.Hub.Core/Api/Generated/Users/Item/Entitlements/EntitlementsRequestBuilder.cs @@ -22,7 +22,7 @@ public partial class EntitlementsRequestBuilder : BaseRequestBuilder /// /// Path parameters for the request /// The request adapter to use to execute the requests. - public EntitlementsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{id}/entitlements{?application_id*,cursor*,include_inactive*,limit*,source*,status*}", pathParameters) + public EntitlementsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{id}/entitlements{?application_id*,cursor*,include*,include_inactive*,limit*,source*,status*}", pathParameters) { } /// @@ -30,7 +30,7 @@ public EntitlementsRequestBuilder(Dictionary pathParameters, IRe /// /// The raw URL to use for the request builder. /// The request adapter to use to execute the requests. - public EntitlementsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{id}/entitlements{?application_id*,cursor*,include_inactive*,limit*,source*,status*}", rawUrl) + public EntitlementsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{id}/entitlements{?application_id*,cursor*,include*,include_inactive*,limit*,source*,status*}", rawUrl) { } /// @@ -169,6 +169,9 @@ public partial class EntitlementsRequestBuilderGetQueryParameters public string Cursor { get; set; } #pragma warning restore CS1591 #endif + /// `total` adds `page.total` and `page.total_capped`: the number of rows matching the current filters across every page, counted up to 10,000 (Conventions → Pagination). Omitted unless requested. + [QueryParameter("include")] + public global::Substratal.Hub.Core.Api.Generated.Users.Item.Entitlements.GetIncludeQueryParameterType? Include { get; set; } #pragma warning disable CS1591 [QueryParameter("include_inactive")] public bool? IncludeInactive { get; set; } diff --git a/src/Substratal.Hub.Core/Api/Generated/Users/Item/Entitlements/GetIncludeQueryParameterType.cs b/src/Substratal.Hub.Core/Api/Generated/Users/Item/Entitlements/GetIncludeQueryParameterType.cs new file mode 100644 index 0000000..d237615 --- /dev/null +++ b/src/Substratal.Hub.Core/Api/Generated/Users/Item/Entitlements/GetIncludeQueryParameterType.cs @@ -0,0 +1,16 @@ +// +using System.Runtime.Serialization; +using System; +namespace Substratal.Hub.Core.Api.Generated.Users.Item.Entitlements +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetIncludeQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "total")] + #pragma warning disable CS1591 + Total, + #pragma warning restore CS1591 + } +} diff --git a/src/Substratal.Hub.Core/Api/Generated/Users/Item/ErasureRequests/Current/CurrentRequestBuilder.cs b/src/Substratal.Hub.Core/Api/Generated/Users/Item/ErasureRequests/Current/CurrentRequestBuilder.cs index 8836776..ea0bc6e 100644 --- a/src/Substratal.Hub.Core/Api/Generated/Users/Item/ErasureRequests/Current/CurrentRequestBuilder.cs +++ b/src/Substratal.Hub.Core/Api/Generated/Users/Item/ErasureRequests/Current/CurrentRequestBuilder.cs @@ -58,6 +58,33 @@ public async Task DeleteAsync(Action + /// Self, or users.manage. Returns the erasure request while it's scheduled; 404 erasure_not_scheduled when none is pending (never requested, cancelled, or completed). A soft-deleted User 404s (user_not_found) for anyone without users.manage, as on cancel. + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Substratal.Hub.Core.Api.Generated.Models.Error.CreateFromDiscriminatorValue }, + { "403", global::Substratal.Hub.Core.Api.Generated.Models.Error.CreateFromDiscriminatorValue }, + { "404", global::Substratal.Hub.Core.Api.Generated.Models.Error.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Substratal.Hub.Core.Api.Generated.Models.ErasureRequest.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// /// Cancel a scheduled erasure inside its 7-day window (users.manage) /// /// A @@ -77,6 +104,25 @@ public RequestInformation ToDeleteRequestInformation(Action + /// Self, or users.manage. Returns the erasure request while it's scheduled; 404 erasure_not_scheduled when none is pending (never requested, cancelled, or completed). A soft-deleted User 404s (user_not_found) for anyone without users.manage, as on cancel. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// /// A diff --git a/src/Substratal.Hub.Core/Api/Generated/Users/Item/Roles/Item/WithRoleItemRequestBuilder.cs b/src/Substratal.Hub.Core/Api/Generated/Users/Item/Roles/Item/WithRoleItemRequestBuilder.cs index f23d1b5..a77cebb 100644 --- a/src/Substratal.Hub.Core/Api/Generated/Users/Item/Roles/Item/WithRoleItemRequestBuilder.cs +++ b/src/Substratal.Hub.Core/Api/Generated/Users/Item/Roles/Item/WithRoleItemRequestBuilder.cs @@ -60,7 +60,7 @@ public async Task DeleteAsync(Action - /// Assign a Role (idempotent — 200 if already held) + /// Assigning a platform Role that grants a permission to a User without MFA succeeds, but the Role takes effect only once they enroll TOTP; the response's mfa_enrollment_required says so (Auth → Staff MFA). /// /// A /// Cancellation token to use when cancelling requests @@ -106,7 +106,7 @@ public RequestInformation ToDeleteRequestInformation(Action - /// Assign a Role (idempotent — 200 if already held) + /// Assigning a platform Role that grants a permission to a User without MFA succeeds, but the Role takes effect only once they enroll TOTP; the response's mfa_enrollment_required says so (Auth → Staff MFA). /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Substratal.Hub.Core/Api/Generated/Users/Item/UsersItemRequestBuilder.cs b/src/Substratal.Hub.Core/Api/Generated/Users/Item/UsersItemRequestBuilder.cs index 6fe60fb..043a7b4 100644 --- a/src/Substratal.Hub.Core/Api/Generated/Users/Item/UsersItemRequestBuilder.cs +++ b/src/Substratal.Hub.Core/Api/Generated/Users/Item/UsersItemRequestBuilder.cs @@ -5,6 +5,7 @@ using Microsoft.Kiota.Abstractions; using Substratal.Hub.Core.Api.Generated.Models; using Substratal.Hub.Core.Api.Generated.Users.Item.Apps; +using Substratal.Hub.Core.Api.Generated.Users.Item.Avatar; using Substratal.Hub.Core.Api.Generated.Users.Item.Devices; using Substratal.Hub.Core.Api.Generated.Users.Item.Entitlements; using Substratal.Hub.Core.Api.Generated.Users.Item.ErasureRequests; @@ -37,6 +38,11 @@ public partial class UsersItemRequestBuilder : BaseRequestBuilder { get => new global::Substratal.Hub.Core.Api.Generated.Users.Item.Apps.AppsRequestBuilder(PathParameters, RequestAdapter); } + /// The avatar property + public global::Substratal.Hub.Core.Api.Generated.Users.Item.Avatar.AvatarRequestBuilder Avatar + { + get => new global::Substratal.Hub.Core.Api.Generated.Users.Item.Avatar.AvatarRequestBuilder(PathParameters, RequestAdapter); + } /// The devices property public global::Substratal.Hub.Core.Api.Generated.Users.Item.Devices.DevicesRequestBuilder Devices { diff --git a/src/Substratal.Hub.Core/Api/Generated/Users/Me/Billing/CheckoutSessions/CheckoutSessionsRequestBuilder.cs b/src/Substratal.Hub.Core/Api/Generated/Users/Me/Billing/CheckoutSessions/CheckoutSessionsRequestBuilder.cs index 3c58c24..0a53a37 100644 --- a/src/Substratal.Hub.Core/Api/Generated/Users/Me/Billing/CheckoutSessions/CheckoutSessionsRequestBuilder.cs +++ b/src/Substratal.Hub.Core/Api/Generated/Users/Me/Billing/CheckoutSessions/CheckoutSessionsRequestBuilder.cs @@ -4,6 +4,7 @@ using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Substratal.Hub.Core.Api.Generated.Models; +using Substratal.Hub.Core.Api.Generated.Users.Me.Billing.CheckoutSessions.Item; using System.Collections.Generic; using System.IO; using System.Threading.Tasks; @@ -17,6 +18,18 @@ namespace Substratal.Hub.Core.Api.Generated.Users.Me.Billing.CheckoutSessions [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] public partial class CheckoutSessionsRequestBuilder : BaseRequestBuilder { + /// Gets an item from the Substratal.Hub.Core.Api.Generated.users.me.billing.checkoutSessions.item collection + /// The cs_… id Stripe puts in success_url's session_id. + /// A + public global::Substratal.Hub.Core.Api.Generated.Users.Me.Billing.CheckoutSessions.Item.WithSession_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("session_id", position); + return new global::Substratal.Hub.Core.Api.Generated.Users.Me.Billing.CheckoutSessions.Item.WithSession_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } /// /// Instantiates a new and sets the default values. /// diff --git a/src/Substratal.Hub.Core/Api/Generated/Users/Me/Billing/CheckoutSessions/Item/Confirm/ConfirmRequestBuilder.cs b/src/Substratal.Hub.Core/Api/Generated/Users/Me/Billing/CheckoutSessions/Item/Confirm/ConfirmRequestBuilder.cs new file mode 100644 index 0000000..2c7bb37 --- /dev/null +++ b/src/Substratal.Hub.Core/Api/Generated/Users/Me/Billing/CheckoutSessions/Item/Confirm/ConfirmRequestBuilder.cs @@ -0,0 +1,93 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using Substratal.Hub.Core.Api.Generated.Models; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Substratal.Hub.Core.Api.Generated.Users.Me.Billing.CheckoutSessions.Item.Confirm +{ + /// + /// Builds and executes requests for operations under \users\me\billing\checkout-sessions\{session_id}\confirm + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ConfirmRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ConfirmRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/me/billing/checkout-sessions/{session_id}/confirm", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ConfirmRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/me/billing/checkout-sessions/{session_id}/confirm", rawUrl) + { + } + /// + /// Call it when the person lands on success_url. It reads the Checkout Session from Stripe and, if it's complete, applies the subscription at once (the same sync the Stripe webhook runs), then returns what GET /users/me/subscription would. An open or expired session changes nothing. Idempotent. 404 checkout_session_not_found if the session isn't this User's. + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 404 status code + /// When receiving a 503 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToPostRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Substratal.Hub.Core.Api.Generated.Models.Error.CreateFromDiscriminatorValue }, + { "404", global::Substratal.Hub.Core.Api.Generated.Models.Error.CreateFromDiscriminatorValue }, + { "503", global::Substratal.Hub.Core.Api.Generated.Models.Error.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Substratal.Hub.Core.Api.Generated.Models.UserSubscription.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Call it when the person lands on success_url. It reads the Checkout Session from Stripe and, if it's complete, applies the subscription at once (the same sync the Stripe webhook runs), then returns what GET /users/me/subscription would. An open or expired session changes nothing. Idempotent. 404 checkout_session_not_found if the session isn't this User's. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Substratal.Hub.Core.Api.Generated.Users.Me.Billing.CheckoutSessions.Item.Confirm.ConfirmRequestBuilder WithUrl(string rawUrl) + { + return new global::Substratal.Hub.Core.Api.Generated.Users.Me.Billing.CheckoutSessions.Item.Confirm.ConfirmRequestBuilder(rawUrl, RequestAdapter); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Substratal.Hub.Core/Api/Generated/Users/Me/Billing/CheckoutSessions/Item/WithSession_ItemRequestBuilder.cs b/src/Substratal.Hub.Core/Api/Generated/Users/Me/Billing/CheckoutSessions/Item/WithSession_ItemRequestBuilder.cs new file mode 100644 index 0000000..6c73043 --- /dev/null +++ b/src/Substratal.Hub.Core/Api/Generated/Users/Me/Billing/CheckoutSessions/Item/WithSession_ItemRequestBuilder.cs @@ -0,0 +1,41 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using Substratal.Hub.Core.Api.Generated.Users.Me.Billing.CheckoutSessions.Item.Confirm; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Substratal.Hub.Core.Api.Generated.Users.Me.Billing.CheckoutSessions.Item +{ + /// + /// Builds and executes requests for operations under \users\me\billing\checkout-sessions\{session_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithSession_ItemRequestBuilder : BaseRequestBuilder + { + /// The confirm property + public global::Substratal.Hub.Core.Api.Generated.Users.Me.Billing.CheckoutSessions.Item.Confirm.ConfirmRequestBuilder Confirm + { + get => new global::Substratal.Hub.Core.Api.Generated.Users.Me.Billing.CheckoutSessions.Item.Confirm.ConfirmRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithSession_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/me/billing/checkout-sessions/{session_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithSession_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/me/billing/checkout-sessions/{session_id}", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Substratal.Hub.Core/Api/Generated/Users/UsersRequestBuilder.cs b/src/Substratal.Hub.Core/Api/Generated/Users/UsersRequestBuilder.cs index c358dd5..00ee74b 100644 --- a/src/Substratal.Hub.Core/Api/Generated/Users/UsersRequestBuilder.cs +++ b/src/Substratal.Hub.Core/Api/Generated/Users/UsersRequestBuilder.cs @@ -4,6 +4,8 @@ using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Substratal.Hub.Core.Api.Generated.Models; +using Substratal.Hub.Core.Api.Generated.Users.BulkInvite; +using Substratal.Hub.Core.Api.Generated.Users.BulkSuspend; using Substratal.Hub.Core.Api.Generated.Users.Item; using Substratal.Hub.Core.Api.Generated.Users.Me; using System.Collections.Generic; @@ -19,6 +21,16 @@ namespace Substratal.Hub.Core.Api.Generated.Users [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] public partial class UsersRequestBuilder : BaseRequestBuilder { + /// The bulkInvite property + public global::Substratal.Hub.Core.Api.Generated.Users.BulkInvite.BulkInviteRequestBuilder BulkInvite + { + get => new global::Substratal.Hub.Core.Api.Generated.Users.BulkInvite.BulkInviteRequestBuilder(PathParameters, RequestAdapter); + } + /// The bulkSuspend property + public global::Substratal.Hub.Core.Api.Generated.Users.BulkSuspend.BulkSuspendRequestBuilder BulkSuspend + { + get => new global::Substratal.Hub.Core.Api.Generated.Users.BulkSuspend.BulkSuspendRequestBuilder(PathParameters, RequestAdapter); + } /// The me property public global::Substratal.Hub.Core.Api.Generated.Users.Me.MeRequestBuilder Me { @@ -41,7 +53,7 @@ public partial class UsersRequestBuilder : BaseRequestBuilder /// /// Path parameters for the request /// The request adapter to use to execute the requests. - public UsersRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users{?application_id*,created_after*,created_before*,cursor*,email*,limit*,organization_id*,q*,role_id*,status*}", pathParameters) + public UsersRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users{?application_id*,created_after*,created_before*,cursor*,email*,include*,limit*,organization_id*,q*,role_id*,status*}", pathParameters) { } /// @@ -49,7 +61,7 @@ public UsersRequestBuilder(Dictionary pathParameters, IRequestAd /// /// The raw URL to use for the request builder. /// The request adapter to use to execute the requests. - public UsersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users{?application_id*,created_after*,created_before*,cursor*,email*,limit*,organization_id*,q*,role_id*,status*}", rawUrl) + public UsersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users{?application_id*,created_after*,created_before*,cursor*,email*,include*,limit*,organization_id*,q*,role_id*,status*}", rawUrl) { } /// @@ -211,6 +223,9 @@ public partial class UsersRequestBuilderGetQueryParameters public string Email { get; set; } #pragma warning restore CS1591 #endif + /// `total` adds `page.total` and `page.total_capped`: the number of rows matching the current filters across every page, counted up to 10,000 (Conventions → Pagination). Omitted unless requested. + [QueryParameter("include")] + public global::Substratal.Hub.Core.Api.Generated.Users.GetIncludeQueryParameterType? Include { get; set; } #pragma warning disable CS1591 [QueryParameter("limit")] public int? Limit { get; set; } diff --git a/src/Substratal.Hub.Core/Api/Generated/WebhookDeliveries/GetIncludeQueryParameterType.cs b/src/Substratal.Hub.Core/Api/Generated/WebhookDeliveries/GetIncludeQueryParameterType.cs new file mode 100644 index 0000000..fe87370 --- /dev/null +++ b/src/Substratal.Hub.Core/Api/Generated/WebhookDeliveries/GetIncludeQueryParameterType.cs @@ -0,0 +1,16 @@ +// +using System.Runtime.Serialization; +using System; +namespace Substratal.Hub.Core.Api.Generated.WebhookDeliveries +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetIncludeQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "total")] + #pragma warning disable CS1591 + Total, + #pragma warning restore CS1591 + } +} diff --git a/src/Substratal.Hub.Core/Api/Generated/WebhookDeliveries/GetStatusQueryParameterType.cs b/src/Substratal.Hub.Core/Api/Generated/WebhookDeliveries/GetStatusQueryParameterType.cs new file mode 100644 index 0000000..ae2e707 --- /dev/null +++ b/src/Substratal.Hub.Core/Api/Generated/WebhookDeliveries/GetStatusQueryParameterType.cs @@ -0,0 +1,24 @@ +// +using System.Runtime.Serialization; +using System; +namespace Substratal.Hub.Core.Api.Generated.WebhookDeliveries +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetStatusQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "pending")] + #pragma warning disable CS1591 + Pending, + #pragma warning restore CS1591 + [EnumMember(Value = "succeeded")] + #pragma warning disable CS1591 + Succeeded, + #pragma warning restore CS1591 + [EnumMember(Value = "failed")] + #pragma warning disable CS1591 + Failed, + #pragma warning restore CS1591 + } +} diff --git a/src/Substratal.Hub.Core/Api/Generated/WebhookDeliveries/WebhookDeliveriesRequestBuilder.cs b/src/Substratal.Hub.Core/Api/Generated/WebhookDeliveries/WebhookDeliveriesRequestBuilder.cs new file mode 100644 index 0000000..4188be1 --- /dev/null +++ b/src/Substratal.Hub.Core/Api/Generated/WebhookDeliveries/WebhookDeliveriesRequestBuilder.cs @@ -0,0 +1,158 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using Substratal.Hub.Core.Api.Generated.Models; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Substratal.Hub.Core.Api.Generated.WebhookDeliveries +{ + /// + /// Builds and executes requests for operations under \webhook-deliveries + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WebhookDeliveriesRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WebhookDeliveriesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/webhook-deliveries{?application_id*,cursor*,event_type*,include*,limit*,since*,status*,subscription_id*,until*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WebhookDeliveriesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/webhook-deliveries{?application_id*,cursor*,event_type*,include*,limit*,since*,status*,subscription_id*,until*}", rawUrl) + { + } + /// + /// Scoped like GET /webhooks: webhooks.manage sees every subscription's deliveries, an Application's owner and its app keys see only that Application's. A caller with no visible subscriptions gets an empty page. Newest first. + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Substratal.Hub.Core.Api.Generated.Models.Error.CreateFromDiscriminatorValue }, + { "422", global::Substratal.Hub.Core.Api.Generated.Models.Error.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Substratal.Hub.Core.Api.Generated.Models.WebhookDeliveryPage.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Scoped like GET /webhooks: webhooks.manage sees every subscription's deliveries, an Application's owner and its app keys see only that Application's. A caller with no visible subscriptions gets an empty page. Newest first. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Substratal.Hub.Core.Api.Generated.WebhookDeliveries.WebhookDeliveriesRequestBuilder WithUrl(string rawUrl) + { + return new global::Substratal.Hub.Core.Api.Generated.WebhookDeliveries.WebhookDeliveriesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Scoped like GET /webhooks: webhooks.manage sees every subscription's deliveries, an Application's owner and its app keys see only that Application's. A caller with no visible subscriptions gets an empty page. Newest first. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WebhookDeliveriesRequestBuilderGetQueryParameters + { +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + #pragma warning disable CS1591 + [QueryParameter("application_id")] + public string? ApplicationId { get; set; } + #pragma warning restore CS1591 +#nullable restore +#else + #pragma warning disable CS1591 + [QueryParameter("application_id")] + public string ApplicationId { get; set; } + #pragma warning restore CS1591 +#endif +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + #pragma warning disable CS1591 + [QueryParameter("cursor")] + public string? Cursor { get; set; } + #pragma warning restore CS1591 +#nullable restore +#else + #pragma warning disable CS1591 + [QueryParameter("cursor")] + public string Cursor { get; set; } + #pragma warning restore CS1591 +#endif + #pragma warning disable CS1591 + [QueryParameter("event_type")] + public global::Substratal.Hub.Core.Api.Generated.Models.WebhookEvent? EventType { get; set; } + #pragma warning restore CS1591 + /// `total` adds `page.total` and `page.total_capped`: the number of rows matching the current filters across every page, counted up to 10,000 (Conventions → Pagination). Omitted unless requested. + [QueryParameter("include")] + public global::Substratal.Hub.Core.Api.Generated.WebhookDeliveries.GetIncludeQueryParameterType? Include { get; set; } + #pragma warning disable CS1591 + [QueryParameter("limit")] + public int? Limit { get; set; } + #pragma warning restore CS1591 + /// Deliveries created at or after this time. + [QueryParameter("since")] + public DateTimeOffset? Since { get; set; } + #pragma warning disable CS1591 + [QueryParameter("status")] + public global::Substratal.Hub.Core.Api.Generated.WebhookDeliveries.GetStatusQueryParameterType? Status { get; set; } + #pragma warning restore CS1591 +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + #pragma warning disable CS1591 + [QueryParameter("subscription_id")] + public string? SubscriptionId { get; set; } + #pragma warning restore CS1591 +#nullable restore +#else + #pragma warning disable CS1591 + [QueryParameter("subscription_id")] + public string SubscriptionId { get; set; } + #pragma warning restore CS1591 +#endif + /// Deliveries created before this time. + [QueryParameter("until")] + public DateTimeOffset? Until { get; set; } + } + } +} +#pragma warning restore CS0618 diff --git a/src/Substratal.Hub.Core/Api/Generated/Webhooks/GetIncludeQueryParameterType.cs b/src/Substratal.Hub.Core/Api/Generated/Webhooks/GetIncludeQueryParameterType.cs new file mode 100644 index 0000000..9e1be54 --- /dev/null +++ b/src/Substratal.Hub.Core/Api/Generated/Webhooks/GetIncludeQueryParameterType.cs @@ -0,0 +1,16 @@ +// +using System.Runtime.Serialization; +using System; +namespace Substratal.Hub.Core.Api.Generated.Webhooks +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetIncludeQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "total")] + #pragma warning disable CS1591 + Total, + #pragma warning restore CS1591 + } +} diff --git a/src/Substratal.Hub.Core/Api/Generated/Webhooks/GetScopeQueryParameterType.cs b/src/Substratal.Hub.Core/Api/Generated/Webhooks/GetScopeQueryParameterType.cs new file mode 100644 index 0000000..dcea30d --- /dev/null +++ b/src/Substratal.Hub.Core/Api/Generated/Webhooks/GetScopeQueryParameterType.cs @@ -0,0 +1,16 @@ +// +using System.Runtime.Serialization; +using System; +namespace Substratal.Hub.Core.Api.Generated.Webhooks +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetScopeQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "platform")] + #pragma warning disable CS1591 + Platform, + #pragma warning restore CS1591 + } +} diff --git a/src/Substratal.Hub.Core/Api/Generated/Webhooks/GetStatusQueryParameterType.cs b/src/Substratal.Hub.Core/Api/Generated/Webhooks/GetStatusQueryParameterType.cs new file mode 100644 index 0000000..f29f190 --- /dev/null +++ b/src/Substratal.Hub.Core/Api/Generated/Webhooks/GetStatusQueryParameterType.cs @@ -0,0 +1,24 @@ +// +using System.Runtime.Serialization; +using System; +namespace Substratal.Hub.Core.Api.Generated.Webhooks +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetStatusQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "healthy")] + #pragma warning disable CS1591 + Healthy, + #pragma warning restore CS1591 + [EnumMember(Value = "unhealthy")] + #pragma warning disable CS1591 + Unhealthy, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + } +} diff --git a/src/Substratal.Hub.Core/Api/Generated/Webhooks/Item/Deliveries/DeliveriesRequestBuilder.cs b/src/Substratal.Hub.Core/Api/Generated/Webhooks/Item/Deliveries/DeliveriesRequestBuilder.cs index ee9e106..4b6d832 100644 --- a/src/Substratal.Hub.Core/Api/Generated/Webhooks/Item/Deliveries/DeliveriesRequestBuilder.cs +++ b/src/Substratal.Hub.Core/Api/Generated/Webhooks/Item/Deliveries/DeliveriesRequestBuilder.cs @@ -35,7 +35,7 @@ public partial class DeliveriesRequestBuilder : BaseRequestBuilder /// /// Path parameters for the request /// The request adapter to use to execute the requests. - public DeliveriesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/webhooks/{id}/deliveries{?cursor*,event_id*,limit*,since*,status*}", pathParameters) + public DeliveriesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/webhooks/{id}/deliveries{?cursor*,event_id*,include*,limit*,since*,status*}", pathParameters) { } /// @@ -43,7 +43,7 @@ public DeliveriesRequestBuilder(Dictionary pathParameters, IRequ /// /// The raw URL to use for the request builder. /// The request adapter to use to execute the requests. - public DeliveriesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/webhooks/{id}/deliveries{?cursor*,event_id*,limit*,since*,status*}", rawUrl) + public DeliveriesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/webhooks/{id}/deliveries{?cursor*,event_id*,include*,limit*,since*,status*}", rawUrl) { } /// @@ -129,6 +129,9 @@ public partial class DeliveriesRequestBuilderGetQueryParameters public string EventId { get; set; } #pragma warning restore CS1591 #endif + /// `total` adds `page.total` and `page.total_capped`: the number of rows matching the current filters across every page, counted up to 10,000 (Conventions → Pagination). Omitted unless requested. + [QueryParameter("include")] + public global::Substratal.Hub.Core.Api.Generated.Webhooks.Item.Deliveries.GetIncludeQueryParameterType? Include { get; set; } #pragma warning disable CS1591 [QueryParameter("limit")] public int? Limit { get; set; } diff --git a/src/Substratal.Hub.Core/Api/Generated/Webhooks/Item/Deliveries/GetIncludeQueryParameterType.cs b/src/Substratal.Hub.Core/Api/Generated/Webhooks/Item/Deliveries/GetIncludeQueryParameterType.cs new file mode 100644 index 0000000..e7fb84f --- /dev/null +++ b/src/Substratal.Hub.Core/Api/Generated/Webhooks/Item/Deliveries/GetIncludeQueryParameterType.cs @@ -0,0 +1,16 @@ +// +using System.Runtime.Serialization; +using System; +namespace Substratal.Hub.Core.Api.Generated.Webhooks.Item.Deliveries +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetIncludeQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "total")] + #pragma warning disable CS1591 + Total, + #pragma warning restore CS1591 + } +} diff --git a/src/Substratal.Hub.Core/Api/Generated/Webhooks/Item/Deliveries/Item/WithDeliveryItemRequestBuilder.cs b/src/Substratal.Hub.Core/Api/Generated/Webhooks/Item/Deliveries/Item/WithDeliveryItemRequestBuilder.cs index 744dd0d..e5c97a7 100644 --- a/src/Substratal.Hub.Core/Api/Generated/Webhooks/Item/Deliveries/Item/WithDeliveryItemRequestBuilder.cs +++ b/src/Substratal.Hub.Core/Api/Generated/Webhooks/Item/Deliveries/Item/WithDeliveryItemRequestBuilder.cs @@ -1,11 +1,14 @@ // #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; +using Substratal.Hub.Core.Api.Generated.Models; using Substratal.Hub.Core.Api.Generated.Webhooks.Item.Deliveries.Item.Redeliver; using System.Collections.Generic; using System.IO; using System.Threading.Tasks; +using System.Threading; using System; namespace Substratal.Hub.Core.Api.Generated.Webhooks.Item.Deliveries.Item { @@ -36,6 +39,59 @@ public WithDeliveryItemRequestBuilder(Dictionary pathParameters, public WithDeliveryItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/webhooks/{id}/deliveries/{deliveryId}", rawUrl) { } + /// + /// Visible to whoever can read GET /webhooks/{id}/deliveries. 404 delivery_not_found when the delivery isn't on that subscription or is older than the 30-day log. + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Substratal.Hub.Core.Api.Generated.Models.Error.CreateFromDiscriminatorValue }, + { "404", global::Substratal.Hub.Core.Api.Generated.Models.Error.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Substratal.Hub.Core.Api.Generated.Models.WebhookDelivery.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Visible to whoever can read GET /webhooks/{id}/deliveries. 404 delivery_not_found when the delivery isn't on that subscription or is older than the 30-day log. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Substratal.Hub.Core.Api.Generated.Webhooks.Item.Deliveries.Item.WithDeliveryItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Substratal.Hub.Core.Api.Generated.Webhooks.Item.Deliveries.Item.WithDeliveryItemRequestBuilder(rawUrl, RequestAdapter); + } } } #pragma warning restore CS0618 diff --git a/src/Substratal.Hub.Core/Api/Generated/Webhooks/WebhooksRequestBuilder.cs b/src/Substratal.Hub.Core/Api/Generated/Webhooks/WebhooksRequestBuilder.cs index 50c7fd1..d2ecabe 100644 --- a/src/Substratal.Hub.Core/Api/Generated/Webhooks/WebhooksRequestBuilder.cs +++ b/src/Substratal.Hub.Core/Api/Generated/Webhooks/WebhooksRequestBuilder.cs @@ -35,7 +35,7 @@ public partial class WebhooksRequestBuilder : BaseRequestBuilder /// /// Path parameters for the request /// The request adapter to use to execute the requests. - public WebhooksRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/webhooks{?application_id*,cursor*,limit*}", pathParameters) + public WebhooksRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/webhooks{?application_id*,cursor*,include*,limit*,scope*,status*}", pathParameters) { } /// @@ -43,7 +43,7 @@ public WebhooksRequestBuilder(Dictionary pathParameters, IReques /// /// The raw URL to use for the request builder. /// The request adapter to use to execute the requests. - public WebhooksRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/webhooks{?application_id*,cursor*,limit*}", rawUrl) + public WebhooksRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/webhooks{?application_id*,cursor*,include*,limit*,scope*,status*}", rawUrl) { } /// @@ -180,10 +180,26 @@ public partial class WebhooksRequestBuilderGetQueryParameters public string Cursor { get; set; } #pragma warning restore CS1591 #endif + /// `total` adds `page.total` and `page.total_capped`: the number of rows matching the current filters across every page, counted up to 10,000 (Conventions → Pagination). Omitted unless requested. + [QueryParameter("include")] + public global::Substratal.Hub.Core.Api.Generated.Webhooks.GetIncludeQueryParameterType? Include { get; set; } #pragma warning disable CS1591 [QueryParameter("limit")] public int? Limit { get; set; } #pragma warning restore CS1591 + /// "platform" returns only platform-scoped subscriptions. Callers without webhooks.manage see none, so they get an empty page. Can't be combined with application_id (400 invalid_request). + [QueryParameter("scope")] + public global::Substratal.Hub.Core.Api.Generated.Webhooks.GetScopeQueryParameterType? Scope { get; set; } + /// Subscriptions in any of these statuses. Repeatable. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("status")] + public global::Substratal.Hub.Core.Api.Generated.Webhooks.GetStatusQueryParameterType[]? Status { get; set; } +#nullable restore +#else + [QueryParameter("status")] + public global::Substratal.Hub.Core.Api.Generated.Webhooks.GetStatusQueryParameterType[] Status { get; set; } +#endif } } } diff --git a/src/Substratal.Hub.Core/Api/Generated/kiota-lock.json b/src/Substratal.Hub.Core/Api/Generated/kiota-lock.json index b42180c..67db7a0 100644 --- a/src/Substratal.Hub.Core/Api/Generated/kiota-lock.json +++ b/src/Substratal.Hub.Core/Api/Generated/kiota-lock.json @@ -1,5 +1,5 @@ { - "descriptionHash": "83415504D68F6973311602E2F65465A7CC7EFF331BB600485C06D5828A5E94036F60390343434737AE85B7FB31BEB5258C9DCDC8929F409F4EF9A2F2CC87B4E8", + "descriptionHash": "94DA7FFACD4546FF9BCAEDD880C66799BBCEA5C9A61FB9CE96D564F90D201C2220FE64FEB64B8EF505FE92EE815E99854B96D065B8754DAAD01A4ACBBC475D7D", "descriptionLocation": "../../../../api/openapi.yaml", "lockFileVersion": "1.0.0", "kiotaVersion": "1.36.1",