|
| 1 | +/** |
| 2 | + * This file was auto-generated by Fern from our API Definition. |
| 3 | + */ |
| 4 | +import * as environments from "../../../../../../../../environments"; |
| 5 | +import * as core from "../../../../../../../../core"; |
| 6 | +import * as TrophyApi from "../../../../../../.."; |
| 7 | +export declare namespace Levels { |
| 8 | + interface Options { |
| 9 | + environment?: core.Supplier<environments.TrophyApiEnvironment | environments.TrophyApiEnvironmentUrls>; |
| 10 | + apiKey: core.Supplier<string>; |
| 11 | + } |
| 12 | + interface RequestOptions { |
| 13 | + timeoutInSeconds?: number; |
| 14 | + maxRetries?: number; |
| 15 | + } |
| 16 | +} |
| 17 | +export declare class Levels { |
| 18 | + protected readonly _options: Levels.Options; |
| 19 | + constructor(_options: Levels.Options); |
| 20 | + /** |
| 21 | + * List points levels for a system. |
| 22 | + * @throws {@link TrophyApi.UnauthorizedError} |
| 23 | + * @throws {@link TrophyApi.NotFoundError} |
| 24 | + * @throws {@link TrophyApi.UnprocessableEntityError} |
| 25 | + * |
| 26 | + * @example |
| 27 | + * await trophyApi.admin.points.levels.list("550e8400-e29b-41d4-a716-446655440000", { |
| 28 | + * limit: 1, |
| 29 | + * skip: 1 |
| 30 | + * }) |
| 31 | + */ |
| 32 | + list(systemId: string, request?: TrophyApi.admin.points.LevelsListRequest, requestOptions?: Levels.RequestOptions): Promise<TrophyApi.ListPointsLevelsResponse>; |
| 33 | + /** |
| 34 | + * Create points levels. Maximum 100 levels per request. |
| 35 | + * @throws {@link TrophyApi.UnauthorizedError} |
| 36 | + * @throws {@link TrophyApi.NotFoundError} |
| 37 | + * @throws {@link TrophyApi.UnprocessableEntityError} |
| 38 | + * |
| 39 | + * @example |
| 40 | + * await trophyApi.admin.points.levels.create("550e8400-e29b-41d4-a716-446655440000", [{ |
| 41 | + * name: "Bronze", |
| 42 | + * key: "bronze", |
| 43 | + * points: 100 |
| 44 | + * }]) |
| 45 | + */ |
| 46 | + create(systemId: string, request: TrophyApi.CreatePointsLevelsRequest, requestOptions?: Levels.RequestOptions): Promise<TrophyApi.CreatePointsLevelsResponse>; |
| 47 | + /** |
| 48 | + * Delete multiple points levels by ID. |
| 49 | + * @throws {@link TrophyApi.UnauthorizedError} |
| 50 | + * @throws {@link TrophyApi.NotFoundError} |
| 51 | + * @throws {@link TrophyApi.UnprocessableEntityError} |
| 52 | + * |
| 53 | + * @example |
| 54 | + * await trophyApi.admin.points.levels.delete(undefined, {}) |
| 55 | + */ |
| 56 | + delete(systemId: string, request?: TrophyApi.admin.points.LevelsDeleteRequest, requestOptions?: Levels.RequestOptions): Promise<TrophyApi.DeletePointsLevelsResponse>; |
| 57 | + /** |
| 58 | + * Update multiple points levels. Each item must include an ID. `key` cannot be changed. |
| 59 | + * @throws {@link TrophyApi.UnauthorizedError} |
| 60 | + * @throws {@link TrophyApi.NotFoundError} |
| 61 | + * @throws {@link TrophyApi.UnprocessableEntityError} |
| 62 | + * |
| 63 | + * @example |
| 64 | + * await trophyApi.admin.points.levels.update("550e8400-e29b-41d4-a716-446655440000", [{ |
| 65 | + * id: "550e8400-e29b-41d4-a716-446655440000" |
| 66 | + * }]) |
| 67 | + */ |
| 68 | + update(systemId: string, request: TrophyApi.PatchPointsLevelsRequest, requestOptions?: Levels.RequestOptions): Promise<TrophyApi.PatchPointsLevelsResponse>; |
| 69 | + /** |
| 70 | + * Get a single points level by ID. |
| 71 | + * @throws {@link TrophyApi.UnauthorizedError} |
| 72 | + * @throws {@link TrophyApi.NotFoundError} |
| 73 | + * @throws {@link TrophyApi.UnprocessableEntityError} |
| 74 | + * |
| 75 | + * @example |
| 76 | + * await trophyApi.admin.points.levels.get("550e8400-e29b-41d4-a716-446655440000", "660f9500-f30c-42e5-b827-557766550001") |
| 77 | + */ |
| 78 | + get(systemId: string, id: string, requestOptions?: Levels.RequestOptions): Promise<TrophyApi.AdminPointsLevel>; |
| 79 | +} |
0 commit comments