UNPKG

@microsoft/msgraph-beta-sdk-applications

Version:
70 lines 4.47 kB
import { type KeyCredential, type PasswordCredential } from '@microsoft/msgraph-beta-sdk/models/index.js'; import { type AdditionalDataHolder, type BackedModel, type BaseRequestBuilder, type Parsable, type ParseNode, type RequestConfiguration, type RequestInformation, type RequestsMetadata, type SerializationWriter } from '@microsoft/kiota-abstractions'; export interface AddKeyPostRequestBody extends AdditionalDataHolder, BackedModel, Parsable { /** * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. */ additionalData?: Record<string, unknown>; /** * Stores model information. */ backingStoreEnabled?: boolean | null; /** * The keyCredential property */ keyCredential?: KeyCredential | null; /** * The passwordCredential property */ passwordCredential?: PasswordCredential | null; /** * The proof property */ proof?: string | null; } /** * Provides operations to call the addKey method. */ export interface AddKeyRequestBuilder extends BaseRequestBuilder<AddKeyRequestBuilder> { /** * Add a key credential to an application. This method, along with removeKey, can be used by an application to automate rolling its expiring keys. As part of the request validation for this method, a proof of possession of an existing key is verified before the action can be performed. Applications that don't have any existing valid certificates (no certificates have been added yet, or all certificates have expired), won't be able to use this service action. You can use the Update application operation to perform an update instead. * @param body The request body * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. * @returns {Promise<KeyCredential>} * @throws {ODataError} error when the service returns a 4XX or 5XX status code * @see {@link https://learn.microsoft.com/graph/api/application-addkey?view=graph-rest-beta|Find more info here} */ post(body: AddKeyPostRequestBody, requestConfiguration?: RequestConfiguration<object> | undefined): Promise<KeyCredential | undefined>; /** * Add a key credential to an application. This method, along with removeKey, can be used by an application to automate rolling its expiring keys. As part of the request validation for this method, a proof of possession of an existing key is verified before the action can be performed. Applications that don't have any existing valid certificates (no certificates have been added yet, or all certificates have expired), won't be able to use this service action. You can use the Update application operation to perform an update instead. * @param body The request body * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. * @returns {RequestInformation} */ toPostRequestInformation(body: AddKeyPostRequestBody, requestConfiguration?: RequestConfiguration<object> | undefined): RequestInformation; } /** * Creates a new instance of the appropriate class based on discriminator value * @param parseNode The parse node to use to read the discriminator value and create the object * @returns {AddKeyPostRequestBody} */ export declare function createAddKeyPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined): ((instance?: Parsable) => Record<string, (node: ParseNode) => void>); /** * The deserialization information for the current model * @returns {Record<string, (node: ParseNode) => void>} */ export declare function deserializeIntoAddKeyPostRequestBody(addKeyPostRequestBody?: Partial<AddKeyPostRequestBody> | undefined): Record<string, (node: ParseNode) => void>; /** * Serializes information the current object * @param writer Serialization writer to use to serialize this model */ export declare function serializeAddKeyPostRequestBody(writer: SerializationWriter, addKeyPostRequestBody?: Partial<AddKeyPostRequestBody> | undefined | null): void; /** * Uri template for the request builder. */ export declare const AddKeyRequestBuilderUriTemplate = "{+baseurl}/applications/{application%2Did}/addKey"; /** * Metadata for all the requests in the request builder. */ export declare const AddKeyRequestBuilderRequestsMetadata: RequestsMetadata; //# sourceMappingURL=index.d.ts.map