@rixl/sdk 0.1.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.
- package/LICENSE +21 -0
- package/README.md +153 -0
- package/dist/feeds/index.d.ts +21 -0
- package/dist/feeds/index.js +21 -0
- package/dist/feeds/item/creators/index.d.ts +21 -0
- package/dist/feeds/item/creators/index.js +20 -0
- package/dist/feeds/item/creators/item/index.d.ts +42 -0
- package/dist/feeds/item/creators/item/index.js +28 -0
- package/dist/feeds/item/index.d.ts +58 -0
- package/dist/feeds/item/index.js +44 -0
- package/dist/feeds/item/item/index.d.ts +29 -0
- package/dist/feeds/item/item/index.js +28 -0
- package/dist/images/index.d.ts +68 -0
- package/dist/images/index.js +46 -0
- package/dist/images/item/index.d.ts +48 -0
- package/dist/images/item/index.js +43 -0
- package/dist/images/upload/complete/index.d.ts +35 -0
- package/dist/images/upload/complete/index.js +36 -0
- package/dist/images/upload/index.d.ts +24 -0
- package/dist/images/upload/index.js +24 -0
- package/dist/images/upload/init/index.d.ts +33 -0
- package/dist/images/upload/init/index.js +33 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +5 -0
- package/dist/models/github_com_rixlhq_api_db_sqlc/index.d.ts +13 -0
- package/dist/models/github_com_rixlhq_api_db_sqlc/index.js +16 -0
- package/dist/models/github_com_rixlhq_api_internal_errors/index.d.ts +37 -0
- package/dist/models/github_com_rixlhq_api_internal_errors/index.js +40 -0
- package/dist/models/github_com_rixlhq_api_internal_videos/index.d.ts +72 -0
- package/dist/models/github_com_rixlhq_api_internal_videos/index.js +65 -0
- package/dist/models/github_com_rixlhq_api_internal_videos_handler_upload/index.d.ts +70 -0
- package/dist/models/github_com_rixlhq_api_internal_videos_handler_upload/index.js +78 -0
- package/dist/models/github_com_rixlhq_api_internal_videos_types/index.d.ts +30 -0
- package/dist/models/github_com_rixlhq_api_internal_videos_types/index.js +38 -0
- package/dist/models/index.d.ts +548 -0
- package/dist/models/index.js +543 -0
- package/dist/models/internal_images_handler/index.d.ts +98 -0
- package/dist/models/internal_images_handler/index.js +112 -0
- package/dist/models/internal_videos_handler_subtitles/index.d.ts +30 -0
- package/dist/models/internal_videos_handler_subtitles/index.js +38 -0
- package/dist/models/pagination/index.d.ts +125 -0
- package/dist/models/pagination/index.js +153 -0
- package/dist/rixlClient.d.ts +34 -0
- package/dist/rixlClient.js +69 -0
- package/dist/videos/index.d.ts +73 -0
- package/dist/videos/index.js +52 -0
- package/dist/videos/item/audioTracks/index.d.ts +38 -0
- package/dist/videos/item/audioTracks/index.js +33 -0
- package/dist/videos/item/audioTracks/item/index.d.ts +70 -0
- package/dist/videos/item/audioTracks/item/index.js +67 -0
- package/dist/videos/item/chapters/index.d.ts +50 -0
- package/dist/videos/item/chapters/index.js +46 -0
- package/dist/videos/item/delete/index.d.ts +30 -0
- package/dist/videos/item/delete/index.js +28 -0
- package/dist/videos/item/index.d.ts +61 -0
- package/dist/videos/item/index.js +63 -0
- package/dist/videos/item/subtitles/index.d.ts +38 -0
- package/dist/videos/item/subtitles/index.js +33 -0
- package/dist/videos/item/subtitles/item/index.d.ts +70 -0
- package/dist/videos/item/subtitles/item/index.js +67 -0
- package/dist/videos/item/thumbnail/index.d.ts +59 -0
- package/dist/videos/item/thumbnail/index.js +68 -0
- package/dist/videos/languages/index.d.ts +27 -0
- package/dist/videos/languages/index.js +22 -0
- package/dist/videos/upload/complete/index.d.ts +35 -0
- package/dist/videos/upload/complete/index.js +36 -0
- package/dist/videos/upload/index.d.ts +24 -0
- package/dist/videos/upload/index.js +24 -0
- package/dist/videos/upload/init/index.d.ts +34 -0
- package/dist/videos/upload/init/index.js +35 -0
- package/package.json +47 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 RIXL Inc.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
# @rixl/sdk
|
|
2
|
+
|
|
3
|
+
Official TypeScript / JavaScript SDK for the [Rixl](https://rixl.com) REST API.
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/@rixl/sdk)
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install @rixl/sdk @microsoft/kiota-http-fetchlibrary
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Requires Node.js 18+. ESM only — use `import`, not `require`.
|
|
14
|
+
|
|
15
|
+
## Quick start
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
import { createRixlClient } from "@rixl/sdk";
|
|
19
|
+
import { FetchRequestAdapter } from "@microsoft/kiota-http-fetchlibrary";
|
|
20
|
+
import { ApiKeyAuthenticationProvider } from "@microsoft/kiota-abstractions";
|
|
21
|
+
|
|
22
|
+
const auth = new ApiKeyAuthenticationProvider(
|
|
23
|
+
"YOUR_RIXL_API_KEY", "X-API-Key", "header",
|
|
24
|
+
);
|
|
25
|
+
const adapter = new FetchRequestAdapter(auth);
|
|
26
|
+
const client = createRixlClient(adapter);
|
|
27
|
+
|
|
28
|
+
const image = await client.images.byImageId("PS5IMKoFLm").get();
|
|
29
|
+
console.log(image?.id, image?.width, image?.height);
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Default base URL: `https://api.rixl.com`. Override with `adapter.baseUrl = "..."`.
|
|
33
|
+
|
|
34
|
+
## Authentication
|
|
35
|
+
|
|
36
|
+
API key:
|
|
37
|
+
|
|
38
|
+
```ts
|
|
39
|
+
import { ApiKeyAuthenticationProvider } from "@microsoft/kiota-abstractions";
|
|
40
|
+
|
|
41
|
+
const auth = new ApiKeyAuthenticationProvider(
|
|
42
|
+
"YOUR_RIXL_API_KEY", "X-API-Key", "header",
|
|
43
|
+
);
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Bearer token: implement `AccessTokenProvider`, pass to `new BaseBearerTokenAuthenticationProvider(tokenProvider)`.
|
|
47
|
+
|
|
48
|
+
## Feeds
|
|
49
|
+
|
|
50
|
+
```ts
|
|
51
|
+
const posts = await client.feeds.byFeedId("FD4y3QB38S").get();
|
|
52
|
+
for (const post of posts?.data ?? []) {
|
|
53
|
+
console.log(post.id);
|
|
54
|
+
}
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Images
|
|
58
|
+
|
|
59
|
+
```ts
|
|
60
|
+
const page = await client.images.get();
|
|
61
|
+
const image = await client.images.byImageId("PS5IMKoFLm").get();
|
|
62
|
+
await client.images.byImageId("PS5IMKoFLm").delete();
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Upload (init → PUT bytes → complete):
|
|
66
|
+
|
|
67
|
+
```ts
|
|
68
|
+
const initRes = await client.images.upload.init.post({
|
|
69
|
+
name: "photo.jpg",
|
|
70
|
+
format: "jpeg",
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
await fetch(initRes.presignedUrl, {
|
|
74
|
+
method: "PUT",
|
|
75
|
+
body: imageBytes,
|
|
76
|
+
headers: { "Content-Type": "image/jpeg" },
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
const image = await client.images.upload.complete.post({
|
|
80
|
+
imageId: initRes.imageId,
|
|
81
|
+
attachedToVideo: false,
|
|
82
|
+
});
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## Videos
|
|
86
|
+
|
|
87
|
+
```ts
|
|
88
|
+
const videos = await client.videos.get();
|
|
89
|
+
const video = await client.videos.byVideoId("VI9VXQxWXQ").get();
|
|
90
|
+
const tracks = await client.videos.byVideoId("VI9VXQxWXQ").subtitles.get();
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Upload returns presigned URLs for both the video and a poster image:
|
|
94
|
+
|
|
95
|
+
```ts
|
|
96
|
+
const initRes = await client.videos.upload.init.post({
|
|
97
|
+
fileName: "clip.mp4",
|
|
98
|
+
imageFormat: "jpeg",
|
|
99
|
+
});
|
|
100
|
+
// PUT bytes to initRes.videoPresignedUrl and initRes.posterPresignedUrl
|
|
101
|
+
|
|
102
|
+
const video = await client.videos.upload.complete.post({
|
|
103
|
+
videoId: initRes.videoId,
|
|
104
|
+
});
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## Pagination
|
|
108
|
+
|
|
109
|
+
List endpoints take `limit`, `offset`, `sort`, `order`:
|
|
110
|
+
|
|
111
|
+
```ts
|
|
112
|
+
let offset = 0;
|
|
113
|
+
const limit = 50;
|
|
114
|
+
|
|
115
|
+
while (true) {
|
|
116
|
+
const page = await client.images.get({
|
|
117
|
+
queryParameters: { limit, offset, sort: "created_at", order: "desc" },
|
|
118
|
+
});
|
|
119
|
+
const total = page?.pagination?.total ?? 0;
|
|
120
|
+
offset += limit;
|
|
121
|
+
if (offset >= total) break;
|
|
122
|
+
}
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
## Errors
|
|
126
|
+
|
|
127
|
+
```ts
|
|
128
|
+
import { ErrorResponse } from "@rixl/sdk";
|
|
129
|
+
|
|
130
|
+
try {
|
|
131
|
+
const image = await client.images.byImageId("PS5IMKoFLm").get();
|
|
132
|
+
} catch (err) {
|
|
133
|
+
if (err instanceof ErrorResponse) {
|
|
134
|
+
console.error(`HTTP ${err.code}: ${err.errorEscaped}`);
|
|
135
|
+
}
|
|
136
|
+
throw err;
|
|
137
|
+
}
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
## Examples
|
|
141
|
+
|
|
142
|
+
Runnable demos in [examples/](./examples):
|
|
143
|
+
|
|
144
|
+
```bash
|
|
145
|
+
cd examples && npm install
|
|
146
|
+
export RIXL_API_KEY=<key>
|
|
147
|
+
npm run basic:images
|
|
148
|
+
npm run advanced:videos
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
## Issues
|
|
152
|
+
|
|
153
|
+
[github.com/rixlhq/rixl-js/issues](https://github.com/rixlhq/rixl-js/issues)
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type WithFeedItemRequestBuilder } from './item/index.js';
|
|
2
|
+
import { type BaseRequestBuilder, type KeysToExcludeForNavigationMetadata, type NavigationMetadata } from '@microsoft/kiota-abstractions';
|
|
3
|
+
/**
|
|
4
|
+
* Builds and executes requests for operations under /feeds
|
|
5
|
+
*/
|
|
6
|
+
export interface FeedsRequestBuilder extends BaseRequestBuilder<FeedsRequestBuilder> {
|
|
7
|
+
/**
|
|
8
|
+
* Gets an item from the rixlSdk.feeds.item collection
|
|
9
|
+
* @param feedId Feed ID
|
|
10
|
+
* @returns {WithFeedItemRequestBuilder}
|
|
11
|
+
*/
|
|
12
|
+
byFeedId(feedId: string): WithFeedItemRequestBuilder;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Uri template for the request builder.
|
|
16
|
+
*/
|
|
17
|
+
export declare const FeedsRequestBuilderUriTemplate = "{+baseurl}/feeds";
|
|
18
|
+
/**
|
|
19
|
+
* Metadata for all the navigation properties in the request builder.
|
|
20
|
+
*/
|
|
21
|
+
export declare const FeedsRequestBuilderNavigationMetadata: Record<Exclude<keyof FeedsRequestBuilder, KeysToExcludeForNavigationMetadata>, NavigationMetadata>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
// Generated by Microsoft Kiota
|
|
4
|
+
// @ts-ignore
|
|
5
|
+
import { WithFeedItemRequestBuilderNavigationMetadata, WithFeedItemRequestBuilderRequestsMetadata } from './item/index.js';
|
|
6
|
+
/**
|
|
7
|
+
* Uri template for the request builder.
|
|
8
|
+
*/
|
|
9
|
+
export const FeedsRequestBuilderUriTemplate = "{+baseurl}/feeds";
|
|
10
|
+
/**
|
|
11
|
+
* Metadata for all the navigation properties in the request builder.
|
|
12
|
+
*/
|
|
13
|
+
export const FeedsRequestBuilderNavigationMetadata = {
|
|
14
|
+
byFeedId: {
|
|
15
|
+
requestsMetadata: WithFeedItemRequestBuilderRequestsMetadata,
|
|
16
|
+
navigationMetadata: WithFeedItemRequestBuilderNavigationMetadata,
|
|
17
|
+
pathParametersMappings: ["feedId"],
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
/* tslint:enable */
|
|
21
|
+
/* eslint-enable */
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type WithCreatorItemRequestBuilder } from './item/index.js';
|
|
2
|
+
import { type BaseRequestBuilder, type KeysToExcludeForNavigationMetadata, type NavigationMetadata } from '@microsoft/kiota-abstractions';
|
|
3
|
+
/**
|
|
4
|
+
* Builds and executes requests for operations under /feeds/{feedId}/creators
|
|
5
|
+
*/
|
|
6
|
+
export interface CreatorsRequestBuilder extends BaseRequestBuilder<CreatorsRequestBuilder> {
|
|
7
|
+
/**
|
|
8
|
+
* Gets an item from the rixlSdk.feeds.item.creators.item collection
|
|
9
|
+
* @param creatorId Creator ID
|
|
10
|
+
* @returns {WithCreatorItemRequestBuilder}
|
|
11
|
+
*/
|
|
12
|
+
byCreatorId(creatorId: string): WithCreatorItemRequestBuilder;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Uri template for the request builder.
|
|
16
|
+
*/
|
|
17
|
+
export declare const CreatorsRequestBuilderUriTemplate = "{+baseurl}/feeds/{feedId}/creators";
|
|
18
|
+
/**
|
|
19
|
+
* Metadata for all the navigation properties in the request builder.
|
|
20
|
+
*/
|
|
21
|
+
export declare const CreatorsRequestBuilderNavigationMetadata: Record<Exclude<keyof CreatorsRequestBuilder, KeysToExcludeForNavigationMetadata>, NavigationMetadata>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
// Generated by Microsoft Kiota
|
|
4
|
+
// @ts-ignore
|
|
5
|
+
import { WithCreatorItemRequestBuilderRequestsMetadata } from './item/index.js';
|
|
6
|
+
/**
|
|
7
|
+
* Uri template for the request builder.
|
|
8
|
+
*/
|
|
9
|
+
export const CreatorsRequestBuilderUriTemplate = "{+baseurl}/feeds/{feedId}/creators";
|
|
10
|
+
/**
|
|
11
|
+
* Metadata for all the navigation properties in the request builder.
|
|
12
|
+
*/
|
|
13
|
+
export const CreatorsRequestBuilderNavigationMetadata = {
|
|
14
|
+
byCreatorId: {
|
|
15
|
+
requestsMetadata: WithCreatorItemRequestBuilderRequestsMetadata,
|
|
16
|
+
pathParametersMappings: ["creatorId"],
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
/* tslint:enable */
|
|
20
|
+
/* eslint-enable */
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { type PaginatedResponsePost } from '../../../../models/pagination/index.js';
|
|
2
|
+
import { type BaseRequestBuilder, type RequestConfiguration, type RequestInformation, type RequestsMetadata } from '@microsoft/kiota-abstractions';
|
|
3
|
+
/**
|
|
4
|
+
* Builds and executes requests for operations under /feeds/{feedId}/creators/{creatorId}
|
|
5
|
+
*/
|
|
6
|
+
export interface WithCreatorItemRequestBuilder extends BaseRequestBuilder<WithCreatorItemRequestBuilder> {
|
|
7
|
+
/**
|
|
8
|
+
* Retrieve posts in a feed by a specific creator, with pagination.
|
|
9
|
+
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
|
|
10
|
+
* @returns {Promise<PaginatedResponsePost>}
|
|
11
|
+
* @throws {ErrorResponse} error when the service returns a 400 status code
|
|
12
|
+
* @throws {ErrorResponse} error when the service returns a 500 status code
|
|
13
|
+
*/
|
|
14
|
+
get(requestConfiguration?: RequestConfiguration<WithCreatorItemRequestBuilderGetQueryParameters> | undefined): Promise<PaginatedResponsePost | undefined>;
|
|
15
|
+
/**
|
|
16
|
+
* Retrieve posts in a feed by a specific creator, with pagination.
|
|
17
|
+
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
|
|
18
|
+
* @returns {RequestInformation}
|
|
19
|
+
*/
|
|
20
|
+
toGetRequestInformation(requestConfiguration?: RequestConfiguration<WithCreatorItemRequestBuilderGetQueryParameters> | undefined): RequestInformation;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Retrieve posts in a feed by a specific creator, with pagination.
|
|
24
|
+
*/
|
|
25
|
+
export interface WithCreatorItemRequestBuilderGetQueryParameters {
|
|
26
|
+
/**
|
|
27
|
+
* Maximum number of items to return in a single request. <br> **Default:** `25`
|
|
28
|
+
*/
|
|
29
|
+
limit?: number;
|
|
30
|
+
/**
|
|
31
|
+
* Starting point of the result set. <br>To get page 2 with a limit of 25, set `offset` to `25`. <br> **Default:** `0`
|
|
32
|
+
*/
|
|
33
|
+
offset?: number;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Uri template for the request builder.
|
|
37
|
+
*/
|
|
38
|
+
export declare const WithCreatorItemRequestBuilderUriTemplate = "{+baseurl}/feeds/{feedId}/creators/{creatorId}{?limit*,offset*}";
|
|
39
|
+
/**
|
|
40
|
+
* Metadata for all the requests in the request builder.
|
|
41
|
+
*/
|
|
42
|
+
export declare const WithCreatorItemRequestBuilderRequestsMetadata: RequestsMetadata;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
// Generated by Microsoft Kiota
|
|
4
|
+
// @ts-ignore
|
|
5
|
+
import { createErrorResponseFromDiscriminatorValue } from '../../../../models/github_com_rixlhq_api_internal_errors/index.js';
|
|
6
|
+
// @ts-ignore
|
|
7
|
+
import { createPaginatedResponsePostFromDiscriminatorValue } from '../../../../models/pagination/index.js';
|
|
8
|
+
/**
|
|
9
|
+
* Uri template for the request builder.
|
|
10
|
+
*/
|
|
11
|
+
export const WithCreatorItemRequestBuilderUriTemplate = "{+baseurl}/feeds/{feedId}/creators/{creatorId}{?limit*,offset*}";
|
|
12
|
+
/**
|
|
13
|
+
* Metadata for all the requests in the request builder.
|
|
14
|
+
*/
|
|
15
|
+
export const WithCreatorItemRequestBuilderRequestsMetadata = {
|
|
16
|
+
get: {
|
|
17
|
+
uriTemplate: WithCreatorItemRequestBuilderUriTemplate,
|
|
18
|
+
responseBodyContentType: "application/json",
|
|
19
|
+
errorMappings: {
|
|
20
|
+
400: createErrorResponseFromDiscriminatorValue,
|
|
21
|
+
500: createErrorResponseFromDiscriminatorValue,
|
|
22
|
+
},
|
|
23
|
+
adapterMethodName: "send",
|
|
24
|
+
responseBodyFactory: createPaginatedResponsePostFromDiscriminatorValue,
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
/* tslint:enable */
|
|
28
|
+
/* eslint-enable */
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { type PaginatedResponsePost } from '../../models/pagination/index.js';
|
|
2
|
+
import { type CreatorsRequestBuilder } from './creators/index.js';
|
|
3
|
+
import { type WithPostItemRequestBuilder } from './item/index.js';
|
|
4
|
+
import { type BaseRequestBuilder, type KeysToExcludeForNavigationMetadata, type NavigationMetadata, type RequestConfiguration, type RequestInformation, type RequestsMetadata } from '@microsoft/kiota-abstractions';
|
|
5
|
+
/**
|
|
6
|
+
* Builds and executes requests for operations under /feeds/{feedId}
|
|
7
|
+
*/
|
|
8
|
+
export interface WithFeedItemRequestBuilder extends BaseRequestBuilder<WithFeedItemRequestBuilder> {
|
|
9
|
+
/**
|
|
10
|
+
* The creators property
|
|
11
|
+
*/
|
|
12
|
+
get creators(): CreatorsRequestBuilder;
|
|
13
|
+
/**
|
|
14
|
+
* Gets an item from the rixlSdk.feeds.item.item collection
|
|
15
|
+
* @param postId Post ID
|
|
16
|
+
* @returns {WithPostItemRequestBuilder}
|
|
17
|
+
*/
|
|
18
|
+
byPostId(postId: string): WithPostItemRequestBuilder;
|
|
19
|
+
/**
|
|
20
|
+
* Retrieve posts in a feed, with pagination.
|
|
21
|
+
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
|
|
22
|
+
* @returns {Promise<PaginatedResponsePost>}
|
|
23
|
+
* @throws {ErrorResponse} error when the service returns a 400 status code
|
|
24
|
+
* @throws {ErrorResponse} error when the service returns a 500 status code
|
|
25
|
+
*/
|
|
26
|
+
get(requestConfiguration?: RequestConfiguration<WithFeedItemRequestBuilderGetQueryParameters> | undefined): Promise<PaginatedResponsePost | undefined>;
|
|
27
|
+
/**
|
|
28
|
+
* Retrieve posts in a feed, with pagination.
|
|
29
|
+
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
|
|
30
|
+
* @returns {RequestInformation}
|
|
31
|
+
*/
|
|
32
|
+
toGetRequestInformation(requestConfiguration?: RequestConfiguration<WithFeedItemRequestBuilderGetQueryParameters> | undefined): RequestInformation;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Retrieve posts in a feed, with pagination.
|
|
36
|
+
*/
|
|
37
|
+
export interface WithFeedItemRequestBuilderGetQueryParameters {
|
|
38
|
+
/**
|
|
39
|
+
* Maximum number of items to return in a single request. <br> **Default:** `25`
|
|
40
|
+
*/
|
|
41
|
+
limit?: number;
|
|
42
|
+
/**
|
|
43
|
+
* Starting point of the result set. <br>To get page 2 with a limit of 25, set `offset` to `25`. <br> **Default:** `0`
|
|
44
|
+
*/
|
|
45
|
+
offset?: number;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Uri template for the request builder.
|
|
49
|
+
*/
|
|
50
|
+
export declare const WithFeedItemRequestBuilderUriTemplate = "{+baseurl}/feeds/{feedId}{?limit*,offset*}";
|
|
51
|
+
/**
|
|
52
|
+
* Metadata for all the navigation properties in the request builder.
|
|
53
|
+
*/
|
|
54
|
+
export declare const WithFeedItemRequestBuilderNavigationMetadata: Record<Exclude<keyof WithFeedItemRequestBuilder, KeysToExcludeForNavigationMetadata>, NavigationMetadata>;
|
|
55
|
+
/**
|
|
56
|
+
* Metadata for all the requests in the request builder.
|
|
57
|
+
*/
|
|
58
|
+
export declare const WithFeedItemRequestBuilderRequestsMetadata: RequestsMetadata;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
// Generated by Microsoft Kiota
|
|
4
|
+
// @ts-ignore
|
|
5
|
+
import { createErrorResponseFromDiscriminatorValue } from '../../models/github_com_rixlhq_api_internal_errors/index.js';
|
|
6
|
+
// @ts-ignore
|
|
7
|
+
import { createPaginatedResponsePostFromDiscriminatorValue } from '../../models/pagination/index.js';
|
|
8
|
+
// @ts-ignore
|
|
9
|
+
import { CreatorsRequestBuilderNavigationMetadata } from './creators/index.js';
|
|
10
|
+
// @ts-ignore
|
|
11
|
+
import { WithPostItemRequestBuilderRequestsMetadata } from './item/index.js';
|
|
12
|
+
/**
|
|
13
|
+
* Uri template for the request builder.
|
|
14
|
+
*/
|
|
15
|
+
export const WithFeedItemRequestBuilderUriTemplate = "{+baseurl}/feeds/{feedId}{?limit*,offset*}";
|
|
16
|
+
/**
|
|
17
|
+
* Metadata for all the navigation properties in the request builder.
|
|
18
|
+
*/
|
|
19
|
+
export const WithFeedItemRequestBuilderNavigationMetadata = {
|
|
20
|
+
byPostId: {
|
|
21
|
+
requestsMetadata: WithPostItemRequestBuilderRequestsMetadata,
|
|
22
|
+
pathParametersMappings: ["postId"],
|
|
23
|
+
},
|
|
24
|
+
creators: {
|
|
25
|
+
navigationMetadata: CreatorsRequestBuilderNavigationMetadata,
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Metadata for all the requests in the request builder.
|
|
30
|
+
*/
|
|
31
|
+
export const WithFeedItemRequestBuilderRequestsMetadata = {
|
|
32
|
+
get: {
|
|
33
|
+
uriTemplate: WithFeedItemRequestBuilderUriTemplate,
|
|
34
|
+
responseBodyContentType: "application/json",
|
|
35
|
+
errorMappings: {
|
|
36
|
+
400: createErrorResponseFromDiscriminatorValue,
|
|
37
|
+
500: createErrorResponseFromDiscriminatorValue,
|
|
38
|
+
},
|
|
39
|
+
adapterMethodName: "send",
|
|
40
|
+
responseBodyFactory: createPaginatedResponsePostFromDiscriminatorValue,
|
|
41
|
+
},
|
|
42
|
+
};
|
|
43
|
+
/* tslint:enable */
|
|
44
|
+
/* eslint-enable */
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { type Post } from '../../../models/index.js';
|
|
2
|
+
import { type BaseRequestBuilder, type RequestConfiguration, type RequestInformation, type RequestsMetadata } from '@microsoft/kiota-abstractions';
|
|
3
|
+
/**
|
|
4
|
+
* Builds and executes requests for operations under /feeds/{feedId}/{postId}
|
|
5
|
+
*/
|
|
6
|
+
export interface WithPostItemRequestBuilder extends BaseRequestBuilder<WithPostItemRequestBuilder> {
|
|
7
|
+
/**
|
|
8
|
+
* Retrieve a post from feed by its ID
|
|
9
|
+
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
|
|
10
|
+
* @returns {Promise<Post>}
|
|
11
|
+
* @throws {ErrorResponse} error when the service returns a 400 status code
|
|
12
|
+
* @throws {ErrorResponse} error when the service returns a 404 status code
|
|
13
|
+
*/
|
|
14
|
+
get(requestConfiguration?: RequestConfiguration<object> | undefined): Promise<Post | undefined>;
|
|
15
|
+
/**
|
|
16
|
+
* Retrieve a post from feed by its ID
|
|
17
|
+
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
|
|
18
|
+
* @returns {RequestInformation}
|
|
19
|
+
*/
|
|
20
|
+
toGetRequestInformation(requestConfiguration?: RequestConfiguration<object> | undefined): RequestInformation;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Uri template for the request builder.
|
|
24
|
+
*/
|
|
25
|
+
export declare const WithPostItemRequestBuilderUriTemplate = "{+baseurl}/feeds/{feedId}/{postId}";
|
|
26
|
+
/**
|
|
27
|
+
* Metadata for all the requests in the request builder.
|
|
28
|
+
*/
|
|
29
|
+
export declare const WithPostItemRequestBuilderRequestsMetadata: RequestsMetadata;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
// Generated by Microsoft Kiota
|
|
4
|
+
// @ts-ignore
|
|
5
|
+
import { createErrorResponseFromDiscriminatorValue } from '../../../models/github_com_rixlhq_api_internal_errors/index.js';
|
|
6
|
+
// @ts-ignore
|
|
7
|
+
import { createPostFromDiscriminatorValue } from '../../../models/index.js';
|
|
8
|
+
/**
|
|
9
|
+
* Uri template for the request builder.
|
|
10
|
+
*/
|
|
11
|
+
export const WithPostItemRequestBuilderUriTemplate = "{+baseurl}/feeds/{feedId}/{postId}";
|
|
12
|
+
/**
|
|
13
|
+
* Metadata for all the requests in the request builder.
|
|
14
|
+
*/
|
|
15
|
+
export const WithPostItemRequestBuilderRequestsMetadata = {
|
|
16
|
+
get: {
|
|
17
|
+
uriTemplate: WithPostItemRequestBuilderUriTemplate,
|
|
18
|
+
responseBodyContentType: "application/json",
|
|
19
|
+
errorMappings: {
|
|
20
|
+
400: createErrorResponseFromDiscriminatorValue,
|
|
21
|
+
404: createErrorResponseFromDiscriminatorValue,
|
|
22
|
+
},
|
|
23
|
+
adapterMethodName: "send",
|
|
24
|
+
responseBodyFactory: createPostFromDiscriminatorValue,
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
/* tslint:enable */
|
|
28
|
+
/* eslint-enable */
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { type PaginatedResponseImage } from '../models/pagination/index.js';
|
|
2
|
+
import { type WithImageItemRequestBuilder } from './item/index.js';
|
|
3
|
+
import { type UploadRequestBuilder } from './upload/index.js';
|
|
4
|
+
import { type BaseRequestBuilder, type KeysToExcludeForNavigationMetadata, type NavigationMetadata, type RequestConfiguration, type RequestInformation, type RequestsMetadata } from '@microsoft/kiota-abstractions';
|
|
5
|
+
/**
|
|
6
|
+
* Builds and executes requests for operations under /images
|
|
7
|
+
*/
|
|
8
|
+
export interface ImagesRequestBuilder extends BaseRequestBuilder<ImagesRequestBuilder> {
|
|
9
|
+
/**
|
|
10
|
+
* The upload property
|
|
11
|
+
*/
|
|
12
|
+
get upload(): UploadRequestBuilder;
|
|
13
|
+
/**
|
|
14
|
+
* Gets an item from the rixlSdk.images.item collection
|
|
15
|
+
* @param imageId Image ID
|
|
16
|
+
* @returns {WithImageItemRequestBuilder}
|
|
17
|
+
*/
|
|
18
|
+
byImageId(imageId: string): WithImageItemRequestBuilder;
|
|
19
|
+
/**
|
|
20
|
+
* Retrieve all images for a specific project, with pagination and sorting.
|
|
21
|
+
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
|
|
22
|
+
* @returns {Promise<PaginatedResponseImage>}
|
|
23
|
+
* @throws {ErrorResponse} error when the service returns a 400 status code
|
|
24
|
+
* @throws {ErrorResponse} error when the service returns a 401 status code
|
|
25
|
+
* @throws {ErrorResponse} error when the service returns a 403 status code
|
|
26
|
+
* @throws {ErrorResponse} error when the service returns a 500 status code
|
|
27
|
+
*/
|
|
28
|
+
get(requestConfiguration?: RequestConfiguration<ImagesRequestBuilderGetQueryParameters> | undefined): Promise<PaginatedResponseImage | undefined>;
|
|
29
|
+
/**
|
|
30
|
+
* Retrieve all images for a specific project, with pagination and sorting.
|
|
31
|
+
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
|
|
32
|
+
* @returns {RequestInformation}
|
|
33
|
+
*/
|
|
34
|
+
toGetRequestInformation(requestConfiguration?: RequestConfiguration<ImagesRequestBuilderGetQueryParameters> | undefined): RequestInformation;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Retrieve all images for a specific project, with pagination and sorting.
|
|
38
|
+
*/
|
|
39
|
+
export interface ImagesRequestBuilderGetQueryParameters {
|
|
40
|
+
/**
|
|
41
|
+
* Maximum number of items to return in a single request. <br> **Default:** `25`
|
|
42
|
+
*/
|
|
43
|
+
limit?: number;
|
|
44
|
+
/**
|
|
45
|
+
* Starting point of the result set. <br>To get page 2 with a limit of 25, set `offset` to `25`. <br> **Default:** `0`
|
|
46
|
+
*/
|
|
47
|
+
offset?: number;
|
|
48
|
+
/**
|
|
49
|
+
* Sort order (asc, desc)
|
|
50
|
+
*/
|
|
51
|
+
order?: string;
|
|
52
|
+
/**
|
|
53
|
+
* Field to sort by (created_at, name, size, updated_at)
|
|
54
|
+
*/
|
|
55
|
+
sort?: string;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Uri template for the request builder.
|
|
59
|
+
*/
|
|
60
|
+
export declare const ImagesRequestBuilderUriTemplate = "{+baseurl}/images{?limit*,offset*,order*,sort*}";
|
|
61
|
+
/**
|
|
62
|
+
* Metadata for all the navigation properties in the request builder.
|
|
63
|
+
*/
|
|
64
|
+
export declare const ImagesRequestBuilderNavigationMetadata: Record<Exclude<keyof ImagesRequestBuilder, KeysToExcludeForNavigationMetadata>, NavigationMetadata>;
|
|
65
|
+
/**
|
|
66
|
+
* Metadata for all the requests in the request builder.
|
|
67
|
+
*/
|
|
68
|
+
export declare const ImagesRequestBuilderRequestsMetadata: RequestsMetadata;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
// Generated by Microsoft Kiota
|
|
4
|
+
// @ts-ignore
|
|
5
|
+
import { createErrorResponseFromDiscriminatorValue } from '../models/github_com_rixlhq_api_internal_errors/index.js';
|
|
6
|
+
// @ts-ignore
|
|
7
|
+
import { createPaginatedResponseImageFromDiscriminatorValue } from '../models/pagination/index.js';
|
|
8
|
+
// @ts-ignore
|
|
9
|
+
import { WithImageItemRequestBuilderRequestsMetadata } from './item/index.js';
|
|
10
|
+
// @ts-ignore
|
|
11
|
+
import { UploadRequestBuilderNavigationMetadata } from './upload/index.js';
|
|
12
|
+
/**
|
|
13
|
+
* Uri template for the request builder.
|
|
14
|
+
*/
|
|
15
|
+
export const ImagesRequestBuilderUriTemplate = "{+baseurl}/images{?limit*,offset*,order*,sort*}";
|
|
16
|
+
/**
|
|
17
|
+
* Metadata for all the navigation properties in the request builder.
|
|
18
|
+
*/
|
|
19
|
+
export const ImagesRequestBuilderNavigationMetadata = {
|
|
20
|
+
byImageId: {
|
|
21
|
+
requestsMetadata: WithImageItemRequestBuilderRequestsMetadata,
|
|
22
|
+
pathParametersMappings: ["imageId"],
|
|
23
|
+
},
|
|
24
|
+
upload: {
|
|
25
|
+
navigationMetadata: UploadRequestBuilderNavigationMetadata,
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Metadata for all the requests in the request builder.
|
|
30
|
+
*/
|
|
31
|
+
export const ImagesRequestBuilderRequestsMetadata = {
|
|
32
|
+
get: {
|
|
33
|
+
uriTemplate: ImagesRequestBuilderUriTemplate,
|
|
34
|
+
responseBodyContentType: "application/json",
|
|
35
|
+
errorMappings: {
|
|
36
|
+
400: createErrorResponseFromDiscriminatorValue,
|
|
37
|
+
401: createErrorResponseFromDiscriminatorValue,
|
|
38
|
+
403: createErrorResponseFromDiscriminatorValue,
|
|
39
|
+
500: createErrorResponseFromDiscriminatorValue,
|
|
40
|
+
},
|
|
41
|
+
adapterMethodName: "send",
|
|
42
|
+
responseBodyFactory: createPaginatedResponseImageFromDiscriminatorValue,
|
|
43
|
+
},
|
|
44
|
+
};
|
|
45
|
+
/* tslint:enable */
|
|
46
|
+
/* eslint-enable */
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { type Image } from '../../models/index.js';
|
|
2
|
+
import { type BaseRequestBuilder, type RequestConfiguration, type RequestInformation, type RequestsMetadata } from '@microsoft/kiota-abstractions';
|
|
3
|
+
/**
|
|
4
|
+
* Builds and executes requests for operations under /images/{imageId}
|
|
5
|
+
*/
|
|
6
|
+
export interface WithImageItemRequestBuilder extends BaseRequestBuilder<WithImageItemRequestBuilder> {
|
|
7
|
+
/**
|
|
8
|
+
* delete an image by marking it as deleted
|
|
9
|
+
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
|
|
10
|
+
* @throws {ErrorResponse} error when the service returns a 400 status code
|
|
11
|
+
* @throws {ErrorResponse} error when the service returns a 401 status code
|
|
12
|
+
* @throws {ErrorResponse} error when the service returns a 403 status code
|
|
13
|
+
* @throws {ErrorResponse} error when the service returns a 404 status code
|
|
14
|
+
* @throws {ErrorResponse} error when the service returns a 500 status code
|
|
15
|
+
*/
|
|
16
|
+
delete(requestConfiguration?: RequestConfiguration<object> | undefined): Promise<void>;
|
|
17
|
+
/**
|
|
18
|
+
* Retrieve an image by its ID for a specific project.
|
|
19
|
+
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
|
|
20
|
+
* @returns {Promise<Image>}
|
|
21
|
+
* @throws {ErrorResponse} error when the service returns a 400 status code
|
|
22
|
+
* @throws {ErrorResponse} error when the service returns a 401 status code
|
|
23
|
+
* @throws {ErrorResponse} error when the service returns a 403 status code
|
|
24
|
+
* @throws {ErrorResponse} error when the service returns a 404 status code
|
|
25
|
+
* @throws {ErrorResponse} error when the service returns a 500 status code
|
|
26
|
+
*/
|
|
27
|
+
get(requestConfiguration?: RequestConfiguration<object> | undefined): Promise<Image | undefined>;
|
|
28
|
+
/**
|
|
29
|
+
* delete an image by marking it as deleted
|
|
30
|
+
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
|
|
31
|
+
* @returns {RequestInformation}
|
|
32
|
+
*/
|
|
33
|
+
toDeleteRequestInformation(requestConfiguration?: RequestConfiguration<object> | undefined): RequestInformation;
|
|
34
|
+
/**
|
|
35
|
+
* Retrieve an image by its ID for a specific project.
|
|
36
|
+
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
|
|
37
|
+
* @returns {RequestInformation}
|
|
38
|
+
*/
|
|
39
|
+
toGetRequestInformation(requestConfiguration?: RequestConfiguration<object> | undefined): RequestInformation;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Uri template for the request builder.
|
|
43
|
+
*/
|
|
44
|
+
export declare const WithImageItemRequestBuilderUriTemplate = "{+baseurl}/images/{imageId}";
|
|
45
|
+
/**
|
|
46
|
+
* Metadata for all the requests in the request builder.
|
|
47
|
+
*/
|
|
48
|
+
export declare const WithImageItemRequestBuilderRequestsMetadata: RequestsMetadata;
|