UNPKG

openblox

Version:

Roblox API Wrapper For Both Classic And OpenCloud APIs.

440 lines (439 loc) 18.6 kB
import type { Identifier } from "typeforge"; /** * Returns a list of entries from an ordered data store. * @endpoint GET /v1/universes/{universeId}/orderedDataStores/{orderedDataStore}/scopes/{scope}/entries * @tags [ "Cloud Key" ] * @deprecated Please use `OrderedDataStoresApi_V2` for new work. * * @param universeId The identifier of the experience with ordered data stores that you want to access. * @param orderedDataStore The name of the target ordered data store. * @param scope The name of the data store scope. * @param maxPageSize The maximum number of entries to return. The service may return fewer than this value. The default value is 10. The maximum value is 100, and any input above 100 is coerced to 100. * @param orderBy The enumeration direction. The order by default is ascending. Input a desc suffix for descending. * @param filter The range of qualifying values of entries to return. * @param cursor A page token received from a previous List call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to List must match the call providing the page token. * * @example * const { data:entries } = await OrderedDataStoresApi_V1.listOrderedDatastoreEntries({ universeId: 5097539509, orderedDataStore: "PointsStore", scope: "global" }) * @exampleData [ { path: "universes/5097539509/orderedDataStores/PointsStore/scopes/global/entries/45348281", value: 54, id: "45348281" } ] * @exampleRawBody { entries: [ { path: "universes/5097539509/orderedDataStores/PointsStore/scopes/global/entries/45348281", value: 54, id: "45348281" } ], nextPageToken: "" } */ export declare const listOrderedDatastoreEntries: <UniverseId extends Identifier, OrderedDataStore extends string, Scope extends string>(this: any, args: { universeId: UniverseId; orderedDataStore: OrderedDataStore; scope: Scope; maxPageSize?: number | undefined; orderBy?: "desc" | "asc" | undefined; filter?: string | undefined; cursor?: string | undefined; }) => Promise<{ data: { path: `universes/${UniverseId}/orderedDataStores/${OrderedDataStore}/scopes/${Scope}/entries/${string}`; value?: `${number}` | undefined; id: string; }[]; response: { fullResponse: unknown; url: `https://${string}`; method: import("../../../utils/utils.types").RestMethod; success: boolean; statusCode: number; headers: Headers; body: { entries: { path: `universes/${UniverseId}/orderedDataStores/${OrderedDataStore}/scopes/${Scope}/entries/${string}`; value?: `${number}` | undefined; id: string; }[]; nextPageToken: string; }; }; cursors: { previous: import("../../apiGroup/apiGroup.types").Cursor; next: import("../../apiGroup/apiGroup.types").Cursor; }; [Symbol.asyncIterator]: () => AsyncGenerator<{ data: { path: `universes/${UniverseId}/orderedDataStores/${OrderedDataStore}/scopes/${Scope}/entries/${string}`; value?: `${number}` | undefined; id: string; }[]; response: { fullResponse: unknown; url: `https://${string}`; method: import("../../../utils/utils.types").RestMethod; success: boolean; statusCode: number; headers: Headers; body: { entries: { path: `universes/${UniverseId}/orderedDataStores/${OrderedDataStore}/scopes/${Scope}/entries/${string}`; value?: `${number}` | undefined; id: string; }[]; nextPageToken: string; }; }; cursors: { previous: import("../../apiGroup/apiGroup.types").Cursor; next: import("../../apiGroup/apiGroup.types").Cursor; }; [Symbol.asyncIterator]: null; } & { again: () => Promise<{ data: { path: `universes/${UniverseId}/orderedDataStores/${OrderedDataStore}/scopes/${Scope}/entries/${string}`; value?: `${number}` | undefined; id: string; }[]; response: { fullResponse: unknown; url: `https://${string}`; method: import("../../../utils/utils.types").RestMethod; success: boolean; statusCode: number; headers: Headers; body: { entries: { path: `universes/${UniverseId}/orderedDataStores/${OrderedDataStore}/scopes/${Scope}/entries/${string}`; value?: `${number}` | undefined; id: string; }[]; nextPageToken: string; }; }; }>; }, any, unknown>; } & { again: () => Promise<{ data: { path: `universes/${UniverseId}/orderedDataStores/${OrderedDataStore}/scopes/${Scope}/entries/${string}`; value?: `${number}` | undefined; id: string; }[]; response: { fullResponse: unknown; url: `https://${string}`; method: import("../../../utils/utils.types").RestMethod; success: boolean; statusCode: number; headers: Headers; body: { entries: { path: `universes/${UniverseId}/orderedDataStores/${OrderedDataStore}/scopes/${Scope}/entries/${string}`; value?: `${number}` | undefined; id: string; }[]; nextPageToken: string; }; }; }>; }>; /** * Creates a new entry with the content value provided. * @endpoint POST /v1/universes/{universeId}/orderedDataStores/{orderedDataStore}/scopes/{scope}/entries * @tags [ "Cloud Key" ] * @deprecated Please use `OrderedDataStoresApi_V2` for new work. * * @param universeId The identifier of the experience with ordered data stores that you want to access. * @param orderedDataStore The name of the target ordered data store. * @param scope The name of the data store scope. * @param id The name of the entry. * @param value The value of the entry. * * @example * const { data:createdEntry } = await OrderedDataStoresApi_V1.createOrderedDatastoreEntry({ universeId: 5097539509, orderedDataStore: "PointsStore", scope: "global", id: "45348282", value: 54 }) * @exampleData { path: "universes/5097539509/orderedDataStores/PointsStore/scopes/global/entries/45348281", value: 54, id: "45348281" } * @exampleRawBody { path: "universes/5097539509/orderedDataStores/PointsStore/scopes/global/entries/45348281", value: 54, id: "45348281" } */ export declare const createOrderedDatastoreEntry: <UniverseId extends Identifier, OrderedDataStore extends string, Scope extends string, Id extends string, Value extends Identifier>(this: any, args: { universeId: UniverseId; orderedDataStore: OrderedDataStore; scope: Scope; id: Id; value: Value; }) => Promise<{ data: { path: `universes/${UniverseId}/orderedDataStores/${OrderedDataStore}/scopes/${Scope}/entries/${Id}`; value: `${Value}`; id: Id; }; response: { fullResponse: unknown; url: `https://${string}`; method: import("../../../utils/utils.types").RestMethod; success: boolean; statusCode: number; headers: Headers; body: { path: `universes/${UniverseId}/orderedDataStores/${OrderedDataStore}/scopes/${Scope}/entries/${Id}`; value: `${Value}`; id: Id; }; }; } & { again: () => Promise<{ data: { path: `universes/${UniverseId}/orderedDataStores/${OrderedDataStore}/scopes/${Scope}/entries/${Id}`; value: `${Value}`; id: Id; }; response: { fullResponse: unknown; url: `https://${string}`; method: import("../../../utils/utils.types").RestMethod; success: boolean; statusCode: number; headers: Headers; body: { path: `universes/${UniverseId}/orderedDataStores/${OrderedDataStore}/scopes/${Scope}/entries/${Id}`; value: `${Value}`; id: Id; }; }; }>; }>; /** * Returns a list of entries from an ordered data store. * @endpoint GET /v1/universes/{universeId}/orderedDataStores/{orderedDataStore}/scopes/{scope}/entries * @tags [ "Cloud Key" ] * @deprecated Please use `OrderedDataStoresApi_V2` for new work. * * @param universeId The identifier of the experience with ordered data stores that you want to access. * @param orderedDataStore The name of the target ordered data store. * @param scope The name of the data store scope. * @param id The id of the entry. * * @example * const { data:entry } = await OrderedDataStoresApi_V1.orderedDatastoreEntry({ universeId: 5097539509, orderedDataStore: "PointsStore", scope: "global", id: "45348281" }) * @exampleData { path: "universes/5097539509/orderedDataStores/PointsStore/scopes/global/entries/45348281", value: 54, id: "45348281" } * @exampleRawBody { path: "universes/5097539509/orderedDataStores/PointsStore/scopes/global/entries/45348281", value: 54, id: "45348281" } */ export declare const orderedDatastoreEntry: <UniverseId extends Identifier, OrderedDataStore extends string, Scope extends string, Id extends string>(this: any, args: { universeId: UniverseId; orderedDataStore: OrderedDataStore; scope: Scope; id: Id; }) => Promise<{ data: { path: `universes/${UniverseId}/orderedDataStores/${OrderedDataStore}/scopes/${Scope}/entries/${Id}`; value: `${number}`; id: Id; }; response: { fullResponse: unknown; url: `https://${string}`; method: import("../../../utils/utils.types").RestMethod; success: boolean; statusCode: number; headers: Headers; body: { path: `universes/${UniverseId}/orderedDataStores/${OrderedDataStore}/scopes/${Scope}/entries/${Id}`; value: `${number}`; id: Id; }; }; } & { again: () => Promise<{ data: { path: `universes/${UniverseId}/orderedDataStores/${OrderedDataStore}/scopes/${Scope}/entries/${Id}`; value: `${number}`; id: Id; }; response: { fullResponse: unknown; url: `https://${string}`; method: import("../../../utils/utils.types").RestMethod; success: boolean; statusCode: number; headers: Headers; body: { path: `universes/${UniverseId}/orderedDataStores/${OrderedDataStore}/scopes/${Scope}/entries/${Id}`; value: `${number}`; id: Id; }; }; }>; }>; /** * Deletes the specified entry in an ordered datastore. * @endpoint GET /v1/universes/{universeId}/orderedDataStores/{orderedDataStore}/scopes/{scope}/entries * @tags [ "Cloud Key" ] * @deprecated Please use `OrderedDataStoresApi_V2` for new work. * * @param universeId The identifier of the experience with ordered data stores that you want to access. * @param orderedDataStore The name of the target ordered data store. * @param scope The name of the data store scope. * @param id The id of the entry. * * @example * const { data:success } = await OrderedDataStoresApi_V1.deleteOrderedDatastoreEntry({ universeId: 5097539509, orderedDataStore: "PointsStore", scope: "global", id: "45348281" }) * @exampleData true * @exampleRawBody {} */ export declare const deleteOrderedDatastoreEntry: import("../../apiGroup/apiGroup.types").CallApiMethod<{ universeId: Identifier; orderedDataStore: string; scope: string; id: string; }, { method: import("../../../utils/utils.types").RestMethod; path: `/${string}`; name: string; searchParams?: string | Record<string, any> | undefined; headers?: Record<string, any> | undefined; body?: string | number | Record<string, any> | undefined; formData?: FormData | undefined; applyFieldMask?: boolean | undefined; pathToPoll?: ((rawData: {}) => string) | undefined; getCursorsFn?: ((rawData: {}) => [previous: import("../../apiGroup/apiGroup.types").Cursor, next: import("../../apiGroup/apiGroup.types").Cursor]) | undefined; "\uD83D\uDD12__PRIVATE_RAW_DATA"?: {} | undefined; "\uD83D\uDD12__PRIVATE_FORMATTED_DATA"?: boolean | undefined; } & import("../../apiGroup/apiGroup.types").ApiMethodDataFormatRawData<{}, boolean>, false>; /** * Updates the specified entry. * @endpoint GET /v1/universes/{universeId}/orderedDataStores/{orderedDataStore}/scopes/{scope}/entries * @tags [ "Cloud Key" ] * @deprecated Please use `OrderedDataStoresApi_V2` for new work. * * @param universeId The identifier of the experience with ordered data stores that you want to access. * @param orderedDataStore The name of the target ordered data store. * @param scope The name of the data store scope. * @param id The id of the entry. * @param newValue The value to set the entry to. * @param createIfNoEntryExists The flag to allow the creation of an entry if the entry doesn't exist. (allow_missing) * * @example * const { data:updatedEntry } = await OrderedDataStoresApi_V1.updateOrderedDatastoreEntry({ universeId: 5097539509, orderedDataStore: "PointsStore", scope: "global", id: "45348281", newValue: 58 }) * @exampleData { path: "universes/5097539509/orderedDataStores/PointsStore/scopes/global/entries/45348281", value: 58, id: "45348281" } * @exampleRawBody { path: "universes/5097539509/orderedDataStores/PointsStore/scopes/global/entries/45348281", value: 58, id: "45348281" } */ export declare const updateOrderedDatastoreEntry: <UniverseId extends Identifier, OrderedDataStore extends string, Scope extends string, Id extends string, Value extends Identifier>(this: any, args: { universeId: UniverseId; orderedDataStore: OrderedDataStore; scope: Scope; id: Id; newValue: Value; createIfNoEntryExists?: boolean | undefined; }) => Promise<{ data: { path: `universes/${UniverseId}/orderedDataStores/${OrderedDataStore}/scopes/${Scope}/entries/${Id}`; value: `${Value}`; id: Id; }; response: { fullResponse: unknown; url: `https://${string}`; method: import("../../../utils/utils.types").RestMethod; success: boolean; statusCode: number; headers: Headers; body: { path: `universes/${UniverseId}/orderedDataStores/${OrderedDataStore}/scopes/${Scope}/entries/${Id}`; value: `${Value}`; id: Id; }; }; } & { again: () => Promise<{ data: { path: `universes/${UniverseId}/orderedDataStores/${OrderedDataStore}/scopes/${Scope}/entries/${Id}`; value: `${Value}`; id: Id; }; response: { fullResponse: unknown; url: `https://${string}`; method: import("../../../utils/utils.types").RestMethod; success: boolean; statusCode: number; headers: Headers; body: { path: `universes/${UniverseId}/orderedDataStores/${OrderedDataStore}/scopes/${Scope}/entries/${Id}`; value: `${Value}`; id: Id; }; }; }>; }>; /** * Increments the specified entry. * @endpoint GET /v1/universes/{universeId}/orderedDataStores/{orderedDataStore}/scopes/{scope}/entries * @tags [ "Cloud Key" ] * @deprecated Please use `OrderedDataStoresApi_V2` for new work. * * @param universeId The identifier of the experience with ordered data stores that you want to access. * @param orderedDataStore The name of the target ordered data store. * @param scope The name of the data store scope. * @param id The id of the entry. * @param incrementBy The number to increment the entry's value by. * @param createIfNoEntryExists The flag to allow the creation of an entry if the entry doesn't exist. (allow_missing) * * @example * const { data:incrementedEntry } = await OrderedDataStoresApi_V1.incrementOrderedDatastoreEntry({ universeId: 5097539509, orderedDataStore: "PointsStore", scope: "global", id: "45348281", incrementBy: 26, createIfNoEntryExists: true }) * @exampleData { path: "universes/5097539509/orderedDataStores/PointsStore/scopes/global/entries/45348281", value: 66, id: "45348281" } * @exampleRawBody { path: "universes/5097539509/orderedDataStores/PointsStore/scopes/global/entries/45348281", value: 66, id: "45348281" } */ export declare const incrementOrderedDatastoreEntry: <UniverseId extends Identifier, OrderedDataStore extends string, Scope extends string, Id extends string>(this: any, args: { universeId: UniverseId; orderedDataStore: OrderedDataStore; scope: Scope; id: Id; incrementBy: Identifier; createIfNoEntryExists?: boolean | undefined; }) => Promise<{ data: { path: `universes/${UniverseId}/orderedDataStores/${OrderedDataStore}/scopes/${Scope}/entries/${Id}`; value: `${number}`; id: Id; }; response: { fullResponse: unknown; url: `https://${string}`; method: import("../../../utils/utils.types").RestMethod; success: boolean; statusCode: number; headers: Headers; body: { path: `universes/${UniverseId}/orderedDataStores/${OrderedDataStore}/scopes/${Scope}/entries/${Id}`; value: `${number}`; id: Id; }; }; } & { again: () => Promise<{ data: { path: `universes/${UniverseId}/orderedDataStores/${OrderedDataStore}/scopes/${Scope}/entries/${Id}`; value: `${number}`; id: Id; }; response: { fullResponse: unknown; url: `https://${string}`; method: import("../../../utils/utils.types").RestMethod; success: boolean; statusCode: number; headers: Headers; body: { path: `universes/${UniverseId}/orderedDataStores/${OrderedDataStore}/scopes/${Scope}/entries/${Id}`; value: `${number}`; id: Id; }; }; }>; }>;