From d796e8fec634a788ebd103611496617e0d620cce Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 27 Oct 2026 12:38:45 +0000 Subject: [PATCH] Sync the API client with openapi.yaml 1.0.0-draft.21 --- api/openapi.yaml | 269 +++++++++++++++++- .../ApiKeys/ApiKeysRequestBuilder.cs | 7 +- .../ApiKeys/GetIncludeQueryParameterType.cs | 16 ++ .../ApplicationsRequestBuilder.cs | 21 +- .../GetIncludeQueryParameterType.cs | 16 ++ .../Applications/GetSortQueryParameterType.cs | 20 ++ .../Item/ApplicationsItemRequestBuilder.cs | 47 +++ .../AuditEvents/AuditEventsRequestBuilder.cs | 19 +- .../GetIncludeQueryParameterType.cs | 16 ++ .../EntitlementsRequestBuilder.cs | 7 +- .../GetIncludeQueryParameterType.cs | 16 ++ .../Api/Generated/Models/Application.cs | 7 + .../Models/ApplicationReviewStatus.cs | 4 + .../Generated/Models/ApplicationSummary.cs | 51 ++++ .../Api/Generated/Models/AuditAction.cs | 8 + .../Generated/Models/AuditExportRequest.cs | 18 ++ .../Generated/Models/DeviceInactiveReason.cs | 4 + .../Api/Generated/Models/PageInfo.cs | 16 ++ .../Api/Generated/Models/PushCredential.cs | 2 +- .../Generated/Models/PushCredentialPage.cs | 64 +++++ .../Generated/Models/PushCredential_status.cs | 7 +- .../Generated/Models/SubscriptionListItem.cs | 82 ++++++ .../Api/Generated/Models/SubscriptionPage.cs | 64 +++++ .../Models/WebhookDeliveryListItem.cs | 82 ++++++ .../Generated/Models/WebhookDeliveryPage.cs | 64 +++++ .../GetIncludeQueryParameterType.cs | 16 ++ .../Members/GetIncludeQueryParameterType.cs | 16 ++ .../Item/Members/MembersRequestBuilder.cs | 7 +- .../OrganizationsRequestBuilder.cs | 7 +- .../GetIncludeQueryParameterType.cs | 16 ++ .../GetStatusQueryParameterType.cs | 24 ++ .../PushCredentialsRequestBuilder.cs | 128 +++++++++ .../Roles/GetIncludeQueryParameterType.cs | 16 ++ .../Roles/Item/RolesItemRequestBuilder.cs | 6 +- .../Generated/Roles/RolesRequestBuilder.cs | 13 +- .../GetIncludeQueryParameterType.cs | 16 ++ .../GetSubscriber_typeQueryParameterType.cs | 20 ++ .../SubscriptionsRequestBuilder.cs | 141 +++++++++ .../Api/Generated/SubstratalApiClient.cs | 18 ++ .../Users/GetIncludeQueryParameterType.cs | 16 ++ .../EntitlementsRequestBuilder.cs | 7 +- .../GetIncludeQueryParameterType.cs | 16 ++ .../Generated/Users/UsersRequestBuilder.cs | 7 +- .../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 +- 54 files changed, 1733 insertions(+), 39 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/AuditEvents/GetIncludeQueryParameterType.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/Entitlements/GetIncludeQueryParameterType.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/Models/PushCredentialPage.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/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/Members/GetIncludeQueryParameterType.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/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/Users/GetIncludeQueryParameterType.cs create mode 100644 src/Substratal.Hub.Core/Api/Generated/Users/Item/Entitlements/GetIncludeQueryParameterType.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..7b06ebe 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.21" summary: >- User accounts, auth, roles, per-app entitlements (the on/off access switch), profiles, settings, organizations, tenancy, subscription billing, @@ -710,6 +710,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 } } @@ -1124,11 +1125,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 +1144,11 @@ 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: 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: @@ -1205,7 +1216,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 +1234,27 @@ paths: "403": { $ref: "#/components/responses/Forbidden" } "409": { $ref: "#/components/responses/Conflict" } "422": { $ref: "#/components/responses/Unprocessable" } + 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" } # ───────────────────────────── Entitlements ───────────────────────────── @@ -1238,6 +1270,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 +1325,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 } } @@ -1405,11 +1439,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 +1509,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 +1543,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: @@ -1596,6 +1652,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 +1748,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 +2111,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" @@ -2247,6 +2339,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 +2353,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 +2371,7 @@ paths: application/json: schema: { $ref: "#/components/schemas/AuditEventPage" } "403": { $ref: "#/components/responses/Forbidden" } + "422": { $ref: "#/components/responses/Unprocessable" } /audit-events/{id}: parameters: @@ -2356,7 +2454,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 +2624,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 +2641,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 +2712,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,6 +3167,7 @@ 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] } } @@ -3120,6 +3314,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 @@ -3232,6 +3434,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 @@ -3479,7 +3691,7 @@ components: ApplicationReviewStatus: type: string - enum: [approved, pending_review, rejected, suspended] + enum: [approved, pending_review, rejected, suspended, retired] ApplicationPermission: type: object @@ -3495,6 +3707,7 @@ components: 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 +3717,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: @@ -3548,6 +3765,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 } @@ -3844,6 +4062,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 +4134,8 @@ components: - user.mfa_reset - user.sessions_revoked - audit.exported + - application.retired + - application.deleted - entitlement.granted - entitlement.disabled - entitlement.revoked @@ -3964,6 +4199,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 } @@ -4069,6 +4305,7 @@ components: - user_deleted - test_user_expired - test_user_extended + - application_retired WebhookEventEnvelope: type: object @@ -4127,6 +4364,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 +4415,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 +4435,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 diff --git a/src/Substratal.Hub.Core/Api/Generated/ApiKeys/ApiKeysRequestBuilder.cs b/src/Substratal.Hub.Core/Api/Generated/ApiKeys/ApiKeysRequestBuilder.cs index 3d3ebe4..002033d 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*,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*,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; } 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/Applications/ApplicationsRequestBuilder.cs b/src/Substratal.Hub.Core/Api/Generated/Applications/ApplicationsRequestBuilder.cs index 9ac45d2..03d7215 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*,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*,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,6 +67,7 @@ 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); } @@ -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. @@ -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; } @@ -213,6 +221,9 @@ public partial class ApplicationsRequestBuilderGetQueryParameters [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..a455100 100644 --- a/src/Substratal.Hub.Core/Api/Generated/Applications/Item/ApplicationsItemRequestBuilder.cs +++ b/src/Substratal.Hub.Core/Api/Generated/Applications/Item/ApplicationsItemRequestBuilder.cs @@ -40,6 +40,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 @@ -96,6 +124,25 @@ public ApplicationsItemRequestBuilder(string rawUrl, IRequestAdapter requestAdap 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/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/Entitlements/EntitlementsRequestBuilder.cs b/src/Substratal.Hub.Core/Api/Generated/Entitlements/EntitlementsRequestBuilder.cs index 2e8e129..076ab3e 100644 --- a/src/Substratal.Hub.Core/Api/Generated/Entitlements/EntitlementsRequestBuilder.cs +++ b/src/Substratal.Hub.Core/Api/Generated/Entitlements/EntitlementsRequestBuilder.cs @@ -35,7 +35,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 +43,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 +135,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/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/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..abb8035 100644 --- a/src/Substratal.Hub.Core/Api/Generated/Models/ApplicationSummary.cs +++ b/src/Substratal.Hub.Core/Api/Generated/Models/ApplicationSummary.cs @@ -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/AuditAction.cs b/src/Substratal.Hub.Core/Api/Generated/Models/AuditAction.cs index d435660..567c422 100644 --- a/src/Substratal.Hub.Core/Api/Generated/Models/AuditAction.cs +++ b/src/Substratal.Hub.Core/Api/Generated/Models/AuditAction.cs @@ -76,6 +76,14 @@ 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 = "entitlement.granted")] #pragma warning disable CS1591 EntitlementGranted, 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/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/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/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/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/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/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/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/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..86aef1a 100644 --- a/src/Substratal.Hub.Core/Api/Generated/SubstratalApiClient.cs +++ b/src/Substratal.Hub.Core/Api/Generated/SubstratalApiClient.cs @@ -16,9 +16,12 @@ 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.PushCredentials; using Substratal.Hub.Core.Api.Generated.Roles; +using Substratal.Hub.Core.Api.Generated.Subscriptions; using Substratal.Hub.Core.Api.Generated.Tenants; 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,11 +80,21 @@ public partial class SubstratalApiClient : BaseRequestBuilder { get => new global::Substratal.Hub.Core.Api.Generated.Permissions.PermissionsRequestBuilder(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 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 { @@ -92,6 +105,11 @@ public partial class SubstratalApiClient : BaseRequestBuilder { 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/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/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/UsersRequestBuilder.cs b/src/Substratal.Hub.Core/Api/Generated/Users/UsersRequestBuilder.cs index c358dd5..7228fbd 100644 --- a/src/Substratal.Hub.Core/Api/Generated/Users/UsersRequestBuilder.cs +++ b/src/Substratal.Hub.Core/Api/Generated/Users/UsersRequestBuilder.cs @@ -41,7 +41,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 +49,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 +211,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..c659874 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": "BAEDC1AEF7924782635DC330E5E93F4C9072CC3F4F77BE136971A1DC43807FED4C96B819022BAA7BE78D7DBCC3A86170BFBF2D447B6D7D3A8B8F05A844F00277", "descriptionLocation": "../../../../api/openapi.yaml", "lockFileVersion": "1.0.0", "kiotaVersion": "1.36.1",