@targetprocess/shared-data-model-client 0.4.0 → 0.5.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.
@@ -1,4 +1,4 @@
1
- import { type WithResourceUrlItemRequestBuilder } from './item/index.js';
1
+ import { type EntityItemRequestBuilder } from './item/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 /api/sdm/attachments
@@ -6,10 +6,10 @@ import { type BaseRequestBuilder, type KeysToExcludeForNavigationMetadata, type
6
6
  export interface AttachmentsRequestBuilder extends BaseRequestBuilder<AttachmentsRequestBuilder> {
7
7
  /**
8
8
  * Gets an item from the Tp.api.sdm.attachments.item collection
9
- * @param resourceUrl Unique identifier of the item
10
- * @returns {WithResourceUrlItemRequestBuilder}
9
+ * @param entityId Unique identifier of the item
10
+ * @returns {EntityItemRequestBuilder}
11
11
  */
12
- byResourceUrl(resourceUrl: string): WithResourceUrlItemRequestBuilder;
12
+ byEntityId(entityId: number): EntityItemRequestBuilder;
13
13
  }
14
14
  /**
15
15
  * Uri template for the request builder.
@@ -14,9 +14,9 @@ exports.AttachmentsRequestBuilderUriTemplate = "{+baseurl}/api/sdm/attachments";
14
14
  * Metadata for all the navigation properties in the request builder.
15
15
  */
16
16
  exports.AttachmentsRequestBuilderNavigationMetadata = {
17
- byResourceUrl: {
18
- requestsMetadata: index_js_1.WithResourceUrlItemRequestBuilderRequestsMetadata,
19
- pathParametersMappings: ["resourceUrl"],
17
+ byEntityId: {
18
+ requestsMetadata: index_js_1.EntityItemRequestBuilderRequestsMetadata,
19
+ pathParametersMappings: ["entity%2Did"],
20
20
  },
21
21
  };
22
22
  /* tslint:enable */
@@ -1,35 +1,54 @@
1
- import { type BaseRequestBuilder, type RequestConfiguration, type RequestInformation, type RequestsMetadata } from '@microsoft/kiota-abstractions';
1
+ import { type SharedDataCreateAttachmentResponseDto } from '../../../../models/index.js';
2
+ import { MultipartBody, type BaseRequestBuilder, type RequestConfiguration, type RequestInformation, type RequestsMetadata } from '@microsoft/kiota-abstractions';
2
3
  /**
3
- * Builds and executes requests for operations under /api/sdm/attachments/{resourceUrl}
4
+ * Builds and executes requests for operations under /api/sdm/attachments/{entity-id}
4
5
  */
5
- export interface WithResourceUrlItemRequestBuilder extends BaseRequestBuilder<WithResourceUrlItemRequestBuilder> {
6
+ export interface EntityItemRequestBuilder extends BaseRequestBuilder<EntityItemRequestBuilder> {
6
7
  /**
7
- * Retrieves Shared Data Model entities count
8
+ * Gets attachment
8
9
  * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
9
10
  * @throws {HttpValidationProblemDetails} error when the service returns a 400 status code
10
11
  * @throws {ProblemDetails} error when the service returns a 401 status code
11
12
  * @throws {ProblemDetails} error when the service returns a 404 status code
12
13
  * @throws {ProblemDetails} error when the service returns a 500 status code
13
14
  */
14
- get(requestConfiguration?: RequestConfiguration<WithResourceUrlItemRequestBuilderGetQueryParameters> | undefined): Promise<void>;
15
+ get(requestConfiguration?: RequestConfiguration<EntityItemRequestBuilderGetQueryParameters> | undefined): Promise<void>;
15
16
  /**
16
- * Retrieves Shared Data Model entities count
17
+ * Uploads attachments to entity
18
+ * @param body The request body
19
+ * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
20
+ * @returns {Promise<SharedDataCreateAttachmentResponseDto>}
21
+ * @throws {HttpValidationProblemDetails} error when the service returns a 400 status code
22
+ * @throws {ProblemDetails} error when the service returns a 401 status code
23
+ * @throws {ProblemDetails} error when the service returns a 404 status code
24
+ * @throws {ProblemDetails} error when the service returns a 500 status code
25
+ */
26
+ post(body: MultipartBody, requestConfiguration?: RequestConfiguration<object> | undefined): Promise<SharedDataCreateAttachmentResponseDto | undefined>;
27
+ /**
28
+ * Gets attachment
29
+ * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
30
+ * @returns {RequestInformation}
31
+ */
32
+ toGetRequestInformation(requestConfiguration?: RequestConfiguration<EntityItemRequestBuilderGetQueryParameters> | undefined): RequestInformation;
33
+ /**
34
+ * Uploads attachments to entity
35
+ * @param body The request body
17
36
  * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
18
37
  * @returns {RequestInformation}
19
38
  */
20
- toGetRequestInformation(requestConfiguration?: RequestConfiguration<WithResourceUrlItemRequestBuilderGetQueryParameters> | undefined): RequestInformation;
39
+ toPostRequestInformation(body: MultipartBody, requestConfiguration?: RequestConfiguration<object> | undefined): RequestInformation;
21
40
  }
22
41
  /**
23
- * Retrieves Shared Data Model entities count
42
+ * Gets attachment
24
43
  */
25
- export interface WithResourceUrlItemRequestBuilderGetQueryParameters {
44
+ export interface EntityItemRequestBuilderGetQueryParameters {
26
45
  fileName?: string;
27
46
  }
28
47
  /**
29
48
  * Uri template for the request builder.
30
49
  */
31
- export declare const WithResourceUrlItemRequestBuilderUriTemplate = "{+baseurl}/api/sdm/attachments/{resourceUrl}{?fileName*}";
50
+ export declare const EntityItemRequestBuilderUriTemplate = "{+baseurl}/api/sdm/attachments/{entity%2Did}{?fileName*}";
32
51
  /**
33
52
  * Metadata for all the requests in the request builder.
34
53
  */
35
- export declare const WithResourceUrlItemRequestBuilderRequestsMetadata: RequestsMetadata;
54
+ export declare const EntityItemRequestBuilderRequestsMetadata: RequestsMetadata;
@@ -1,21 +1,23 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.WithResourceUrlItemRequestBuilderRequestsMetadata = exports.WithResourceUrlItemRequestBuilderUriTemplate = void 0;
3
+ exports.EntityItemRequestBuilderRequestsMetadata = exports.EntityItemRequestBuilderUriTemplate = void 0;
4
4
  /* tslint:disable */
5
5
  /* eslint-disable */
6
6
  // Generated by Microsoft Kiota
7
7
  // @ts-ignore
8
8
  const index_js_1 = require("../../../../models/index.js");
9
+ // @ts-ignore
10
+ const kiota_abstractions_1 = require("@microsoft/kiota-abstractions");
9
11
  /**
10
12
  * Uri template for the request builder.
11
13
  */
12
- exports.WithResourceUrlItemRequestBuilderUriTemplate = "{+baseurl}/api/sdm/attachments/{resourceUrl}{?fileName*}";
14
+ exports.EntityItemRequestBuilderUriTemplate = "{+baseurl}/api/sdm/attachments/{entity%2Did}{?fileName*}";
13
15
  /**
14
16
  * Metadata for all the requests in the request builder.
15
17
  */
16
- exports.WithResourceUrlItemRequestBuilderRequestsMetadata = {
18
+ exports.EntityItemRequestBuilderRequestsMetadata = {
17
19
  get: {
18
- uriTemplate: exports.WithResourceUrlItemRequestBuilderUriTemplate,
20
+ uriTemplate: exports.EntityItemRequestBuilderUriTemplate,
19
21
  responseBodyContentType: "application/problem+json",
20
22
  errorMappings: {
21
23
  400: index_js_1.createHttpValidationProblemDetailsFromDiscriminatorValue,
@@ -25,6 +27,21 @@ exports.WithResourceUrlItemRequestBuilderRequestsMetadata = {
25
27
  },
26
28
  adapterMethodName: "sendNoResponseContent",
27
29
  },
30
+ post: {
31
+ uriTemplate: exports.EntityItemRequestBuilderUriTemplate,
32
+ responseBodyContentType: "application/json",
33
+ errorMappings: {
34
+ 400: index_js_1.createHttpValidationProblemDetailsFromDiscriminatorValue,
35
+ 401: index_js_1.createProblemDetailsFromDiscriminatorValue,
36
+ 404: index_js_1.createProblemDetailsFromDiscriminatorValue,
37
+ 500: index_js_1.createProblemDetailsFromDiscriminatorValue,
38
+ },
39
+ adapterMethodName: "send",
40
+ responseBodyFactory: index_js_1.createSharedDataCreateAttachmentResponseDtoFromDiscriminatorValue,
41
+ requestBodyContentType: "multipart/form-data",
42
+ requestBodySerializer: kiota_abstractions_1.serializeMultipartBody,
43
+ requestInformationContentSetMethod: "setContentFromParsable",
44
+ },
28
45
  };
29
46
  /* tslint:enable */
30
47
  /* eslint-enable */
@@ -17,6 +17,7 @@ exports.SdmRequestBuilderUriTemplate = "{+baseurl}/api/sdm";
17
17
  */
18
18
  exports.SdmRequestBuilderNavigationMetadata = {
19
19
  byEntityType: {
20
+ requestsMetadata: index_js_2.WithEntityTypeItemRequestBuilderRequestsMetadata,
20
21
  navigationMetadata: index_js_2.WithEntityTypeItemRequestBuilderNavigationMetadata,
21
22
  pathParametersMappings: ["entityType"],
22
23
  },
@@ -1,6 +1,6 @@
1
1
  import { type CountRequestBuilder } from './count/index.js';
2
2
  import { type EntityTypeItemRequestBuilder } from './item/index.js';
3
- import { type BaseRequestBuilder, type KeysToExcludeForNavigationMetadata, type NavigationMetadata } from '@microsoft/kiota-abstractions';
3
+ import { type BaseRequestBuilder, type KeysToExcludeForNavigationMetadata, type NavigationMetadata, type RequestConfiguration, type RequestInformation, type RequestsMetadata, type UntypedNode } from '@microsoft/kiota-abstractions';
4
4
  /**
5
5
  * Builds and executes requests for operations under /api/sdm/{entityType}
6
6
  */
@@ -15,6 +15,24 @@ export interface WithEntityTypeItemRequestBuilder extends BaseRequestBuilder<Wit
15
15
  * @returns {EntityTypeItemRequestBuilder}
16
16
  */
17
17
  byId(id: number): EntityTypeItemRequestBuilder;
18
+ /**
19
+ * Creates or Updates Shared Data Model
20
+ * @param body The request body
21
+ * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
22
+ * @returns {Promise<UntypedNode>}
23
+ * @throws {HttpValidationProblemDetails} error when the service returns a 400 status code
24
+ * @throws {ProblemDetails} error when the service returns a 401 status code
25
+ * @throws {ProblemDetails} error when the service returns a 404 status code
26
+ * @throws {ProblemDetails} error when the service returns a 500 status code
27
+ */
28
+ post(body: UntypedNode, requestConfiguration?: RequestConfiguration<object> | undefined): Promise<UntypedNode | undefined>;
29
+ /**
30
+ * Creates or Updates Shared Data Model
31
+ * @param body The request body
32
+ * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
33
+ * @returns {RequestInformation}
34
+ */
35
+ toPostRequestInformation(body: UntypedNode, requestConfiguration?: RequestConfiguration<object> | undefined): RequestInformation;
18
36
  }
19
37
  /**
20
38
  * Uri template for the request builder.
@@ -24,3 +42,7 @@ export declare const WithEntityTypeItemRequestBuilderUriTemplate = "{+baseurl}/a
24
42
  * Metadata for all the navigation properties in the request builder.
25
43
  */
26
44
  export declare const WithEntityTypeItemRequestBuilderNavigationMetadata: Record<Exclude<keyof WithEntityTypeItemRequestBuilder, KeysToExcludeForNavigationMetadata>, NavigationMetadata>;
45
+ /**
46
+ * Metadata for all the requests in the request builder.
47
+ */
48
+ export declare const WithEntityTypeItemRequestBuilderRequestsMetadata: RequestsMetadata;
@@ -1,13 +1,17 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.WithEntityTypeItemRequestBuilderNavigationMetadata = exports.WithEntityTypeItemRequestBuilderUriTemplate = void 0;
3
+ exports.WithEntityTypeItemRequestBuilderRequestsMetadata = exports.WithEntityTypeItemRequestBuilderNavigationMetadata = exports.WithEntityTypeItemRequestBuilderUriTemplate = void 0;
4
4
  /* tslint:disable */
5
5
  /* eslint-disable */
6
6
  // Generated by Microsoft Kiota
7
7
  // @ts-ignore
8
- const index_js_1 = require("./count/index.js");
8
+ const index_js_1 = require("../../../models/index.js");
9
9
  // @ts-ignore
10
- const index_js_2 = require("./item/index.js");
10
+ const index_js_2 = require("./count/index.js");
11
+ // @ts-ignore
12
+ const index_js_3 = require("./item/index.js");
13
+ // @ts-ignore
14
+ const kiota_abstractions_1 = require("@microsoft/kiota-abstractions");
11
15
  /**
12
16
  * Uri template for the request builder.
13
17
  */
@@ -17,11 +21,30 @@ exports.WithEntityTypeItemRequestBuilderUriTemplate = "{+baseurl}/api/sdm/{entit
17
21
  */
18
22
  exports.WithEntityTypeItemRequestBuilderNavigationMetadata = {
19
23
  byId: {
20
- requestsMetadata: index_js_2.EntityTypeItemRequestBuilderRequestsMetadata,
24
+ requestsMetadata: index_js_3.EntityTypeItemRequestBuilderRequestsMetadata,
21
25
  pathParametersMappings: ["id"],
22
26
  },
23
27
  count: {
24
- requestsMetadata: index_js_1.CountRequestBuilderRequestsMetadata,
28
+ requestsMetadata: index_js_2.CountRequestBuilderRequestsMetadata,
29
+ },
30
+ };
31
+ /**
32
+ * Metadata for all the requests in the request builder.
33
+ */
34
+ exports.WithEntityTypeItemRequestBuilderRequestsMetadata = {
35
+ post: {
36
+ uriTemplate: exports.WithEntityTypeItemRequestBuilderUriTemplate,
37
+ responseBodyContentType: "application/json",
38
+ errorMappings: {
39
+ 400: index_js_1.createHttpValidationProblemDetailsFromDiscriminatorValue,
40
+ 401: index_js_1.createProblemDetailsFromDiscriminatorValue,
41
+ 404: index_js_1.createProblemDetailsFromDiscriminatorValue,
42
+ 500: index_js_1.createProblemDetailsFromDiscriminatorValue,
43
+ },
44
+ adapterMethodName: "send",
45
+ responseBodyFactory: kiota_abstractions_1.createUntypedNodeFromDiscriminatorValue,
46
+ requestBodyContentType: "application/json",
47
+ requestInformationContentSetMethod: "setContentFromScalar",
25
48
  },
26
49
  };
27
50
  /* tslint:enable */
@@ -77,6 +77,18 @@ export declare function createRelationDefRefDtoFromDiscriminatorValue(parseNode:
77
77
  * @returns {RelationDto}
78
78
  */
79
79
  export declare function createRelationDtoFromDiscriminatorValue(parseNode: ParseNode | undefined): ((instance?: Parsable) => Record<string, (node: ParseNode) => void>);
80
+ /**
81
+ * Creates a new instance of the appropriate class based on discriminator value
82
+ * @param parseNode The parse node to use to read the discriminator value and create the object
83
+ * @returns {SharedDataCreateAttachmentResponseDto}
84
+ */
85
+ export declare function createSharedDataCreateAttachmentResponseDtoFromDiscriminatorValue(parseNode: ParseNode | undefined): ((instance?: Parsable) => Record<string, (node: ParseNode) => void>);
86
+ /**
87
+ * Creates a new instance of the appropriate class based on discriminator value
88
+ * @param parseNode The parse node to use to read the discriminator value and create the object
89
+ * @returns {SharedDataCreateAttachmentResponseItemDto}
90
+ */
91
+ export declare function createSharedDataCreateAttachmentResponseItemDtoFromDiscriminatorValue(parseNode: ParseNode | undefined): ((instance?: Parsable) => Record<string, (node: ParseNode) => void>);
80
92
  /**
81
93
  * Creates a new instance of the appropriate class based on discriminator value
82
94
  * @param parseNode The parse node to use to read the discriminator value and create the object
@@ -166,6 +178,16 @@ export declare function deserializeIntoRelationDefRefDto(relationDefRefDto?: Par
166
178
  * @returns {Record<string, (node: ParseNode) => void>}
167
179
  */
168
180
  export declare function deserializeIntoRelationDto(relationDto?: Partial<RelationDto> | undefined): Record<string, (node: ParseNode) => void>;
181
+ /**
182
+ * The deserialization information for the current model
183
+ * @returns {Record<string, (node: ParseNode) => void>}
184
+ */
185
+ export declare function deserializeIntoSharedDataCreateAttachmentResponseDto(sharedDataCreateAttachmentResponseDto?: Partial<SharedDataCreateAttachmentResponseDto> | undefined): Record<string, (node: ParseNode) => void>;
186
+ /**
187
+ * The deserialization information for the current model
188
+ * @returns {Record<string, (node: ParseNode) => void>}
189
+ */
190
+ export declare function deserializeIntoSharedDataCreateAttachmentResponseItemDto(sharedDataCreateAttachmentResponseItemDto?: Partial<SharedDataCreateAttachmentResponseItemDto> | undefined): Record<string, (node: ParseNode) => void>;
169
191
  /**
170
192
  * The deserialization information for the current model
171
193
  * @returns {Record<string, (node: ParseNode) => void>}
@@ -449,6 +471,16 @@ export declare function serializeRelationDefRefDto(writer: SerializationWriter,
449
471
  * @param writer Serialization writer to use to serialize this model
450
472
  */
451
473
  export declare function serializeRelationDto(writer: SerializationWriter, relationDto?: Partial<RelationDto> | undefined | null): void;
474
+ /**
475
+ * Serializes information the current object
476
+ * @param writer Serialization writer to use to serialize this model
477
+ */
478
+ export declare function serializeSharedDataCreateAttachmentResponseDto(writer: SerializationWriter, sharedDataCreateAttachmentResponseDto?: Partial<SharedDataCreateAttachmentResponseDto> | undefined | null): void;
479
+ /**
480
+ * Serializes information the current object
481
+ * @param writer Serialization writer to use to serialize this model
482
+ */
483
+ export declare function serializeSharedDataCreateAttachmentResponseItemDto(writer: SerializationWriter, sharedDataCreateAttachmentResponseItemDto?: Partial<SharedDataCreateAttachmentResponseItemDto> | undefined | null): void;
452
484
  /**
453
485
  * Serializes information the current object
454
486
  * @param writer Serialization writer to use to serialize this model
@@ -469,6 +501,26 @@ export declare function serializeTypeMappingDto(writer: SerializationWriter, typ
469
501
  * @param writer Serialization writer to use to serialize this model
470
502
  */
471
503
  export declare function serializeTypeMetaDefDto(writer: SerializationWriter, typeMetaDefDto?: Partial<TypeMetaDefDto> | undefined | null): void;
504
+ export interface SharedDataCreateAttachmentResponseDto extends Parsable {
505
+ /**
506
+ * The items property
507
+ */
508
+ items?: SharedDataCreateAttachmentResponseItemDto[] | null;
509
+ }
510
+ export interface SharedDataCreateAttachmentResponseItemDto extends Parsable {
511
+ /**
512
+ * The id property
513
+ */
514
+ id?: number | null;
515
+ /**
516
+ * The name property
517
+ */
518
+ name?: string | null;
519
+ /**
520
+ * The uri property
521
+ */
522
+ uri?: string | null;
523
+ }
472
524
  export interface TypeDefDto extends Parsable {
473
525
  /**
474
526
  * The id property
@@ -13,6 +13,8 @@ exports.createProfileDtoFromDiscriminatorValue = createProfileDtoFromDiscriminat
13
13
  exports.createProfileMappingDtoFromDiscriminatorValue = createProfileMappingDtoFromDiscriminatorValue;
14
14
  exports.createRelationDefRefDtoFromDiscriminatorValue = createRelationDefRefDtoFromDiscriminatorValue;
15
15
  exports.createRelationDtoFromDiscriminatorValue = createRelationDtoFromDiscriminatorValue;
16
+ exports.createSharedDataCreateAttachmentResponseDtoFromDiscriminatorValue = createSharedDataCreateAttachmentResponseDtoFromDiscriminatorValue;
17
+ exports.createSharedDataCreateAttachmentResponseItemDtoFromDiscriminatorValue = createSharedDataCreateAttachmentResponseItemDtoFromDiscriminatorValue;
16
18
  exports.createTypeDefDtoFromDiscriminatorValue = createTypeDefDtoFromDiscriminatorValue;
17
19
  exports.createTypeDefRefDtoFromDiscriminatorValue = createTypeDefRefDtoFromDiscriminatorValue;
18
20
  exports.createTypeMappingDtoFromDiscriminatorValue = createTypeMappingDtoFromDiscriminatorValue;
@@ -30,6 +32,8 @@ exports.deserializeIntoProfileDto = deserializeIntoProfileDto;
30
32
  exports.deserializeIntoProfileMappingDto = deserializeIntoProfileMappingDto;
31
33
  exports.deserializeIntoRelationDefRefDto = deserializeIntoRelationDefRefDto;
32
34
  exports.deserializeIntoRelationDto = deserializeIntoRelationDto;
35
+ exports.deserializeIntoSharedDataCreateAttachmentResponseDto = deserializeIntoSharedDataCreateAttachmentResponseDto;
36
+ exports.deserializeIntoSharedDataCreateAttachmentResponseItemDto = deserializeIntoSharedDataCreateAttachmentResponseItemDto;
33
37
  exports.deserializeIntoTypeDefDto = deserializeIntoTypeDefDto;
34
38
  exports.deserializeIntoTypeDefRefDto = deserializeIntoTypeDefRefDto;
35
39
  exports.deserializeIntoTypeMappingDto = deserializeIntoTypeMappingDto;
@@ -47,6 +51,8 @@ exports.serializeProfileDto = serializeProfileDto;
47
51
  exports.serializeProfileMappingDto = serializeProfileMappingDto;
48
52
  exports.serializeRelationDefRefDto = serializeRelationDefRefDto;
49
53
  exports.serializeRelationDto = serializeRelationDto;
54
+ exports.serializeSharedDataCreateAttachmentResponseDto = serializeSharedDataCreateAttachmentResponseDto;
55
+ exports.serializeSharedDataCreateAttachmentResponseItemDto = serializeSharedDataCreateAttachmentResponseItemDto;
50
56
  exports.serializeTypeDefDto = serializeTypeDefDto;
51
57
  exports.serializeTypeDefRefDto = serializeTypeDefRefDto;
52
58
  exports.serializeTypeMappingDto = serializeTypeMappingDto;
@@ -173,6 +179,24 @@ function createRelationDefRefDtoFromDiscriminatorValue(parseNode) {
173
179
  function createRelationDtoFromDiscriminatorValue(parseNode) {
174
180
  return deserializeIntoRelationDto;
175
181
  }
182
+ /**
183
+ * Creates a new instance of the appropriate class based on discriminator value
184
+ * @param parseNode The parse node to use to read the discriminator value and create the object
185
+ * @returns {SharedDataCreateAttachmentResponseDto}
186
+ */
187
+ // @ts-ignore
188
+ function createSharedDataCreateAttachmentResponseDtoFromDiscriminatorValue(parseNode) {
189
+ return deserializeIntoSharedDataCreateAttachmentResponseDto;
190
+ }
191
+ /**
192
+ * Creates a new instance of the appropriate class based on discriminator value
193
+ * @param parseNode The parse node to use to read the discriminator value and create the object
194
+ * @returns {SharedDataCreateAttachmentResponseItemDto}
195
+ */
196
+ // @ts-ignore
197
+ function createSharedDataCreateAttachmentResponseItemDtoFromDiscriminatorValue(parseNode) {
198
+ return deserializeIntoSharedDataCreateAttachmentResponseItemDto;
199
+ }
176
200
  /**
177
201
  * Creates a new instance of the appropriate class based on discriminator value
178
202
  * @param parseNode The parse node to use to read the discriminator value and create the object
@@ -372,6 +396,28 @@ function deserializeIntoRelationDto(relationDto = {}) {
372
396
  * @returns {Record<string, (node: ParseNode) => void>}
373
397
  */
374
398
  // @ts-ignore
399
+ function deserializeIntoSharedDataCreateAttachmentResponseDto(sharedDataCreateAttachmentResponseDto = {}) {
400
+ return {
401
+ "items": n => { sharedDataCreateAttachmentResponseDto.items = n.getCollectionOfObjectValues(createSharedDataCreateAttachmentResponseItemDtoFromDiscriminatorValue); },
402
+ };
403
+ }
404
+ /**
405
+ * The deserialization information for the current model
406
+ * @returns {Record<string, (node: ParseNode) => void>}
407
+ */
408
+ // @ts-ignore
409
+ function deserializeIntoSharedDataCreateAttachmentResponseItemDto(sharedDataCreateAttachmentResponseItemDto = {}) {
410
+ return {
411
+ "id": n => { sharedDataCreateAttachmentResponseItemDto.id = n.getNumberValue(); },
412
+ "name": n => { sharedDataCreateAttachmentResponseItemDto.name = n.getStringValue(); },
413
+ "uri": n => { sharedDataCreateAttachmentResponseItemDto.uri = n.getStringValue(); },
414
+ };
415
+ }
416
+ /**
417
+ * The deserialization information for the current model
418
+ * @returns {Record<string, (node: ParseNode) => void>}
419
+ */
420
+ // @ts-ignore
375
421
  function deserializeIntoTypeDefDto(typeDefDto = {}) {
376
422
  return {
377
423
  "id": n => { typeDefDto.id = n.getStringValue(); },
@@ -583,6 +629,28 @@ function serializeRelationDto(writer, relationDto = {}) {
583
629
  * @param writer Serialization writer to use to serialize this model
584
630
  */
585
631
  // @ts-ignore
632
+ function serializeSharedDataCreateAttachmentResponseDto(writer, sharedDataCreateAttachmentResponseDto = {}) {
633
+ if (sharedDataCreateAttachmentResponseDto) {
634
+ writer.writeCollectionOfObjectValues("items", sharedDataCreateAttachmentResponseDto.items, serializeSharedDataCreateAttachmentResponseItemDto);
635
+ }
636
+ }
637
+ /**
638
+ * Serializes information the current object
639
+ * @param writer Serialization writer to use to serialize this model
640
+ */
641
+ // @ts-ignore
642
+ function serializeSharedDataCreateAttachmentResponseItemDto(writer, sharedDataCreateAttachmentResponseItemDto = {}) {
643
+ if (sharedDataCreateAttachmentResponseItemDto) {
644
+ writer.writeNumberValue("id", sharedDataCreateAttachmentResponseItemDto.id);
645
+ writer.writeStringValue("name", sharedDataCreateAttachmentResponseItemDto.name);
646
+ writer.writeStringValue("uri", sharedDataCreateAttachmentResponseItemDto.uri);
647
+ }
648
+ }
649
+ /**
650
+ * Serializes information the current object
651
+ * @param writer Serialization writer to use to serialize this model
652
+ */
653
+ // @ts-ignore
586
654
  function serializeTypeDefDto(writer, typeDefDto = {}) {
587
655
  if (typeDefDto) {
588
656
  writer.writeStringValue("id", typeDefDto.id);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@targetprocess/shared-data-model-client",
3
- "version": "0.4.0",
3
+ "version": "0.5.0",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -2,7 +2,7 @@
2
2
  /* eslint-disable */
3
3
  // Generated by Microsoft Kiota
4
4
  // @ts-ignore
5
- import { type WithResourceUrlItemRequestBuilder, WithResourceUrlItemRequestBuilderRequestsMetadata } from './item/index.js';
5
+ import { EntityItemRequestBuilderRequestsMetadata, type EntityItemRequestBuilder } from './item/index.js';
6
6
  // @ts-ignore
7
7
  import { type BaseRequestBuilder, type KeysToExcludeForNavigationMetadata, type NavigationMetadata } from '@microsoft/kiota-abstractions';
8
8
 
@@ -12,10 +12,10 @@ import { type BaseRequestBuilder, type KeysToExcludeForNavigationMetadata, type
12
12
  export interface AttachmentsRequestBuilder extends BaseRequestBuilder<AttachmentsRequestBuilder> {
13
13
  /**
14
14
  * Gets an item from the Tp.api.sdm.attachments.item collection
15
- * @param resourceUrl Unique identifier of the item
16
- * @returns {WithResourceUrlItemRequestBuilder}
15
+ * @param entityId Unique identifier of the item
16
+ * @returns {EntityItemRequestBuilder}
17
17
  */
18
- byResourceUrl(resourceUrl: string) : WithResourceUrlItemRequestBuilder;
18
+ byEntityId(entityId: number) : EntityItemRequestBuilder;
19
19
  }
20
20
  /**
21
21
  * Uri template for the request builder.
@@ -25,9 +25,9 @@ export const AttachmentsRequestBuilderUriTemplate = "{+baseurl}/api/sdm/attachme
25
25
  * Metadata for all the navigation properties in the request builder.
26
26
  */
27
27
  export const AttachmentsRequestBuilderNavigationMetadata: Record<Exclude<keyof AttachmentsRequestBuilder, KeysToExcludeForNavigationMetadata>, NavigationMetadata> = {
28
- byResourceUrl: {
29
- requestsMetadata: WithResourceUrlItemRequestBuilderRequestsMetadata,
30
- pathParametersMappings: ["resourceUrl"],
28
+ byEntityId: {
29
+ requestsMetadata: EntityItemRequestBuilderRequestsMetadata,
30
+ pathParametersMappings: ["entity%2Did"],
31
31
  },
32
32
  };
33
33
  /* tslint:enable */
@@ -2,46 +2,64 @@
2
2
  /* eslint-disable */
3
3
  // Generated by Microsoft Kiota
4
4
  // @ts-ignore
5
- import { createHttpValidationProblemDetailsFromDiscriminatorValue, createProblemDetailsFromDiscriminatorValue, type HttpValidationProblemDetails, type ProblemDetails } from '../../../../models/index.js';
5
+ import { createHttpValidationProblemDetailsFromDiscriminatorValue, createProblemDetailsFromDiscriminatorValue, createSharedDataCreateAttachmentResponseDtoFromDiscriminatorValue, type HttpValidationProblemDetails, type ProblemDetails, type SharedDataCreateAttachmentResponseDto } from '../../../../models/index.js';
6
6
  // @ts-ignore
7
- import { type BaseRequestBuilder, type Parsable, type ParsableFactory, type RequestConfiguration, type RequestInformation, type RequestsMetadata } from '@microsoft/kiota-abstractions';
7
+ import { MultipartBody, serializeMultipartBody, type BaseRequestBuilder, type Parsable, type ParsableFactory, type RequestConfiguration, type RequestInformation, type RequestsMetadata } from '@microsoft/kiota-abstractions';
8
8
 
9
9
  /**
10
- * Builds and executes requests for operations under /api/sdm/attachments/{resourceUrl}
10
+ * Builds and executes requests for operations under /api/sdm/attachments/{entity-id}
11
11
  */
12
- export interface WithResourceUrlItemRequestBuilder extends BaseRequestBuilder<WithResourceUrlItemRequestBuilder> {
12
+ export interface EntityItemRequestBuilder extends BaseRequestBuilder<EntityItemRequestBuilder> {
13
13
  /**
14
- * Retrieves Shared Data Model entities count
14
+ * Gets attachment
15
15
  * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
16
16
  * @throws {HttpValidationProblemDetails} error when the service returns a 400 status code
17
17
  * @throws {ProblemDetails} error when the service returns a 401 status code
18
18
  * @throws {ProblemDetails} error when the service returns a 404 status code
19
19
  * @throws {ProblemDetails} error when the service returns a 500 status code
20
20
  */
21
- get(requestConfiguration?: RequestConfiguration<WithResourceUrlItemRequestBuilderGetQueryParameters> | undefined) : Promise<void>;
21
+ get(requestConfiguration?: RequestConfiguration<EntityItemRequestBuilderGetQueryParameters> | undefined) : Promise<void>;
22
22
  /**
23
- * Retrieves Shared Data Model entities count
23
+ * Uploads attachments to entity
24
+ * @param body The request body
25
+ * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
26
+ * @returns {Promise<SharedDataCreateAttachmentResponseDto>}
27
+ * @throws {HttpValidationProblemDetails} error when the service returns a 400 status code
28
+ * @throws {ProblemDetails} error when the service returns a 401 status code
29
+ * @throws {ProblemDetails} error when the service returns a 404 status code
30
+ * @throws {ProblemDetails} error when the service returns a 500 status code
31
+ */
32
+ post(body: MultipartBody, requestConfiguration?: RequestConfiguration<object> | undefined) : Promise<SharedDataCreateAttachmentResponseDto | undefined>;
33
+ /**
34
+ * Gets attachment
35
+ * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
36
+ * @returns {RequestInformation}
37
+ */
38
+ toGetRequestInformation(requestConfiguration?: RequestConfiguration<EntityItemRequestBuilderGetQueryParameters> | undefined) : RequestInformation;
39
+ /**
40
+ * Uploads attachments to entity
41
+ * @param body The request body
24
42
  * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
25
43
  * @returns {RequestInformation}
26
44
  */
27
- toGetRequestInformation(requestConfiguration?: RequestConfiguration<WithResourceUrlItemRequestBuilderGetQueryParameters> | undefined) : RequestInformation;
45
+ toPostRequestInformation(body: MultipartBody, requestConfiguration?: RequestConfiguration<object> | undefined) : RequestInformation;
28
46
  }
29
47
  /**
30
- * Retrieves Shared Data Model entities count
48
+ * Gets attachment
31
49
  */
32
- export interface WithResourceUrlItemRequestBuilderGetQueryParameters {
50
+ export interface EntityItemRequestBuilderGetQueryParameters {
33
51
  fileName?: string;
34
52
  }
35
53
  /**
36
54
  * Uri template for the request builder.
37
55
  */
38
- export const WithResourceUrlItemRequestBuilderUriTemplate = "{+baseurl}/api/sdm/attachments/{resourceUrl}{?fileName*}";
56
+ export const EntityItemRequestBuilderUriTemplate = "{+baseurl}/api/sdm/attachments/{entity%2Did}{?fileName*}";
39
57
  /**
40
58
  * Metadata for all the requests in the request builder.
41
59
  */
42
- export const WithResourceUrlItemRequestBuilderRequestsMetadata: RequestsMetadata = {
60
+ export const EntityItemRequestBuilderRequestsMetadata: RequestsMetadata = {
43
61
  get: {
44
- uriTemplate: WithResourceUrlItemRequestBuilderUriTemplate,
62
+ uriTemplate: EntityItemRequestBuilderUriTemplate,
45
63
  responseBodyContentType: "application/problem+json",
46
64
  errorMappings: {
47
65
  400: createHttpValidationProblemDetailsFromDiscriminatorValue as ParsableFactory<Parsable>,
@@ -51,6 +69,21 @@ export const WithResourceUrlItemRequestBuilderRequestsMetadata: RequestsMetadata
51
69
  },
52
70
  adapterMethodName: "sendNoResponseContent",
53
71
  },
72
+ post: {
73
+ uriTemplate: EntityItemRequestBuilderUriTemplate,
74
+ responseBodyContentType: "application/json",
75
+ errorMappings: {
76
+ 400: createHttpValidationProblemDetailsFromDiscriminatorValue as ParsableFactory<Parsable>,
77
+ 401: createProblemDetailsFromDiscriminatorValue as ParsableFactory<Parsable>,
78
+ 404: createProblemDetailsFromDiscriminatorValue as ParsableFactory<Parsable>,
79
+ 500: createProblemDetailsFromDiscriminatorValue as ParsableFactory<Parsable>,
80
+ },
81
+ adapterMethodName: "send",
82
+ responseBodyFactory: createSharedDataCreateAttachmentResponseDtoFromDiscriminatorValue,
83
+ requestBodyContentType: "multipart/form-data",
84
+ requestBodySerializer: serializeMultipartBody,
85
+ requestInformationContentSetMethod: "setContentFromParsable",
86
+ },
54
87
  };
55
88
  /* tslint:enable */
56
89
  /* eslint-enable */
@@ -4,7 +4,7 @@
4
4
  // @ts-ignore
5
5
  import { AttachmentsRequestBuilderNavigationMetadata, type AttachmentsRequestBuilder } from './attachments/index.js';
6
6
  // @ts-ignore
7
- import { type WithEntityTypeItemRequestBuilder, WithEntityTypeItemRequestBuilderNavigationMetadata } from './item/index.js';
7
+ import { type WithEntityTypeItemRequestBuilder, WithEntityTypeItemRequestBuilderNavigationMetadata, WithEntityTypeItemRequestBuilderRequestsMetadata } from './item/index.js';
8
8
  // @ts-ignore
9
9
  import { type BaseRequestBuilder, type KeysToExcludeForNavigationMetadata, type NavigationMetadata } from '@microsoft/kiota-abstractions';
10
10
 
@@ -32,6 +32,7 @@ export const SdmRequestBuilderUriTemplate = "{+baseurl}/api/sdm";
32
32
  */
33
33
  export const SdmRequestBuilderNavigationMetadata: Record<Exclude<keyof SdmRequestBuilder, KeysToExcludeForNavigationMetadata>, NavigationMetadata> = {
34
34
  byEntityType: {
35
+ requestsMetadata: WithEntityTypeItemRequestBuilderRequestsMetadata,
35
36
  navigationMetadata: WithEntityTypeItemRequestBuilderNavigationMetadata,
36
37
  pathParametersMappings: ["entityType"],
37
38
  },
@@ -2,11 +2,13 @@
2
2
  /* eslint-disable */
3
3
  // Generated by Microsoft Kiota
4
4
  // @ts-ignore
5
+ import { createHttpValidationProblemDetailsFromDiscriminatorValue, createProblemDetailsFromDiscriminatorValue, type HttpValidationProblemDetails, type ProblemDetails } from '../../../models/index.js';
6
+ // @ts-ignore
5
7
  import { CountRequestBuilderRequestsMetadata, type CountRequestBuilder } from './count/index.js';
6
8
  // @ts-ignore
7
9
  import { EntityTypeItemRequestBuilderRequestsMetadata, type EntityTypeItemRequestBuilder } from './item/index.js';
8
10
  // @ts-ignore
9
- import { type BaseRequestBuilder, type KeysToExcludeForNavigationMetadata, type NavigationMetadata } from '@microsoft/kiota-abstractions';
11
+ import { createUntypedNodeFromDiscriminatorValue, type BaseRequestBuilder, type KeysToExcludeForNavigationMetadata, type NavigationMetadata, type Parsable, type ParsableFactory, type RequestConfiguration, type RequestInformation, type RequestsMetadata, type UntypedNode } from '@microsoft/kiota-abstractions';
10
12
 
11
13
  /**
12
14
  * Builds and executes requests for operations under /api/sdm/{entityType}
@@ -22,6 +24,24 @@ export interface WithEntityTypeItemRequestBuilder extends BaseRequestBuilder<Wit
22
24
  * @returns {EntityTypeItemRequestBuilder}
23
25
  */
24
26
  byId(id: number) : EntityTypeItemRequestBuilder;
27
+ /**
28
+ * Creates or Updates Shared Data Model
29
+ * @param body The request body
30
+ * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
31
+ * @returns {Promise<UntypedNode>}
32
+ * @throws {HttpValidationProblemDetails} error when the service returns a 400 status code
33
+ * @throws {ProblemDetails} error when the service returns a 401 status code
34
+ * @throws {ProblemDetails} error when the service returns a 404 status code
35
+ * @throws {ProblemDetails} error when the service returns a 500 status code
36
+ */
37
+ post(body: UntypedNode, requestConfiguration?: RequestConfiguration<object> | undefined) : Promise<UntypedNode | undefined>;
38
+ /**
39
+ * Creates or Updates Shared Data Model
40
+ * @param body The request body
41
+ * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
42
+ * @returns {RequestInformation}
43
+ */
44
+ toPostRequestInformation(body: UntypedNode, requestConfiguration?: RequestConfiguration<object> | undefined) : RequestInformation;
25
45
  }
26
46
  /**
27
47
  * Uri template for the request builder.
@@ -39,5 +59,24 @@ export const WithEntityTypeItemRequestBuilderNavigationMetadata: Record<Exclude<
39
59
  requestsMetadata: CountRequestBuilderRequestsMetadata,
40
60
  },
41
61
  };
62
+ /**
63
+ * Metadata for all the requests in the request builder.
64
+ */
65
+ export const WithEntityTypeItemRequestBuilderRequestsMetadata: RequestsMetadata = {
66
+ post: {
67
+ uriTemplate: WithEntityTypeItemRequestBuilderUriTemplate,
68
+ responseBodyContentType: "application/json",
69
+ errorMappings: {
70
+ 400: createHttpValidationProblemDetailsFromDiscriminatorValue as ParsableFactory<Parsable>,
71
+ 401: createProblemDetailsFromDiscriminatorValue as ParsableFactory<Parsable>,
72
+ 404: createProblemDetailsFromDiscriminatorValue as ParsableFactory<Parsable>,
73
+ 500: createProblemDetailsFromDiscriminatorValue as ParsableFactory<Parsable>,
74
+ },
75
+ adapterMethodName: "send",
76
+ responseBodyFactory: createUntypedNodeFromDiscriminatorValue,
77
+ requestBodyContentType: "application/json",
78
+ requestInformationContentSetMethod: "setContentFromScalar",
79
+ },
80
+ };
42
81
  /* tslint:enable */
43
82
  /* eslint-enable */
@@ -1,5 +1,5 @@
1
1
  {
2
- "descriptionHash": "B51D839D313A0E0705E374F084DCF6909F09E22DD4A48722E460764182A7F784823402BB96546CFADA8CA5CA71D0580C0E26AAD700A8683CC460DD6B85CFAAC9",
2
+ "descriptionHash": "C3F6D3F8FB77AFEF885CDC82CE77A498F8EA391FB20488FD36F21E979332BC86353956B09178D734C79A6C64313121B831F27D8B2D9A048ACFBA765318E942DE",
3
3
  "descriptionLocation": "v1.json",
4
4
  "lockFileVersion": "1.0.0",
5
5
  "kiotaVersion": "1.22.3",
@@ -121,6 +121,24 @@ export function createRelationDefRefDtoFromDiscriminatorValue(parseNode: ParseNo
121
121
  export function createRelationDtoFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {
122
122
  return deserializeIntoRelationDto;
123
123
  }
124
+ /**
125
+ * Creates a new instance of the appropriate class based on discriminator value
126
+ * @param parseNode The parse node to use to read the discriminator value and create the object
127
+ * @returns {SharedDataCreateAttachmentResponseDto}
128
+ */
129
+ // @ts-ignore
130
+ export function createSharedDataCreateAttachmentResponseDtoFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {
131
+ return deserializeIntoSharedDataCreateAttachmentResponseDto;
132
+ }
133
+ /**
134
+ * Creates a new instance of the appropriate class based on discriminator value
135
+ * @param parseNode The parse node to use to read the discriminator value and create the object
136
+ * @returns {SharedDataCreateAttachmentResponseItemDto}
137
+ */
138
+ // @ts-ignore
139
+ export function createSharedDataCreateAttachmentResponseItemDtoFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {
140
+ return deserializeIntoSharedDataCreateAttachmentResponseItemDto;
141
+ }
124
142
  /**
125
143
  * Creates a new instance of the appropriate class based on discriminator value
126
144
  * @param parseNode The parse node to use to read the discriminator value and create the object
@@ -321,6 +339,28 @@ export function deserializeIntoRelationDto(relationDto: Partial<RelationDto> | u
321
339
  * @returns {Record<string, (node: ParseNode) => void>}
322
340
  */
323
341
  // @ts-ignore
342
+ export function deserializeIntoSharedDataCreateAttachmentResponseDto(sharedDataCreateAttachmentResponseDto: Partial<SharedDataCreateAttachmentResponseDto> | undefined = {}) : Record<string, (node: ParseNode) => void> {
343
+ return {
344
+ "items": n => { sharedDataCreateAttachmentResponseDto.items = n.getCollectionOfObjectValues<SharedDataCreateAttachmentResponseItemDto>(createSharedDataCreateAttachmentResponseItemDtoFromDiscriminatorValue); },
345
+ }
346
+ }
347
+ /**
348
+ * The deserialization information for the current model
349
+ * @returns {Record<string, (node: ParseNode) => void>}
350
+ */
351
+ // @ts-ignore
352
+ export function deserializeIntoSharedDataCreateAttachmentResponseItemDto(sharedDataCreateAttachmentResponseItemDto: Partial<SharedDataCreateAttachmentResponseItemDto> | undefined = {}) : Record<string, (node: ParseNode) => void> {
353
+ return {
354
+ "id": n => { sharedDataCreateAttachmentResponseItemDto.id = n.getNumberValue(); },
355
+ "name": n => { sharedDataCreateAttachmentResponseItemDto.name = n.getStringValue(); },
356
+ "uri": n => { sharedDataCreateAttachmentResponseItemDto.uri = n.getStringValue(); },
357
+ }
358
+ }
359
+ /**
360
+ * The deserialization information for the current model
361
+ * @returns {Record<string, (node: ParseNode) => void>}
362
+ */
363
+ // @ts-ignore
324
364
  export function deserializeIntoTypeDefDto(typeDefDto: Partial<TypeDefDto> | undefined = {}) : Record<string, (node: ParseNode) => void> {
325
365
  return {
326
366
  "id": n => { typeDefDto.id = n.getStringValue(); },
@@ -730,6 +770,28 @@ export function serializeRelationDto(writer: SerializationWriter, relationDto: P
730
770
  * @param writer Serialization writer to use to serialize this model
731
771
  */
732
772
  // @ts-ignore
773
+ export function serializeSharedDataCreateAttachmentResponseDto(writer: SerializationWriter, sharedDataCreateAttachmentResponseDto: Partial<SharedDataCreateAttachmentResponseDto> | undefined | null = {}) : void {
774
+ if (sharedDataCreateAttachmentResponseDto) {
775
+ writer.writeCollectionOfObjectValues<SharedDataCreateAttachmentResponseItemDto>("items", sharedDataCreateAttachmentResponseDto.items, serializeSharedDataCreateAttachmentResponseItemDto);
776
+ }
777
+ }
778
+ /**
779
+ * Serializes information the current object
780
+ * @param writer Serialization writer to use to serialize this model
781
+ */
782
+ // @ts-ignore
783
+ export function serializeSharedDataCreateAttachmentResponseItemDto(writer: SerializationWriter, sharedDataCreateAttachmentResponseItemDto: Partial<SharedDataCreateAttachmentResponseItemDto> | undefined | null = {}) : void {
784
+ if (sharedDataCreateAttachmentResponseItemDto) {
785
+ writer.writeNumberValue("id", sharedDataCreateAttachmentResponseItemDto.id);
786
+ writer.writeStringValue("name", sharedDataCreateAttachmentResponseItemDto.name);
787
+ writer.writeStringValue("uri", sharedDataCreateAttachmentResponseItemDto.uri);
788
+ }
789
+ }
790
+ /**
791
+ * Serializes information the current object
792
+ * @param writer Serialization writer to use to serialize this model
793
+ */
794
+ // @ts-ignore
733
795
  export function serializeTypeDefDto(writer: SerializationWriter, typeDefDto: Partial<TypeDefDto> | undefined | null = {}) : void {
734
796
  if (typeDefDto) {
735
797
  writer.writeStringValue("id", typeDefDto.id);
@@ -775,6 +837,26 @@ export function serializeTypeMetaDefDto(writer: SerializationWriter, typeMetaDef
775
837
  writer.writeStringValue("name", typeMetaDefDto.name);
776
838
  }
777
839
  }
840
+ export interface SharedDataCreateAttachmentResponseDto extends Parsable {
841
+ /**
842
+ * The items property
843
+ */
844
+ items?: SharedDataCreateAttachmentResponseItemDto[] | null;
845
+ }
846
+ export interface SharedDataCreateAttachmentResponseItemDto extends Parsable {
847
+ /**
848
+ * The id property
849
+ */
850
+ id?: number | null;
851
+ /**
852
+ * The name property
853
+ */
854
+ name?: string | null;
855
+ /**
856
+ * The uri property
857
+ */
858
+ uri?: string | null;
859
+ }
778
860
  export interface TypeDefDto extends Parsable {
779
861
  /**
780
862
  * The id property
package/src/v1.json CHANGED
@@ -6,6 +6,95 @@
6
6
  "version": "v1"
7
7
  },
8
8
  "paths": {
9
+ "/api/sdm/{entityType}": {
10
+ "post": {
11
+ "tags": [
12
+ "Sdm"
13
+ ],
14
+ "summary": "Creates or Updates Shared Data Model",
15
+ "operationId": "SharedDataPostEndpoint",
16
+ "parameters": [
17
+ {
18
+ "name": "entityType",
19
+ "in": "path",
20
+ "required": true,
21
+ "schema": {
22
+ "type": "string"
23
+ }
24
+ }
25
+ ],
26
+ "requestBody": {
27
+ "x-name": "payload",
28
+ "content": {
29
+ "application/json": {
30
+ "schema": {}
31
+ }
32
+ },
33
+ "required": true
34
+ },
35
+ "responses": {
36
+ "200": {
37
+ "description": "Success",
38
+ "content": {
39
+ "application/json": {
40
+ "schema": {}
41
+ }
42
+ }
43
+ },
44
+ "401": {
45
+ "description": "Unauthorized",
46
+ "content": {
47
+ "application/problem+json": {
48
+ "schema": {
49
+ "$ref": "#/components/schemas/ProblemDetails"
50
+ }
51
+ }
52
+ }
53
+ },
54
+ "403": {
55
+ "description": "Forbidden"
56
+ },
57
+ "400": {
58
+ "description": "Validation error",
59
+ "content": {
60
+ "application/problem+json": {
61
+ "schema": {
62
+ "$ref": "#/components/schemas/HttpValidationProblemDetails"
63
+ }
64
+ }
65
+ }
66
+ },
67
+ "500": {
68
+ "description": "Internal server error",
69
+ "content": {
70
+ "application/problem+json": {
71
+ "schema": {
72
+ "$ref": "#/components/schemas/ProblemDetails"
73
+ }
74
+ }
75
+ }
76
+ },
77
+ "404": {
78
+ "description": "Unable to find resource",
79
+ "content": {
80
+ "application/problem+json": {
81
+ "schema": {
82
+ "$ref": "#/components/schemas/ProblemDetails"
83
+ }
84
+ }
85
+ }
86
+ }
87
+ },
88
+ "security": [
89
+ {
90
+ "JWTBearerAuth": []
91
+ },
92
+ {
93
+ "OAuth2": []
94
+ }
95
+ ]
96
+ }
97
+ },
9
98
  "/api/sdm/{entityType}/{id}": {
10
99
  "get": {
11
100
  "tags": [
@@ -272,12 +361,108 @@
272
361
  ]
273
362
  }
274
363
  },
364
+ "/api/sdm/attachments/{entityId}": {
365
+ "post": {
366
+ "tags": [
367
+ "Sdm"
368
+ ],
369
+ "summary": "Uploads attachments to entity",
370
+ "operationId": "SharedDataCreateAttachmentEndpoint",
371
+ "parameters": [
372
+ {
373
+ "name": "entityId",
374
+ "in": "path",
375
+ "required": true,
376
+ "schema": {
377
+ "type": "integer",
378
+ "format": "int32"
379
+ }
380
+ }
381
+ ],
382
+ "requestBody": {
383
+ "x-name": "SharedDataCreateAttachmentRequestDto",
384
+ "description": "",
385
+ "content": {
386
+ "multipart/form-data": {
387
+ "schema": {
388
+ "$ref": "#/components/schemas/SharedDataCreateAttachmentRequestDto"
389
+ }
390
+ }
391
+ },
392
+ "required": true,
393
+ "x-position": 1
394
+ },
395
+ "responses": {
396
+ "200": {
397
+ "description": "Success",
398
+ "content": {
399
+ "application/json": {
400
+ "schema": {
401
+ "$ref": "#/components/schemas/SharedDataCreateAttachmentResponseDto"
402
+ }
403
+ }
404
+ }
405
+ },
406
+ "401": {
407
+ "description": "Unauthorized",
408
+ "content": {
409
+ "application/problem+json": {
410
+ "schema": {
411
+ "$ref": "#/components/schemas/ProblemDetails"
412
+ }
413
+ }
414
+ }
415
+ },
416
+ "403": {
417
+ "description": "Forbidden"
418
+ },
419
+ "400": {
420
+ "description": "Validation error",
421
+ "content": {
422
+ "application/problem+json": {
423
+ "schema": {
424
+ "$ref": "#/components/schemas/HttpValidationProblemDetails"
425
+ }
426
+ }
427
+ }
428
+ },
429
+ "500": {
430
+ "description": "Internal server error",
431
+ "content": {
432
+ "application/problem+json": {
433
+ "schema": {
434
+ "$ref": "#/components/schemas/ProblemDetails"
435
+ }
436
+ }
437
+ }
438
+ },
439
+ "404": {
440
+ "description": "Unable to find resource",
441
+ "content": {
442
+ "application/problem+json": {
443
+ "schema": {
444
+ "$ref": "#/components/schemas/ProblemDetails"
445
+ }
446
+ }
447
+ }
448
+ }
449
+ },
450
+ "security": [
451
+ {
452
+ "JWTBearerAuth": []
453
+ },
454
+ {
455
+ "OAuth2": []
456
+ }
457
+ ]
458
+ }
459
+ },
275
460
  "/api/sdm/attachments/{resourceUrl}": {
276
461
  "get": {
277
462
  "tags": [
278
463
  "Sdm"
279
464
  ],
280
- "summary": "Retrieves Shared Data Model entities count",
465
+ "summary": "Gets attachment",
281
466
  "operationId": "SharedDataAttachmentEndpoint",
282
467
  "parameters": [
283
468
  {
@@ -649,6 +834,58 @@
649
834
  "type": "object",
650
835
  "additionalProperties": false
651
836
  },
837
+ "SharedDataCreateAttachmentResponseDto": {
838
+ "type": "object",
839
+ "additionalProperties": false,
840
+ "required": [
841
+ "items"
842
+ ],
843
+ "properties": {
844
+ "items": {
845
+ "type": "array",
846
+ "items": {
847
+ "$ref": "#/components/schemas/SharedDataCreateAttachmentResponseItemDto"
848
+ }
849
+ }
850
+ }
851
+ },
852
+ "SharedDataCreateAttachmentResponseItemDto": {
853
+ "type": "object",
854
+ "additionalProperties": false,
855
+ "required": [
856
+ "id",
857
+ "uri",
858
+ "name"
859
+ ],
860
+ "properties": {
861
+ "id": {
862
+ "type": "integer",
863
+ "format": "int32"
864
+ },
865
+ "uri": {
866
+ "type": "string"
867
+ },
868
+ "name": {
869
+ "type": "string"
870
+ }
871
+ }
872
+ },
873
+ "SharedDataCreateAttachmentRequestDto": {
874
+ "type": "object",
875
+ "additionalProperties": false,
876
+ "required": [
877
+ "file"
878
+ ],
879
+ "properties": {
880
+ "file": {
881
+ "type": "array",
882
+ "items": {
883
+ "type": "string",
884
+ "format": "binary"
885
+ }
886
+ }
887
+ }
888
+ },
652
889
  "SharedDataAttachmentRequestDto": {
653
890
  "type": "object",
654
891
  "additionalProperties": false