From b15f3f4a89ca4c1f8033794c21a4d7bedd886bbc Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 26 Oct 2026 13:30:30 +0000 Subject: [PATCH] Sync the API client with openapi.yaml 1.0.0-draft.13 --- api/openapi.yaml | 197 +++++++++++++++++- .../ApiKeys/ApiKeysRequestBuilder.cs | 7 +- .../ApiKeys/GetIncludeQueryParameterType.cs | 16 ++ .../ApplicationsRequestBuilder.cs | 10 +- .../GetIncludeQueryParameterType.cs | 16 ++ .../Item/ApplicationsItemRequestBuilder.cs | 47 +++++ .../AuditEvents/AuditEventsRequestBuilder.cs | 7 +- .../GetIncludeQueryParameterType.cs | 16 ++ .../EntitlementsRequestBuilder.cs | 7 +- .../GetIncludeQueryParameterType.cs | 16 ++ .../Models/ApplicationReviewStatus.cs | 4 + .../Api/Generated/Models/AuditAction.cs | 8 + .../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 ++ .../Generated/Roles/RolesRequestBuilder.cs | 7 +- .../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/GetStatusQueryParameterType.cs | 24 +++ .../Deliveries/DeliveriesRequestBuilder.cs | 7 +- .../GetIncludeQueryParameterType.cs | 16 ++ .../Webhooks/WebhooksRequestBuilder.cs | 17 +- .../Api/Generated/kiota-lock.json | 2 +- 47 files changed, 1463 insertions(+), 31 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/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/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..049ca00 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.13" 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 } } @@ -1129,6 +1130,7 @@ paths: - $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,6 +1138,7 @@ 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 } } responses: "400": { $ref: "#/components/responses/BadRequest" } "200": @@ -1205,7 +1208,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 +1226,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 +1262,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 +1317,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 } } @@ -1410,6 +1436,7 @@ paths: - $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" } @@ -1596,6 +1623,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 +1719,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 +2082,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 +2310,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 } } @@ -2356,7 +2420,14 @@ 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 } responses: "400": { $ref: "#/components/responses/BadRequest" } "200": @@ -2513,6 +2584,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 +2601,36 @@ 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}/redeliver: parameters: - { name: id, in: path, required: true, schema: { type: string } } @@ -2547,6 +2649,32 @@ paths: # ───────────────────────────── Notifications ───────────────────────────── + /push-credentials: + get: + operationId: pushCredentials.listAll + tags: [Notifications] + summary: List push credentials across every Application (applications.manage) + description: >- + Requires applications.manage. Never returns key material. Newest first. An Application's owner + and its app keys use GET /applications/{id}/push-credentials instead. + 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 +3102,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 +3249,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 +3369,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 +3626,7 @@ components: ApplicationReviewStatus: type: string - enum: [approved, pending_review, rejected, suspended] + enum: [approved, pending_review, rejected, suspended, retired] ApplicationPermission: type: object @@ -3844,6 +3991,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 +4063,8 @@ components: - user.mfa_reset - user.sessions_revoked - audit.exported + - application.retired + - application.deleted - entitlement.granted - entitlement.disabled - entitlement.revoked @@ -4069,6 +4233,7 @@ components: - user_deleted - test_user_expired - test_user_extended + - application_retired WebhookEventEnvelope: type: object @@ -4127,6 +4292,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 +4343,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 +4363,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..0af7370 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*,tenant_id*,visibility*}", pathParameters) { } /// @@ -43,7 +43,7 @@ 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*,tenant_id*,visibility*}", rawUrl) { } /// @@ -175,6 +175,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; } 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/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..03415c9 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*,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*,since*,target_id*,target_type*,target_user_id*,tenant_id*,until*}", rawUrl) { } /// @@ -161,6 +161,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; } 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/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/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/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..4fbf84d --- /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) + { + } + /// + /// Requires applications.manage. Never returns key material. Newest first. An Application's owner and its app keys use GET /applications/{id}/push-credentials instead. + /// + /// 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); + } + /// + /// Requires applications.manage. Never returns key material. Newest first. An Application's owner and its app keys use GET /applications/{id}/push-credentials instead. + /// + /// 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); + } + /// + /// Requires applications.manage. Never returns key material. Newest first. An Application's owner and its app keys use GET /applications/{id}/push-credentials instead. + /// + [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/RolesRequestBuilder.cs b/src/Substratal.Hub.Core/Api/Generated/Roles/RolesRequestBuilder.cs index c0c40c0..dad3e07 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,7 +43,7 @@ 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) { } /// @@ -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/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/WebhooksRequestBuilder.cs b/src/Substratal.Hub.Core/Api/Generated/Webhooks/WebhooksRequestBuilder.cs index 50c7fd1..1265eba 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*,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*,status*}", rawUrl) { } /// @@ -180,10 +180,23 @@ 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 + /// 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..9e6ebb0 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": "FAB520E610C058FC222CDBFE0907DF33004F63DBB062E5C907DA1A0BDB29A53D827A0533901EA15CC9085864DE42B03B184E50B4CF42AEF1F8F66A9C3DBE08A4", "descriptionLocation": "../../../../api/openapi.yaml", "lockFileVersion": "1.0.0", "kiotaVersion": "1.36.1",