@keycloak/keycloak-admin-client 26.6.3 → 26.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/lib/defs/clientPolicyRepresentation.d.ts +1 -0
  2. package/lib/defs/identityProviderRepresentation.d.ts +1 -0
  3. package/lib/defs/identityProviderRepresentation.js +1 -0
  4. package/lib/defs/identityProviderRepresentation.js.map +1 -1
  5. package/lib/defs/issuedUserVerifiableCredentialRepresentation.d.ts +11 -0
  6. package/lib/defs/issuedUserVerifiableCredentialRepresentation.js +2 -0
  7. package/lib/defs/issuedUserVerifiableCredentialRepresentation.js.map +1 -0
  8. package/lib/defs/realmRepresentation.d.ts +1 -0
  9. package/lib/defs/serverInfoRepesentation.d.ts +5 -0
  10. package/lib/defs/userVerifiableCredentialRepresentation.d.ts +11 -0
  11. package/lib/defs/userVerifiableCredentialRepresentation.js +2 -0
  12. package/lib/defs/userVerifiableCredentialRepresentation.js.map +1 -0
  13. package/lib/defs/verifiableCredentialOfferActionConfigRepresentation.d.ts +8 -0
  14. package/lib/defs/verifiableCredentialOfferActionConfigRepresentation.js +2 -0
  15. package/lib/defs/verifiableCredentialOfferActionConfigRepresentation.js.map +1 -0
  16. package/lib/defs/whoAmIRepresentation.d.ts +1 -1
  17. package/lib/generated/admin/api/item/clients/index.d.ts +3 -5
  18. package/lib/generated/admin/api/item/clients/index.js +4 -5
  19. package/lib/generated/admin/api/item/clients/index.js.map +1 -1
  20. package/lib/generated/admin/api/item/clients/v2/index.d.ts +77 -0
  21. package/lib/generated/admin/api/item/clients/{item → v2}/index.js +7 -7
  22. package/lib/generated/admin/api/item/clients/v2/index.js.map +1 -0
  23. package/lib/generated/admin/api/item/clients/{item → v2}/item/index.d.ts +30 -9
  24. package/lib/generated/admin/api/item/clients/v2/item/index.js +76 -0
  25. package/lib/generated/admin/api/item/clients/v2/item/index.js.map +1 -0
  26. package/lib/generated/doc-examples/admin-v2-doc-examples-check.d.ts +1 -0
  27. package/lib/generated/doc-examples/admin-v2-doc-examples-check.js +11 -0
  28. package/lib/generated/doc-examples/admin-v2-doc-examples-check.js.map +1 -0
  29. package/lib/generated/models/index.d.ts +50 -20
  30. package/lib/generated/models/index.js +30 -8
  31. package/lib/generated/models/index.js.map +1 -1
  32. package/lib/resources/agent.js +3 -3
  33. package/lib/resources/agent.js.map +1 -1
  34. package/lib/resources/clients.d.ts +8 -1
  35. package/lib/resources/clients.js +18 -8
  36. package/lib/resources/clients.js.map +1 -1
  37. package/lib/resources/clientsV2.d.ts +2 -2
  38. package/lib/resources/clientsV2.js +1 -3
  39. package/lib/resources/clientsV2.js.map +1 -1
  40. package/lib/resources/users.d.ts +66 -0
  41. package/lib/resources/users.js +62 -0
  42. package/lib/resources/users.js.map +1 -1
  43. package/lib/utils/auth.d.ts +2 -2
  44. package/lib/utils/auth.js +2 -1
  45. package/lib/utils/auth.js.map +1 -1
  46. package/lib/utils/decode.js +1 -1
  47. package/lib/utils/decode.js.map +1 -1
  48. package/lib/utils/fetchWithError.js +0 -1
  49. package/lib/utils/fetchWithError.js.map +1 -1
  50. package/package.json +31 -12
  51. package/lib/generated/admin/api/item/clients/item/index.d.ts +0 -52
  52. package/lib/generated/admin/api/item/clients/item/index.js.map +0 -1
  53. package/lib/generated/admin/api/item/clients/item/item/index.js +0 -44
  54. package/lib/generated/admin/api/item/clients/item/item/index.js.map +0 -1
@@ -6,6 +6,7 @@ export default interface ClientPolicyRepresentation {
6
6
  conditions?: ClientPolicyConditionRepresentation[];
7
7
  description?: string;
8
8
  enabled?: boolean;
9
+ mode?: string;
9
10
  name?: string;
10
11
  profiles?: string[];
11
12
  }
@@ -5,6 +5,7 @@ export declare enum IdentityProviderType {
5
5
  ANY = "ANY",
6
6
  USER_AUTHENTICATION = "USER_AUTHENTICATION",
7
7
  CLIENT_ASSERTION = "CLIENT_ASSERTION",
8
+ TRUST_MATERIAL = "TRUST_MATERIAL",
8
9
  EXCHANGE_EXTERNAL_TOKEN = "EXCHANGE_EXTERNAL_TOKEN",
9
10
  JWT_AUTHORIZATION_GRANT = "JWT_AUTHORIZATION_GRANT"
10
11
  }
@@ -6,6 +6,7 @@ export var IdentityProviderType;
6
6
  IdentityProviderType["ANY"] = "ANY";
7
7
  IdentityProviderType["USER_AUTHENTICATION"] = "USER_AUTHENTICATION";
8
8
  IdentityProviderType["CLIENT_ASSERTION"] = "CLIENT_ASSERTION";
9
+ IdentityProviderType["TRUST_MATERIAL"] = "TRUST_MATERIAL";
9
10
  IdentityProviderType["EXCHANGE_EXTERNAL_TOKEN"] = "EXCHANGE_EXTERNAL_TOKEN";
10
11
  IdentityProviderType["JWT_AUTHORIZATION_GRANT"] = "JWT_AUTHORIZATION_GRANT";
11
12
  })(IdentityProviderType || (IdentityProviderType = {}));
@@ -1 +1 @@
1
- {"version":3,"file":"identityProviderRepresentation.js","sourceRoot":"","sources":["../../src/defs/identityProviderRepresentation.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,CAAN,IAAY,oBAMX;AAND,WAAY,oBAAoB;IAC9B,mCAAW,CAAA;IACX,mEAA2C,CAAA;IAC3C,6DAAqC,CAAA;IACrC,2EAAmD,CAAA;IACnD,2EAAmD,CAAA;AACrD,CAAC,EANW,oBAAoB,KAApB,oBAAoB,QAM/B"}
1
+ {"version":3,"file":"identityProviderRepresentation.js","sourceRoot":"","sources":["../../src/defs/identityProviderRepresentation.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,CAAN,IAAY,oBAOX;AAPD,WAAY,oBAAoB;IAC9B,mCAAW,CAAA;IACX,mEAA2C,CAAA;IAC3C,6DAAqC,CAAA;IACrC,yDAAiC,CAAA;IACjC,2EAAmD,CAAA;IACnD,2EAAmD,CAAA;AACrD,CAAC,EAPW,oBAAoB,KAApB,oBAAoB,QAO/B"}
@@ -0,0 +1,11 @@
1
+ export default interface IssuedUserVerifiableCredentialRepresentation {
2
+ id?: string;
3
+ userId?: string;
4
+ credentialType?: string;
5
+ issuedAt?: number;
6
+ expiresAt?: number;
7
+ clientId?: string;
8
+ revision?: string;
9
+ clientName?: string;
10
+ clientBaseUrl?: string;
11
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=issuedUserVerifiableCredentialRepresentation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"issuedUserVerifiableCredentialRepresentation.js","sourceRoot":"","sources":["../../src/defs/issuedUserVerifiableCredentialRepresentation.ts"],"names":[],"mappings":""}
@@ -124,6 +124,7 @@ export default interface RealmRepresentation {
124
124
  users?: UserRepresentation[];
125
125
  verifyEmail?: boolean;
126
126
  waitIncrementSeconds?: number;
127
+ webAuthnPolicyPasswordlessPasskeysEnabled?: boolean;
127
128
  scimApiEnabled?: boolean;
128
129
  }
129
130
  export type PartialImportRealmRepresentation = RealmRepresentation & {
@@ -46,6 +46,11 @@ export interface ServerInfoRepresentation {
46
46
  enums?: {
47
47
  [index: string]: string[];
48
48
  };
49
+ parameterizedScopeTypes?: ParameterizedScopeTypeRepresentation[];
50
+ }
51
+ export interface ParameterizedScopeTypeRepresentation {
52
+ name: string;
53
+ repeatable: boolean;
49
54
  }
50
55
  export interface ThemeInfoRepresentation {
51
56
  name: string;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Represents a verifiable credential associated with a user.
3
+ * */
4
+ export default interface UserVerifiableCredentialRepresentation {
5
+ credentialScopeName?: string;
6
+ credentialConfigurationId?: string;
7
+ revision?: string;
8
+ createdDate?: number;
9
+ updatedDate?: number;
10
+ userAttributes?: Record<string, string[]>;
11
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=userVerifiableCredentialRepresentation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"userVerifiableCredentialRepresentation.js","sourceRoot":"","sources":["../../src/defs/userVerifiableCredentialRepresentation.ts"],"names":[],"mappings":""}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Represents a configuration of verifiable credential offer action
3
+ * */
4
+ export default interface VerifiableCredentialOfferActionConfigRepresentation {
5
+ credentialConfigurationId?: string;
6
+ clientId?: string;
7
+ preAuthorized?: boolean;
8
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=verifiableCredentialOfferActionConfigRepresentation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"verifiableCredentialOfferActionConfigRepresentation.js","sourceRoot":"","sources":["../../src/defs/verifiableCredentialOfferActionConfigRepresentation.ts"],"names":[],"mappings":""}
@@ -3,7 +3,7 @@ export type AccessChecker = {
3
3
  hasAny: (...types: AccessType[]) => boolean;
4
4
  };
5
5
  export type AccessTypeFunc = (accessChecker: AccessChecker) => boolean;
6
- export type AccessType = "view-realm" | "view-identity-providers" | "manage-identity-providers" | "impersonation" | "create-client" | "manage-users" | "query-realms" | "view-authorization" | "query-clients" | "query-users" | "manage-events" | "manage-realm" | "view-events" | "view-users" | "view-clients" | "manage-authorization" | "manage-clients" | "query-groups" | "anyone" | AccessTypeFunc;
6
+ export type AccessType = "view-realm" | "view-identity-providers" | "manage-identity-providers" | "impersonation" | "create-client" | "manage-users" | "query-realms" | "view-authorization" | "query-clients" | "query-users" | "manage-events" | "manage-realm" | "view-events" | "view-users" | "view-clients" | "manage-authorization" | "manage-clients" | "manage-organizations" | "view-organizations" | "query-groups" | "query-organizations" | "admin" | "realm-admin" | "anyone" | AccessTypeFunc;
7
7
  export default interface WhoAmIRepresentation {
8
8
  userId: string;
9
9
  realm: string;
@@ -1,15 +1,13 @@
1
- import { type WithVersionItemRequestBuilder } from './item/index.js';
1
+ import { type V2RequestBuilder } from './v2/index.js';
2
2
  import { type BaseRequestBuilder, type KeysToExcludeForNavigationMetadata, type NavigationMetadata } from '@microsoft/kiota-abstractions';
3
3
  /**
4
4
  * Builds and executes requests for operations under /admin/api/{realmName}/clients
5
5
  */
6
6
  export interface ClientsRequestBuilder extends BaseRequestBuilder<ClientsRequestBuilder> {
7
7
  /**
8
- * Gets an item from the ApiSdk.admin.api.item.clients.item collection
9
- * @param version Unique identifier of the item
10
- * @returns {WithVersionItemRequestBuilder}
8
+ * The v2 property
11
9
  */
12
- byVersion(version: string): WithVersionItemRequestBuilder;
10
+ get v2(): V2RequestBuilder;
13
11
  }
14
12
  /**
15
13
  * Uri template for the request builder.
@@ -2,7 +2,7 @@
2
2
  /* eslint-disable */
3
3
  // Generated by Microsoft Kiota
4
4
  // @ts-ignore
5
- import { WithVersionItemRequestBuilderNavigationMetadata, WithVersionItemRequestBuilderRequestsMetadata } from './item/index.js';
5
+ import { V2RequestBuilderNavigationMetadata, V2RequestBuilderRequestsMetadata } from './v2/index.js';
6
6
  /**
7
7
  * Uri template for the request builder.
8
8
  */
@@ -11,10 +11,9 @@ export const ClientsRequestBuilderUriTemplate = "{+baseurl}/admin/api/{realmName
11
11
  * Metadata for all the navigation properties in the request builder.
12
12
  */
13
13
  export const ClientsRequestBuilderNavigationMetadata = {
14
- byVersion: {
15
- requestsMetadata: WithVersionItemRequestBuilderRequestsMetadata,
16
- navigationMetadata: WithVersionItemRequestBuilderNavigationMetadata,
17
- pathParametersMappings: ["version"],
14
+ v2: {
15
+ requestsMetadata: V2RequestBuilderRequestsMetadata,
16
+ navigationMetadata: V2RequestBuilderNavigationMetadata,
18
17
  },
19
18
  };
20
19
  /* tslint:enable */
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/generated/admin/api/item/clients/index.ts"],"names":[],"mappings":"AAAA,oBAAoB;AACpB,oBAAoB;AACpB,+BAA+B;AAC/B,aAAa;AACb,OAAO,EAAsC,+CAA+C,EAAE,6CAA6C,EAAE,MAAM,iBAAiB,CAAC;AAerK;;GAEG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAAG,0CAA0C,CAAC;AAC3F;;GAEG;AACH,MAAM,CAAC,MAAM,uCAAuC,GAAyG;IACzJ,SAAS,EAAE;QACP,gBAAgB,EAAE,6CAA6C;QAC/D,kBAAkB,EAAE,+CAA+C;QACnE,sBAAsB,EAAE,CAAC,SAAS,CAAC;KACtC;CACJ,CAAC;AACF,mBAAmB;AACnB,mBAAmB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/generated/admin/api/item/clients/index.ts"],"names":[],"mappings":"AAAA,oBAAoB;AACpB,oBAAoB;AACpB,+BAA+B;AAC/B,aAAa;AACb,OAAO,EAAyB,kCAAkC,EAAE,gCAAgC,EAAE,MAAM,eAAe,CAAC;AAa5H;;GAEG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAAG,0CAA0C,CAAC;AAC3F;;GAEG;AACH,MAAM,CAAC,MAAM,uCAAuC,GAAyG;IACzJ,EAAE,EAAE;QACA,gBAAgB,EAAE,gCAAgC;QAClD,kBAAkB,EAAE,kCAAkC;KACzD;CACJ,CAAC;AACF,mBAAmB;AACnB,mBAAmB"}
@@ -0,0 +1,77 @@
1
+ import { type BaseClientRepresentation } from '../../../../../models/index.js';
2
+ import { type V2ItemRequestBuilder } from './item/index.js';
3
+ import { type BaseRequestBuilder, type KeysToExcludeForNavigationMetadata, type NavigationMetadata, type RequestConfiguration, type RequestInformation, type RequestsMetadata } from '@microsoft/kiota-abstractions';
4
+ /**
5
+ * Builds and executes requests for operations under /admin/api/{realmName}/clients/v2
6
+ */
7
+ export interface V2RequestBuilder extends BaseRequestBuilder<V2RequestBuilder> {
8
+ /**
9
+ * Gets an item from the ApiSdk.admin.api.item.clients.v2.item collection
10
+ * @param id Unique identifier of the item
11
+ * @returns {V2ItemRequestBuilder}
12
+ */
13
+ byId(id: string): V2ItemRequestBuilder;
14
+ /**
15
+ * Returns a list of clients in the realm, optionally filtered by a query expression. Results are paginated using offset (0-based, default 0) and limit (default 100).
16
+ * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
17
+ * @returns {Promise<BaseClientRepresentation[]>}
18
+ */
19
+ get(requestConfiguration?: RequestConfiguration<V2RequestBuilderGetQueryParameters> | undefined): Promise<BaseClientRepresentation[] | undefined>;
20
+ /**
21
+ * Creates a new client in the realm
22
+ * @param body Base client representation with common properties for all client types
23
+ * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
24
+ * @returns {Promise<BaseClientRepresentation>}
25
+ */
26
+ post(body: BaseClientRepresentation, requestConfiguration?: RequestConfiguration<object> | undefined): Promise<BaseClientRepresentation | undefined>;
27
+ /**
28
+ * Returns a list of clients in the realm, optionally filtered by a query expression. Results are paginated using offset (0-based, default 0) and limit (default 100).
29
+ * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
30
+ * @returns {RequestInformation}
31
+ */
32
+ toGetRequestInformation(requestConfiguration?: RequestConfiguration<V2RequestBuilderGetQueryParameters> | undefined): RequestInformation;
33
+ /**
34
+ * Creates a new client in the realm
35
+ * @param body Base client representation with common properties for all client types
36
+ * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
37
+ * @returns {RequestInformation}
38
+ */
39
+ toPostRequestInformation(body: BaseClientRepresentation, requestConfiguration?: RequestConfiguration<object> | undefined): RequestInformation;
40
+ }
41
+ /**
42
+ * Returns a list of clients in the realm, optionally filtered by a query expression. Results are paginated using offset (0-based, default 0) and limit (default 100).
43
+ */
44
+ export interface V2RequestBuilderGetQueryParameters {
45
+ /**
46
+ * Set of fields to include in the response. Must be top-level fields. If omitted or empty, all fields will be populated.
47
+ */
48
+ fields?: string[];
49
+ /**
50
+ * Maximum number of results to return. Defaults to 100.
51
+ */
52
+ limit?: number;
53
+ /**
54
+ * Index of the first result to return, counted from 0. Defaults to 0.
55
+ */
56
+ offset?: number;
57
+ /**
58
+ * Filter expression using SCIM-like syntax, e.g. clientId eq "my-app" and enabled eq true
59
+ */
60
+ q?: string;
61
+ /**
62
+ * Sort expression. Comma-separated fields with optional direction per field using | (e.g. displayName|desc,clientId). Default direction is asc. Allowed fields: clientId, displayName, description, protocol, enabled, appUrl, createdTimestamp, updatedTimestamp.
63
+ */
64
+ sort?: string;
65
+ }
66
+ /**
67
+ * Uri template for the request builder.
68
+ */
69
+ export declare const V2RequestBuilderUriTemplate = "{+baseurl}/admin/api/{realmName}/clients/v2{?fields,limit*,offset*,q*,sort*}";
70
+ /**
71
+ * Metadata for all the navigation properties in the request builder.
72
+ */
73
+ export declare const V2RequestBuilderNavigationMetadata: Record<Exclude<keyof V2RequestBuilder, KeysToExcludeForNavigationMetadata>, NavigationMetadata>;
74
+ /**
75
+ * Metadata for all the requests in the request builder.
76
+ */
77
+ export declare const V2RequestBuilderRequestsMetadata: RequestsMetadata;
@@ -4,32 +4,32 @@
4
4
  // @ts-ignore
5
5
  import { createBaseClientRepresentationFromDiscriminatorValue, serializeBaseClientRepresentation } from '../../../../../models/index.js';
6
6
  // @ts-ignore
7
- import { VersionItemRequestBuilderRequestsMetadata } from './item/index.js';
7
+ import { V2ItemRequestBuilderRequestsMetadata } from './item/index.js';
8
8
  /**
9
9
  * Uri template for the request builder.
10
10
  */
11
- export const WithVersionItemRequestBuilderUriTemplate = "{+baseurl}/admin/api/{realmName}/clients/{version}";
11
+ export const V2RequestBuilderUriTemplate = "{+baseurl}/admin/api/{realmName}/clients/v2{?fields,limit*,offset*,q*,sort*}";
12
12
  /**
13
13
  * Metadata for all the navigation properties in the request builder.
14
14
  */
15
- export const WithVersionItemRequestBuilderNavigationMetadata = {
15
+ export const V2RequestBuilderNavigationMetadata = {
16
16
  byId: {
17
- requestsMetadata: VersionItemRequestBuilderRequestsMetadata,
17
+ requestsMetadata: V2ItemRequestBuilderRequestsMetadata,
18
18
  pathParametersMappings: ["id"],
19
19
  },
20
20
  };
21
21
  /**
22
22
  * Metadata for all the requests in the request builder.
23
23
  */
24
- export const WithVersionItemRequestBuilderRequestsMetadata = {
24
+ export const V2RequestBuilderRequestsMetadata = {
25
25
  get: {
26
- uriTemplate: WithVersionItemRequestBuilderUriTemplate,
26
+ uriTemplate: V2RequestBuilderUriTemplate,
27
27
  responseBodyContentType: "application/json",
28
28
  adapterMethodName: "sendCollection",
29
29
  responseBodyFactory: createBaseClientRepresentationFromDiscriminatorValue,
30
30
  },
31
31
  post: {
32
- uriTemplate: WithVersionItemRequestBuilderUriTemplate,
32
+ uriTemplate: V2RequestBuilderUriTemplate,
33
33
  responseBodyContentType: "application/json",
34
34
  adapterMethodName: "send",
35
35
  responseBodyFactory: createBaseClientRepresentationFromDiscriminatorValue,
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/generated/admin/api/item/clients/v2/index.ts"],"names":[],"mappings":"AAAA,oBAAoB;AACpB,oBAAoB;AACpB,+BAA+B;AAC/B,aAAa;AACb,OAAO,EAAE,oDAAoD,EAAE,iCAAiC,EAAiC,MAAM,gCAAgC,CAAC;AACxK,aAAa;AACb,OAAO,EAA6B,oCAAoC,EAAE,MAAM,iBAAiB,CAAC;AAkElG;;GAEG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,8EAA8E,CAAC;AAC1H;;GAEG;AACH,MAAM,CAAC,MAAM,kCAAkC,GAAoG;IAC/I,IAAI,EAAE;QACF,gBAAgB,EAAE,oCAAoC;QACtD,sBAAsB,EAAE,CAAC,IAAI,CAAC;KACjC;CACJ,CAAC;AACF;;GAEG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAAqB;IAC9D,GAAG,EAAE;QACD,WAAW,EAAE,2BAA2B;QACxC,uBAAuB,EAAE,kBAAkB;QAC3C,iBAAiB,EAAE,gBAAgB;QACnC,mBAAmB,EAAG,oDAAoD;KAC7E;IACD,IAAI,EAAE;QACF,WAAW,EAAE,2BAA2B;QACxC,uBAAuB,EAAE,kBAAkB;QAC3C,iBAAiB,EAAE,MAAM;QACzB,mBAAmB,EAAG,oDAAoD;QAC1E,sBAAsB,EAAE,kBAAkB;QAC1C,qBAAqB,EAAE,iCAAiC;QACxD,kCAAkC,EAAE,wBAAwB;KAC/D;CACJ,CAAC;AACF,mBAAmB;AACnB,mBAAmB"}
@@ -1,9 +1,28 @@
1
1
  import { type BaseClientRepresentation } from '../../../../../../models/index.js';
2
- import { type BaseRequestBuilder, type RequestConfiguration, type RequestInformation, type RequestsMetadata } from '@microsoft/kiota-abstractions';
2
+ import { type AdditionalDataHolder, type BaseRequestBuilder, type Parsable, type ParseNode, type RequestConfiguration, type RequestInformation, type RequestsMetadata, type SerializationWriter } from '@microsoft/kiota-abstractions';
3
3
  /**
4
- * Builds and executes requests for operations under /admin/api/{realmName}/clients/{version}/{id}
4
+ * Creates a new instance of the appropriate class based on discriminator value
5
+ * @param parseNode The parse node to use to read the discriminator value and create the object
6
+ * @returns {V2PatchRequestBody}
5
7
  */
6
- export interface VersionItemRequestBuilder extends BaseRequestBuilder<VersionItemRequestBuilder> {
8
+ export declare function createV2PatchRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined): ((instance?: Parsable) => Record<string, (node: ParseNode) => void>);
9
+ /**
10
+ * The deserialization information for the current model
11
+ * @param V2PatchRequestBody The instance to deserialize into.
12
+ * @returns {Record<string, (node: ParseNode) => void>}
13
+ */
14
+ export declare function deserializeIntoV2PatchRequestBody(v2PatchRequestBody?: Partial<V2PatchRequestBody> | undefined): Record<string, (node: ParseNode) => void>;
15
+ /**
16
+ * Serializes information the current object
17
+ * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
18
+ * @param V2PatchRequestBody The instance to serialize from.
19
+ * @param writer Serialization writer to use to serialize this model
20
+ */
21
+ export declare function serializeV2PatchRequestBody(writer: SerializationWriter, v2PatchRequestBody?: Partial<V2PatchRequestBody> | undefined | null, isSerializingDerivedType?: boolean): void;
22
+ /**
23
+ * Builds and executes requests for operations under /admin/api/{realmName}/clients/v2/{id}
24
+ */
25
+ export interface V2ItemRequestBuilder extends BaseRequestBuilder<V2ItemRequestBuilder> {
7
26
  /**
8
27
  * Deletes a client from the realm
9
28
  * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
@@ -17,11 +36,11 @@ export interface VersionItemRequestBuilder extends BaseRequestBuilder<VersionIte
17
36
  get(requestConfiguration?: RequestConfiguration<object> | undefined): Promise<BaseClientRepresentation | undefined>;
18
37
  /**
19
38
  * Partially updates a client using JSON Merge Patch
20
- * @param body Binary request body
39
+ * @param body The request body
21
40
  * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
22
41
  * @returns {Promise<BaseClientRepresentation>}
23
42
  */
24
- patch(body: ArrayBuffer | undefined, requestConfiguration?: RequestConfiguration<object> | undefined): Promise<BaseClientRepresentation | undefined>;
43
+ patch(body: V2PatchRequestBody, requestConfiguration?: RequestConfiguration<object> | undefined): Promise<BaseClientRepresentation | undefined>;
25
44
  /**
26
45
  * Creates or updates a client in the realm
27
46
  * @param body Base client representation with common properties for all client types
@@ -43,11 +62,11 @@ export interface VersionItemRequestBuilder extends BaseRequestBuilder<VersionIte
43
62
  toGetRequestInformation(requestConfiguration?: RequestConfiguration<object> | undefined): RequestInformation;
44
63
  /**
45
64
  * Partially updates a client using JSON Merge Patch
46
- * @param body Binary request body
65
+ * @param body The request body
47
66
  * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
48
67
  * @returns {RequestInformation}
49
68
  */
50
- toPatchRequestInformation(body: ArrayBuffer | undefined, requestConfiguration?: RequestConfiguration<object> | undefined): RequestInformation;
69
+ toPatchRequestInformation(body: V2PatchRequestBody, requestConfiguration?: RequestConfiguration<object> | undefined): RequestInformation;
51
70
  /**
52
71
  * Creates or updates a client in the realm
53
72
  * @param body Base client representation with common properties for all client types
@@ -56,11 +75,13 @@ export interface VersionItemRequestBuilder extends BaseRequestBuilder<VersionIte
56
75
  */
57
76
  toPutRequestInformation(body: BaseClientRepresentation, requestConfiguration?: RequestConfiguration<object> | undefined): RequestInformation;
58
77
  }
78
+ export interface V2PatchRequestBody extends AdditionalDataHolder, Parsable {
79
+ }
59
80
  /**
60
81
  * Uri template for the request builder.
61
82
  */
62
- export declare const VersionItemRequestBuilderUriTemplate = "{+baseurl}/admin/api/{realmName}/clients/{version}/{id}";
83
+ export declare const V2ItemRequestBuilderUriTemplate = "{+baseurl}/admin/api/{realmName}/clients/v2/{id}";
63
84
  /**
64
85
  * Metadata for all the requests in the request builder.
65
86
  */
66
- export declare const VersionItemRequestBuilderRequestsMetadata: RequestsMetadata;
87
+ export declare const V2ItemRequestBuilderRequestsMetadata: RequestsMetadata;
@@ -0,0 +1,76 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ // Generated by Microsoft Kiota
4
+ // @ts-ignore
5
+ import { createBaseClientRepresentationFromDiscriminatorValue, serializeBaseClientRepresentation } from '../../../../../../models/index.js';
6
+ /**
7
+ * Creates a new instance of the appropriate class based on discriminator value
8
+ * @param parseNode The parse node to use to read the discriminator value and create the object
9
+ * @returns {V2PatchRequestBody}
10
+ */
11
+ // @ts-ignore
12
+ export function createV2PatchRequestBodyFromDiscriminatorValue(parseNode) {
13
+ return deserializeIntoV2PatchRequestBody;
14
+ }
15
+ /**
16
+ * The deserialization information for the current model
17
+ * @param V2PatchRequestBody The instance to deserialize into.
18
+ * @returns {Record<string, (node: ParseNode) => void>}
19
+ */
20
+ // @ts-ignore
21
+ export function deserializeIntoV2PatchRequestBody(v2PatchRequestBody = {}) {
22
+ return {};
23
+ }
24
+ /**
25
+ * Serializes information the current object
26
+ * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
27
+ * @param V2PatchRequestBody The instance to serialize from.
28
+ * @param writer Serialization writer to use to serialize this model
29
+ */
30
+ // @ts-ignore
31
+ export function serializeV2PatchRequestBody(writer, v2PatchRequestBody = {}, isSerializingDerivedType = false) {
32
+ if (!v2PatchRequestBody || isSerializingDerivedType) {
33
+ return;
34
+ }
35
+ writer.writeAdditionalData(v2PatchRequestBody.additionalData);
36
+ }
37
+ /**
38
+ * Uri template for the request builder.
39
+ */
40
+ export const V2ItemRequestBuilderUriTemplate = "{+baseurl}/admin/api/{realmName}/clients/v2/{id}";
41
+ /**
42
+ * Metadata for all the requests in the request builder.
43
+ */
44
+ export const V2ItemRequestBuilderRequestsMetadata = {
45
+ delete: {
46
+ uriTemplate: V2ItemRequestBuilderUriTemplate,
47
+ adapterMethodName: "sendNoResponseContent",
48
+ },
49
+ get: {
50
+ uriTemplate: V2ItemRequestBuilderUriTemplate,
51
+ responseBodyContentType: "application/json",
52
+ adapterMethodName: "send",
53
+ responseBodyFactory: createBaseClientRepresentationFromDiscriminatorValue,
54
+ },
55
+ patch: {
56
+ uriTemplate: V2ItemRequestBuilderUriTemplate,
57
+ responseBodyContentType: "application/json",
58
+ adapterMethodName: "send",
59
+ responseBodyFactory: createBaseClientRepresentationFromDiscriminatorValue,
60
+ requestBodyContentType: "application/merge-patch+json",
61
+ requestBodySerializer: serializeV2PatchRequestBody,
62
+ requestInformationContentSetMethod: "setContentFromParsable",
63
+ },
64
+ put: {
65
+ uriTemplate: V2ItemRequestBuilderUriTemplate,
66
+ responseBodyContentType: "application/json",
67
+ adapterMethodName: "send",
68
+ responseBodyFactory: createBaseClientRepresentationFromDiscriminatorValue,
69
+ requestBodyContentType: "application/json",
70
+ requestBodySerializer: serializeBaseClientRepresentation,
71
+ requestInformationContentSetMethod: "setContentFromParsable",
72
+ },
73
+ };
74
+ /* tslint:enable */
75
+ /* eslint-enable */
76
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../src/generated/admin/api/item/clients/v2/item/index.ts"],"names":[],"mappings":"AAAA,oBAAoB;AACpB,oBAAoB;AACpB,+BAA+B;AAC/B,aAAa;AACb,OAAO,EAAE,oDAAoD,EAAE,iCAAiC,EAAiC,MAAM,mCAAmC,CAAC;AAI3K;;;;GAIG;AACH,aAAa;AACb,MAAM,UAAU,8CAA8C,CAAC,SAAgC;IAC3F,OAAO,iCAAiC,CAAC;AAC7C,CAAC;AACD;;;;GAIG;AACH,aAAa;AACb,MAAM,UAAU,iCAAiC,CAAC,qBAA8D,EAAE;IAC9G,OAAO,EACN,CAAA;AACL,CAAC;AACD;;;;;GAKG;AACH,aAAa;AACb,MAAM,UAAU,2BAA2B,CAAC,MAA2B,EAAE,qBAAqE,EAAE,EAAE,2BAAoC,KAAK;IACvL,IAAI,CAAC,kBAAkB,IAAI,wBAAwB,EAAE,CAAC;QAAC,OAAO;IAAC,CAAC;IAChE,MAAM,CAAC,mBAAmB,CAAC,kBAAkB,CAAC,cAAc,CAAC,CAAC;AAClE,CAAC;AA2DD;;GAEG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAAG,kDAAkD,CAAC;AAClG;;GAEG;AACH,MAAM,CAAC,MAAM,oCAAoC,GAAqB;IAClE,MAAM,EAAE;QACJ,WAAW,EAAE,+BAA+B;QAC5C,iBAAiB,EAAE,uBAAuB;KAC7C;IACD,GAAG,EAAE;QACD,WAAW,EAAE,+BAA+B;QAC5C,uBAAuB,EAAE,kBAAkB;QAC3C,iBAAiB,EAAE,MAAM;QACzB,mBAAmB,EAAG,oDAAoD;KAC7E;IACD,KAAK,EAAE;QACH,WAAW,EAAE,+BAA+B;QAC5C,uBAAuB,EAAE,kBAAkB;QAC3C,iBAAiB,EAAE,MAAM;QACzB,mBAAmB,EAAG,oDAAoD;QAC1E,sBAAsB,EAAE,8BAA8B;QACtD,qBAAqB,EAAE,2BAA2B;QAClD,kCAAkC,EAAE,wBAAwB;KAC/D;IACD,GAAG,EAAE;QACD,WAAW,EAAE,+BAA+B;QAC5C,uBAAuB,EAAE,kBAAkB;QAC3C,iBAAiB,EAAE,MAAM;QACzB,mBAAmB,EAAG,oDAAoD;QAC1E,sBAAsB,EAAE,kBAAkB;QAC1C,qBAAqB,EAAE,iCAAiC;QACxD,kCAAkC,EAAE,wBAAwB;KAC/D;CACJ,CAAC;AACF,mBAAmB;AACnB,mBAAmB"}
@@ -0,0 +1,11 @@
1
+ const realmName = undefined;
2
+ const id = undefined;
3
+ const requestBody = undefined;
4
+ kcAdminClient.clients.v2().get();
5
+ kcAdminClient.clients.v2().post(requestBody);
6
+ kcAdminClient.clients.v2().byId(id).delete();
7
+ kcAdminClient.clients.v2().byId(id).get();
8
+ kcAdminClient.clients.v2().byId(id).patch(requestBody);
9
+ kcAdminClient.clients.v2().byId(id).put(requestBody);
10
+ export {};
11
+ //# sourceMappingURL=admin-v2-doc-examples-check.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"admin-v2-doc-examples-check.js","sourceRoot":"","sources":["../../../src/generated/doc-examples/admin-v2-doc-examples-check.ts"],"names":[],"mappings":"AAEA,MAAM,SAAS,GAAG,SAAgB,CAAC;AACnC,MAAM,EAAE,GAAG,SAAgB,CAAC;AAC5B,MAAM,WAAW,GAAG,SAAgB,CAAC;AACrC,aAAa,CAAC,OAAO,CAAC,EAAE,EAAE,CAAC,GAAG,EAAE,CAAC;AACjC,aAAa,CAAC,OAAO,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;AAC7C,aAAa,CAAC,OAAO,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC;AAC7C,aAAa,CAAC,OAAO,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC;AAC1C,aAAa,CAAC,OAAO,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;AACvD,aAAa,CAAC,OAAO,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC"}