@chrt-inc/typescript-sdk 1.441.1 → 1.448.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/README.md +11 -9
- package/dist/cjs/Client.d.ts +3 -3
- package/dist/cjs/Client.js +19 -19
- package/dist/cjs/api/resources/billing/resources/lineItemGroups/resources/s3Objects/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/billing/resources/lineItemGroups/resources/s3Objects/client/Client.js +2 -2
- package/dist/cjs/api/resources/billing/resources/lineItemGroups/resources/s3Objects/client/requests/BodyLineItemGroupsS3ObjectPostAddV1BillingLineItemGroupsS3ObjectsAddV1LineItemGroupIdPost.d.ts +2 -3
- package/dist/cjs/api/resources/index.d.ts +1 -2
- package/dist/cjs/api/resources/index.js +2 -3
- package/dist/cjs/api/resources/orgs/client/Client.d.ts +6 -72
- package/dist/cjs/api/resources/orgs/client/Client.js +14 -348
- package/dist/cjs/api/resources/orgs/client/requests/index.d.ts +0 -2
- package/dist/cjs/api/resources/orgs/resources/index.d.ts +3 -0
- package/dist/cjs/api/resources/orgs/resources/index.js +4 -1
- package/dist/cjs/api/resources/orgs/resources/privateData/client/Client.d.ts +44 -0
- package/dist/cjs/api/resources/orgs/resources/privateData/client/Client.js +118 -0
- package/dist/cjs/api/resources/orgs/resources/privateData/index.d.ts +1 -0
- package/dist/cjs/{core/exports.js → api/resources/orgs/resources/privateData/index.js} +1 -1
- package/dist/cjs/api/resources/orgs/resources/publicData/client/Client.d.ts +96 -0
- package/dist/cjs/api/resources/orgs/resources/publicData/client/Client.js +361 -0
- package/dist/cjs/api/resources/orgs/resources/publicData/client/index.d.ts +2 -0
- package/dist/cjs/{core/file → api/resources/orgs/resources/publicData/client}/index.js +1 -2
- package/dist/cjs/api/resources/orgs/resources/publicData/client/requests/index.d.ts +2 -0
- package/dist/cjs/api/resources/orgs/resources/publicData/index.d.ts +1 -0
- package/dist/cjs/{exports.js → api/resources/orgs/resources/publicData/index.js} +1 -1
- package/dist/cjs/api/resources/shipping/resources/taskArtifacts/resources/s3Object/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/shipping/resources/taskArtifacts/resources/s3Object/client/Client.js +2 -2
- package/dist/cjs/api/resources/shipping/resources/taskArtifacts/resources/s3Object/client/requests/BodyPostTaskArtifactsS3ObjectAddV1ShippingTaskArtifactsS3ObjectAddV1TaskArtifactIdPost.d.ts +2 -3
- package/dist/cjs/api/resources/shipping/resources/taskGroups/resources/s3Object/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/shipping/resources/taskGroups/resources/s3Object/client/Client.js +2 -2
- package/dist/cjs/api/resources/shipping/resources/taskGroups/resources/s3Object/client/requests/BodyPostTaskGroupsS3ObjectAddV1ShippingTaskGroupsS3ObjectAddV1TaskGroupIdPost.d.ts +2 -3
- package/dist/cjs/api/resources/users/client/Client.d.ts +6 -77
- package/dist/cjs/api/resources/users/client/Client.js +11 -349
- package/dist/cjs/api/resources/users/client/index.d.ts +0 -1
- package/dist/cjs/api/resources/users/client/index.js +0 -15
- package/dist/cjs/api/resources/users/resources/index.d.ts +3 -0
- package/dist/cjs/api/resources/users/resources/index.js +4 -1
- package/dist/cjs/api/resources/users/resources/privateData/client/Client.d.ts +87 -0
- package/dist/cjs/api/resources/users/resources/privateData/client/Client.js +309 -0
- package/dist/cjs/api/resources/users/resources/privateData/client/index.d.ts +2 -0
- package/dist/cjs/api/resources/users/resources/privateData/client/index.js +17 -0
- package/dist/cjs/api/resources/users/{client → resources/privateData/client}/requests/FirebaseCloudMessagingTokenClientCreate1.d.ts +1 -1
- package/dist/cjs/api/resources/users/resources/privateData/index.d.ts +1 -0
- package/dist/cjs/api/resources/users/resources/privateData/index.js +17 -0
- package/dist/cjs/api/resources/users/resources/publicData/client/Client.d.ts +44 -0
- package/dist/cjs/api/resources/users/resources/publicData/client/Client.js +118 -0
- package/dist/cjs/api/resources/users/resources/publicData/client/index.js +2 -0
- package/dist/cjs/api/resources/users/resources/publicData/index.d.ts +1 -0
- package/dist/cjs/api/resources/users/resources/publicData/index.js +17 -0
- package/dist/cjs/api/types/TaskArtifactS3ObjectMetadata1.d.ts +1 -1
- package/dist/cjs/api/types/TaskGroupS3ObjectMetadata1.d.ts +1 -1
- package/dist/cjs/api/types/ValidationError.d.ts +2 -0
- package/dist/cjs/core/index.d.ts +0 -1
- package/dist/cjs/core/index.js +1 -2
- package/dist/cjs/index.d.ts +0 -1
- package/dist/cjs/index.js +0 -4
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/Client.d.mts +3 -3
- package/dist/esm/Client.mjs +7 -7
- package/dist/esm/api/resources/billing/resources/lineItemGroups/resources/s3Objects/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/billing/resources/lineItemGroups/resources/s3Objects/client/Client.mjs +2 -2
- package/dist/esm/api/resources/billing/resources/lineItemGroups/resources/s3Objects/client/requests/BodyLineItemGroupsS3ObjectPostAddV1BillingLineItemGroupsS3ObjectsAddV1LineItemGroupIdPost.d.mts +2 -3
- package/dist/esm/api/resources/index.d.mts +1 -2
- package/dist/esm/api/resources/index.mjs +1 -2
- package/dist/esm/api/resources/orgs/client/Client.d.mts +6 -72
- package/dist/esm/api/resources/orgs/client/Client.mjs +10 -344
- package/dist/esm/api/resources/orgs/client/requests/index.d.mts +0 -2
- package/dist/esm/api/resources/orgs/resources/index.d.mts +3 -0
- package/dist/esm/api/resources/orgs/resources/index.mjs +3 -0
- package/dist/esm/api/resources/orgs/resources/privateData/client/Client.d.mts +44 -0
- package/dist/esm/api/resources/orgs/resources/privateData/client/Client.mjs +81 -0
- package/dist/esm/api/resources/orgs/resources/privateData/client/index.mjs +1 -0
- package/dist/esm/api/resources/orgs/resources/privateData/index.d.mts +1 -0
- package/dist/esm/api/resources/orgs/resources/privateData/index.mjs +1 -0
- package/dist/esm/api/resources/orgs/resources/publicData/client/Client.d.mts +96 -0
- package/dist/esm/api/resources/orgs/resources/publicData/client/Client.mjs +324 -0
- package/dist/esm/api/resources/orgs/resources/publicData/client/index.d.mts +2 -0
- package/dist/esm/api/resources/orgs/resources/publicData/client/index.mjs +1 -0
- package/dist/esm/api/resources/orgs/resources/publicData/client/requests/index.d.mts +2 -0
- package/dist/esm/api/resources/orgs/resources/publicData/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/orgs/resources/publicData/index.d.mts +1 -0
- package/dist/esm/api/resources/orgs/resources/publicData/index.mjs +1 -0
- package/dist/esm/api/resources/shipping/resources/taskArtifacts/resources/s3Object/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/shipping/resources/taskArtifacts/resources/s3Object/client/Client.mjs +2 -2
- package/dist/esm/api/resources/shipping/resources/taskArtifacts/resources/s3Object/client/requests/BodyPostTaskArtifactsS3ObjectAddV1ShippingTaskArtifactsS3ObjectAddV1TaskArtifactIdPost.d.mts +2 -3
- package/dist/esm/api/resources/shipping/resources/taskGroups/resources/s3Object/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/shipping/resources/taskGroups/resources/s3Object/client/Client.mjs +2 -2
- package/dist/esm/api/resources/shipping/resources/taskGroups/resources/s3Object/client/requests/BodyPostTaskGroupsS3ObjectAddV1ShippingTaskGroupsS3ObjectAddV1TaskGroupIdPost.d.mts +2 -3
- package/dist/esm/api/resources/users/client/Client.d.mts +6 -77
- package/dist/esm/api/resources/users/client/Client.mjs +10 -315
- package/dist/esm/api/resources/users/client/index.d.mts +0 -1
- package/dist/esm/api/resources/users/client/index.mjs +1 -1
- package/dist/esm/api/resources/users/resources/index.d.mts +3 -0
- package/dist/esm/api/resources/users/resources/index.mjs +3 -0
- package/dist/esm/api/resources/users/resources/privateData/client/Client.d.mts +87 -0
- package/dist/esm/api/resources/users/resources/privateData/client/Client.mjs +272 -0
- package/dist/esm/api/resources/users/resources/privateData/client/index.d.mts +2 -0
- package/dist/esm/api/resources/users/resources/privateData/client/index.mjs +1 -0
- package/dist/esm/api/resources/users/{client → resources/privateData/client}/requests/FirebaseCloudMessagingTokenClientCreate1.d.mts +1 -1
- package/dist/esm/api/resources/users/resources/privateData/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/users/resources/privateData/index.d.mts +1 -0
- package/dist/esm/api/resources/users/resources/privateData/index.mjs +1 -0
- package/dist/esm/api/resources/users/resources/publicData/client/Client.d.mts +44 -0
- package/dist/esm/api/resources/users/resources/publicData/client/Client.mjs +81 -0
- package/dist/esm/api/resources/users/resources/publicData/client/index.d.mts +1 -0
- package/dist/esm/api/resources/users/resources/publicData/client/index.mjs +1 -0
- package/dist/esm/api/resources/users/resources/publicData/index.d.mts +1 -0
- package/dist/esm/api/resources/users/resources/publicData/index.mjs +1 -0
- package/dist/esm/api/types/TaskArtifactS3ObjectMetadata1.d.mts +1 -1
- package/dist/esm/api/types/TaskGroupS3ObjectMetadata1.d.mts +1 -1
- package/dist/esm/api/types/ValidationError.d.mts +2 -0
- package/dist/esm/core/index.d.mts +0 -1
- package/dist/esm/core/index.mjs +0 -1
- package/dist/esm/index.d.mts +0 -1
- package/dist/esm/index.mjs +0 -1
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +1962 -1956
- package/dist/cjs/core/exports.d.ts +0 -1
- package/dist/cjs/core/file/exports.d.ts +0 -1
- package/dist/cjs/core/file/file.d.ts +0 -5
- package/dist/cjs/core/file/file.js +0 -203
- package/dist/cjs/core/file/index.d.ts +0 -2
- package/dist/cjs/core/file/types.d.ts +0 -66
- package/dist/cjs/exports.d.ts +0 -1
- package/dist/esm/core/exports.d.mts +0 -1
- package/dist/esm/core/exports.mjs +0 -1
- package/dist/esm/core/file/exports.d.mts +0 -1
- package/dist/esm/core/file/file.d.mts +0 -5
- package/dist/esm/core/file/file.mjs +0 -167
- package/dist/esm/core/file/index.d.mts +0 -2
- package/dist/esm/core/file/index.mjs +0 -2
- package/dist/esm/core/file/types.d.mts +0 -66
- package/dist/esm/exports.d.mts +0 -1
- package/dist/esm/exports.mjs +0 -1
- /package/dist/{esm/api/resources/users/client/requests/index.mjs → cjs/api/resources/orgs/resources/privateData/client/index.d.ts} +0 -0
- /package/dist/cjs/api/resources/{users/client/requests → orgs/resources/privateData/client}/index.js +0 -0
- /package/dist/cjs/api/resources/orgs/{client → resources/publicData/client}/requests/CreateOrgPublicDataReq.d.ts +0 -0
- /package/dist/cjs/api/resources/orgs/{client → resources/publicData/client}/requests/CreateOrgPublicDataReq.js +0 -0
- /package/dist/cjs/api/resources/orgs/{client → resources/publicData/client}/requests/UpdateOrgPublicDataReq.d.ts +0 -0
- /package/dist/cjs/api/resources/orgs/{client → resources/publicData/client}/requests/UpdateOrgPublicDataReq.js +0 -0
- /package/dist/cjs/{core/file/exports.js → api/resources/orgs/resources/publicData/client/requests/index.js} +0 -0
- /package/dist/cjs/api/resources/users/{client → resources/privateData/client}/requests/FirebaseCloudMessagingTokenClientCreate1.js +0 -0
- /package/dist/cjs/api/resources/users/{client → resources/privateData/client}/requests/UserPrivateDataClientCreate1.d.ts +0 -0
- /package/dist/cjs/api/resources/users/{client → resources/privateData/client}/requests/UserPrivateDataClientCreate1.js +0 -0
- /package/dist/cjs/api/resources/users/{client → resources/privateData/client}/requests/UserPrivateDataClientUpdate1.d.ts +0 -0
- /package/dist/cjs/api/resources/users/{client → resources/privateData/client}/requests/UserPrivateDataClientUpdate1.js +0 -0
- /package/dist/cjs/api/resources/users/{client → resources/privateData/client}/requests/index.d.ts +0 -0
- /package/dist/cjs/{core/file/types.js → api/resources/users/resources/privateData/client/requests/index.js} +0 -0
- /package/dist/{esm/core/file/exports.mjs → cjs/api/resources/users/resources/publicData/client/index.d.ts} +0 -0
- /package/dist/esm/{core/file/types.mjs → api/resources/orgs/resources/privateData/client/index.d.mts} +0 -0
- /package/dist/esm/api/resources/orgs/{client → resources/publicData/client}/requests/CreateOrgPublicDataReq.d.mts +0 -0
- /package/dist/esm/api/resources/orgs/{client → resources/publicData/client}/requests/CreateOrgPublicDataReq.mjs +0 -0
- /package/dist/esm/api/resources/orgs/{client → resources/publicData/client}/requests/UpdateOrgPublicDataReq.d.mts +0 -0
- /package/dist/esm/api/resources/orgs/{client → resources/publicData/client}/requests/UpdateOrgPublicDataReq.mjs +0 -0
- /package/dist/esm/api/resources/users/{client → resources/privateData/client}/requests/FirebaseCloudMessagingTokenClientCreate1.mjs +0 -0
- /package/dist/esm/api/resources/users/{client → resources/privateData/client}/requests/UserPrivateDataClientCreate1.d.mts +0 -0
- /package/dist/esm/api/resources/users/{client → resources/privateData/client}/requests/UserPrivateDataClientCreate1.mjs +0 -0
- /package/dist/esm/api/resources/users/{client → resources/privateData/client}/requests/UserPrivateDataClientUpdate1.d.mts +0 -0
- /package/dist/esm/api/resources/users/{client → resources/privateData/client}/requests/UserPrivateDataClientUpdate1.mjs +0 -0
- /package/dist/esm/api/resources/users/{client → resources/privateData/client}/requests/index.d.mts +0 -0
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as environments from "../../../../environments.js";
|
|
5
5
|
import * as core from "../../../../core/index.js";
|
|
6
|
-
import
|
|
6
|
+
import { PublicData } from "../resources/publicData/client/Client.js";
|
|
7
|
+
import { PrivateData } from "../resources/privateData/client/Client.js";
|
|
7
8
|
import { DirectoryEntries } from "../resources/directoryEntries/client/Client.js";
|
|
8
9
|
export declare namespace Users {
|
|
9
10
|
interface Options {
|
|
@@ -15,86 +16,14 @@ export declare namespace Users {
|
|
|
15
16
|
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
16
17
|
fetcher?: core.FetchFunction;
|
|
17
18
|
}
|
|
18
|
-
interface RequestOptions {
|
|
19
|
-
/** The maximum time to wait for a response in seconds. */
|
|
20
|
-
timeoutInSeconds?: number;
|
|
21
|
-
/** The number of times to retry the request. Defaults to 2. */
|
|
22
|
-
maxRetries?: number;
|
|
23
|
-
/** A hook to abort the request. */
|
|
24
|
-
abortSignal?: AbortSignal;
|
|
25
|
-
/** Additional query string parameters to include in the request. */
|
|
26
|
-
queryParams?: Record<string, unknown>;
|
|
27
|
-
/** Additional headers to include in the request. */
|
|
28
|
-
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
29
|
-
}
|
|
30
19
|
}
|
|
31
20
|
export declare class Users {
|
|
32
21
|
protected readonly _options: Users.Options;
|
|
22
|
+
protected _publicData: PublicData | undefined;
|
|
23
|
+
protected _privateData: PrivateData | undefined;
|
|
33
24
|
protected _directoryEntries: DirectoryEntries | undefined;
|
|
34
25
|
constructor(_options?: Users.Options);
|
|
26
|
+
get publicData(): PublicData;
|
|
27
|
+
get privateData(): PrivateData;
|
|
35
28
|
get directoryEntries(): DirectoryEntries;
|
|
36
|
-
/**
|
|
37
|
-
* Retrieves public user data for the caller. | () -> (UserPublicData1)
|
|
38
|
-
*
|
|
39
|
-
* @param {Users.RequestOptions} requestOptions - Request-specific configuration.
|
|
40
|
-
*
|
|
41
|
-
* @example
|
|
42
|
-
* await client.users.getUserPublicDataV1()
|
|
43
|
-
*/
|
|
44
|
-
getUserPublicDataV1(requestOptions?: Users.RequestOptions): core.HttpResponsePromise<Chrt.UserPublicData1>;
|
|
45
|
-
private __getUserPublicDataV1;
|
|
46
|
-
/**
|
|
47
|
-
* Retrieves private user data for the caller. | () -> (UserPrivateData1)
|
|
48
|
-
*
|
|
49
|
-
* @param {Users.RequestOptions} requestOptions - Request-specific configuration.
|
|
50
|
-
*
|
|
51
|
-
* @example
|
|
52
|
-
* await client.users.getUserPrivateDataV1()
|
|
53
|
-
*/
|
|
54
|
-
getUserPrivateDataV1(requestOptions?: Users.RequestOptions): core.HttpResponsePromise<Chrt.UserPrivateData1>;
|
|
55
|
-
private __getUserPrivateDataV1;
|
|
56
|
-
/**
|
|
57
|
-
* Creates private user data for the caller. | (UserPrivateDataClientCreate1) -> (UserPrivateData1)
|
|
58
|
-
*
|
|
59
|
-
* @param {Chrt.UserPrivateDataClientCreate1} request
|
|
60
|
-
* @param {Users.RequestOptions} requestOptions - Request-specific configuration.
|
|
61
|
-
*
|
|
62
|
-
* @throws {@link Chrt.UnprocessableEntityError}
|
|
63
|
-
*
|
|
64
|
-
* @example
|
|
65
|
-
* await client.users.createUserPrivateDataV1({
|
|
66
|
-
* schema_version: 1
|
|
67
|
-
* })
|
|
68
|
-
*/
|
|
69
|
-
createUserPrivateDataV1(request: Chrt.UserPrivateDataClientCreate1, requestOptions?: Users.RequestOptions): core.HttpResponsePromise<Chrt.UserPrivateData1>;
|
|
70
|
-
private __createUserPrivateDataV1;
|
|
71
|
-
/**
|
|
72
|
-
* Updates private user data for the caller. | (UserPrivateDataClientUpdate1) -> (UserPrivateData1)
|
|
73
|
-
*
|
|
74
|
-
* @param {Chrt.UserPrivateDataClientUpdate1} request
|
|
75
|
-
* @param {Users.RequestOptions} requestOptions - Request-specific configuration.
|
|
76
|
-
*
|
|
77
|
-
* @throws {@link Chrt.UnprocessableEntityError}
|
|
78
|
-
*
|
|
79
|
-
* @example
|
|
80
|
-
* await client.users.updateUserPrivateDataV1()
|
|
81
|
-
*/
|
|
82
|
-
updateUserPrivateDataV1(request?: Chrt.UserPrivateDataClientUpdate1, requestOptions?: Users.RequestOptions): core.HttpResponsePromise<Chrt.UserPrivateData1>;
|
|
83
|
-
private __updateUserPrivateDataV1;
|
|
84
|
-
/**
|
|
85
|
-
* Upserts a Firebase Cloud Messaging token for the caller. Dedupes on token; if token exists, updates last_used_timestamp. | (FirebaseCloudMessagingTokenClientCreate1) -> (UserPrivateData1)
|
|
86
|
-
*
|
|
87
|
-
* @param {Chrt.FirebaseCloudMessagingTokenClientCreate1} request
|
|
88
|
-
* @param {Users.RequestOptions} requestOptions - Request-specific configuration.
|
|
89
|
-
*
|
|
90
|
-
* @throws {@link Chrt.UnprocessableEntityError}
|
|
91
|
-
*
|
|
92
|
-
* @example
|
|
93
|
-
* await client.users.upsertFirebaseCloudMessagingTokenV1({
|
|
94
|
-
* firebase_cloud_messaging_token: "firebase_cloud_messaging_token"
|
|
95
|
-
* })
|
|
96
|
-
*/
|
|
97
|
-
upsertFirebaseCloudMessagingTokenV1(request: Chrt.FirebaseCloudMessagingTokenClientCreate1, requestOptions?: Users.RequestOptions): core.HttpResponsePromise<Chrt.UserPrivateData1>;
|
|
98
|
-
private __upsertFirebaseCloudMessagingTokenV1;
|
|
99
|
-
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
100
29
|
}
|
|
@@ -2,364 +2,26 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* This file was auto-generated by Fern from our API Definition.
|
|
4
4
|
*/
|
|
5
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
-
}
|
|
11
|
-
Object.defineProperty(o, k2, desc);
|
|
12
|
-
}) : (function(o, m, k, k2) {
|
|
13
|
-
if (k2 === undefined) k2 = k;
|
|
14
|
-
o[k2] = m[k];
|
|
15
|
-
}));
|
|
16
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
-
}) : function(o, v) {
|
|
19
|
-
o["default"] = v;
|
|
20
|
-
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
-
var ownKeys = function(o) {
|
|
23
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
-
var ar = [];
|
|
25
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
-
return ar;
|
|
27
|
-
};
|
|
28
|
-
return ownKeys(o);
|
|
29
|
-
};
|
|
30
|
-
return function (mod) {
|
|
31
|
-
if (mod && mod.__esModule) return mod;
|
|
32
|
-
var result = {};
|
|
33
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
-
__setModuleDefault(result, mod);
|
|
35
|
-
return result;
|
|
36
|
-
};
|
|
37
|
-
})();
|
|
38
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
39
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
40
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
41
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
42
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
43
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
44
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
45
|
-
});
|
|
46
|
-
};
|
|
47
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
6
|
exports.Users = void 0;
|
|
49
|
-
const
|
|
50
|
-
const
|
|
51
|
-
const
|
|
52
|
-
const headers_js_1 = require("../../../../core/headers.js");
|
|
53
|
-
const errors = __importStar(require("../../../../errors/index.js"));
|
|
54
|
-
const Client_js_1 = require("../resources/directoryEntries/client/Client.js");
|
|
7
|
+
const Client_js_1 = require("../resources/publicData/client/Client.js");
|
|
8
|
+
const Client_js_2 = require("../resources/privateData/client/Client.js");
|
|
9
|
+
const Client_js_3 = require("../resources/directoryEntries/client/Client.js");
|
|
55
10
|
class Users {
|
|
56
11
|
constructor(_options = {}) {
|
|
57
12
|
this._options = _options;
|
|
58
13
|
}
|
|
59
|
-
get
|
|
14
|
+
get publicData() {
|
|
60
15
|
var _a;
|
|
61
|
-
return ((_a = this.
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* Retrieves public user data for the caller. | () -> (UserPublicData1)
|
|
65
|
-
*
|
|
66
|
-
* @param {Users.RequestOptions} requestOptions - Request-specific configuration.
|
|
67
|
-
*
|
|
68
|
-
* @example
|
|
69
|
-
* await client.users.getUserPublicDataV1()
|
|
70
|
-
*/
|
|
71
|
-
getUserPublicDataV1(requestOptions) {
|
|
72
|
-
return core.HttpResponsePromise.fromPromise(this.__getUserPublicDataV1(requestOptions));
|
|
73
|
-
}
|
|
74
|
-
__getUserPublicDataV1(requestOptions) {
|
|
75
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
76
|
-
var _a, _b, _c, _d;
|
|
77
|
-
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
78
|
-
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
79
|
-
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, "users/user_public_data/v1"),
|
|
80
|
-
method: "GET",
|
|
81
|
-
headers: _headers,
|
|
82
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
83
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
84
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
85
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
86
|
-
});
|
|
87
|
-
if (_response.ok) {
|
|
88
|
-
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
89
|
-
}
|
|
90
|
-
if (_response.error.reason === "status-code") {
|
|
91
|
-
throw new errors.ChrtError({
|
|
92
|
-
statusCode: _response.error.statusCode,
|
|
93
|
-
body: _response.error.body,
|
|
94
|
-
rawResponse: _response.rawResponse,
|
|
95
|
-
});
|
|
96
|
-
}
|
|
97
|
-
switch (_response.error.reason) {
|
|
98
|
-
case "non-json":
|
|
99
|
-
throw new errors.ChrtError({
|
|
100
|
-
statusCode: _response.error.statusCode,
|
|
101
|
-
body: _response.error.rawBody,
|
|
102
|
-
rawResponse: _response.rawResponse,
|
|
103
|
-
});
|
|
104
|
-
case "timeout":
|
|
105
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /users/user_public_data/v1.");
|
|
106
|
-
case "unknown":
|
|
107
|
-
throw new errors.ChrtError({
|
|
108
|
-
message: _response.error.errorMessage,
|
|
109
|
-
rawResponse: _response.rawResponse,
|
|
110
|
-
});
|
|
111
|
-
}
|
|
112
|
-
});
|
|
113
|
-
}
|
|
114
|
-
/**
|
|
115
|
-
* Retrieves private user data for the caller. | () -> (UserPrivateData1)
|
|
116
|
-
*
|
|
117
|
-
* @param {Users.RequestOptions} requestOptions - Request-specific configuration.
|
|
118
|
-
*
|
|
119
|
-
* @example
|
|
120
|
-
* await client.users.getUserPrivateDataV1()
|
|
121
|
-
*/
|
|
122
|
-
getUserPrivateDataV1(requestOptions) {
|
|
123
|
-
return core.HttpResponsePromise.fromPromise(this.__getUserPrivateDataV1(requestOptions));
|
|
124
|
-
}
|
|
125
|
-
__getUserPrivateDataV1(requestOptions) {
|
|
126
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
127
|
-
var _a, _b, _c, _d;
|
|
128
|
-
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
129
|
-
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
130
|
-
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, "users/user_private_data/v1"),
|
|
131
|
-
method: "GET",
|
|
132
|
-
headers: _headers,
|
|
133
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
134
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
135
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
136
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
137
|
-
});
|
|
138
|
-
if (_response.ok) {
|
|
139
|
-
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
140
|
-
}
|
|
141
|
-
if (_response.error.reason === "status-code") {
|
|
142
|
-
throw new errors.ChrtError({
|
|
143
|
-
statusCode: _response.error.statusCode,
|
|
144
|
-
body: _response.error.body,
|
|
145
|
-
rawResponse: _response.rawResponse,
|
|
146
|
-
});
|
|
147
|
-
}
|
|
148
|
-
switch (_response.error.reason) {
|
|
149
|
-
case "non-json":
|
|
150
|
-
throw new errors.ChrtError({
|
|
151
|
-
statusCode: _response.error.statusCode,
|
|
152
|
-
body: _response.error.rawBody,
|
|
153
|
-
rawResponse: _response.rawResponse,
|
|
154
|
-
});
|
|
155
|
-
case "timeout":
|
|
156
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /users/user_private_data/v1.");
|
|
157
|
-
case "unknown":
|
|
158
|
-
throw new errors.ChrtError({
|
|
159
|
-
message: _response.error.errorMessage,
|
|
160
|
-
rawResponse: _response.rawResponse,
|
|
161
|
-
});
|
|
162
|
-
}
|
|
163
|
-
});
|
|
164
|
-
}
|
|
165
|
-
/**
|
|
166
|
-
* Creates private user data for the caller. | (UserPrivateDataClientCreate1) -> (UserPrivateData1)
|
|
167
|
-
*
|
|
168
|
-
* @param {Chrt.UserPrivateDataClientCreate1} request
|
|
169
|
-
* @param {Users.RequestOptions} requestOptions - Request-specific configuration.
|
|
170
|
-
*
|
|
171
|
-
* @throws {@link Chrt.UnprocessableEntityError}
|
|
172
|
-
*
|
|
173
|
-
* @example
|
|
174
|
-
* await client.users.createUserPrivateDataV1({
|
|
175
|
-
* schema_version: 1
|
|
176
|
-
* })
|
|
177
|
-
*/
|
|
178
|
-
createUserPrivateDataV1(request, requestOptions) {
|
|
179
|
-
return core.HttpResponsePromise.fromPromise(this.__createUserPrivateDataV1(request, requestOptions));
|
|
16
|
+
return ((_a = this._publicData) !== null && _a !== void 0 ? _a : (this._publicData = new Client_js_1.PublicData(this._options)));
|
|
180
17
|
}
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
185
|
-
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
186
|
-
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, "users/user_private_data/v1"),
|
|
187
|
-
method: "POST",
|
|
188
|
-
headers: _headers,
|
|
189
|
-
contentType: "application/json",
|
|
190
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
191
|
-
requestType: "json",
|
|
192
|
-
body: request,
|
|
193
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
194
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
195
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
196
|
-
});
|
|
197
|
-
if (_response.ok) {
|
|
198
|
-
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
199
|
-
}
|
|
200
|
-
if (_response.error.reason === "status-code") {
|
|
201
|
-
switch (_response.error.statusCode) {
|
|
202
|
-
case 422:
|
|
203
|
-
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
204
|
-
default:
|
|
205
|
-
throw new errors.ChrtError({
|
|
206
|
-
statusCode: _response.error.statusCode,
|
|
207
|
-
body: _response.error.body,
|
|
208
|
-
rawResponse: _response.rawResponse,
|
|
209
|
-
});
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
switch (_response.error.reason) {
|
|
213
|
-
case "non-json":
|
|
214
|
-
throw new errors.ChrtError({
|
|
215
|
-
statusCode: _response.error.statusCode,
|
|
216
|
-
body: _response.error.rawBody,
|
|
217
|
-
rawResponse: _response.rawResponse,
|
|
218
|
-
});
|
|
219
|
-
case "timeout":
|
|
220
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /users/user_private_data/v1.");
|
|
221
|
-
case "unknown":
|
|
222
|
-
throw new errors.ChrtError({
|
|
223
|
-
message: _response.error.errorMessage,
|
|
224
|
-
rawResponse: _response.rawResponse,
|
|
225
|
-
});
|
|
226
|
-
}
|
|
227
|
-
});
|
|
228
|
-
}
|
|
229
|
-
/**
|
|
230
|
-
* Updates private user data for the caller. | (UserPrivateDataClientUpdate1) -> (UserPrivateData1)
|
|
231
|
-
*
|
|
232
|
-
* @param {Chrt.UserPrivateDataClientUpdate1} request
|
|
233
|
-
* @param {Users.RequestOptions} requestOptions - Request-specific configuration.
|
|
234
|
-
*
|
|
235
|
-
* @throws {@link Chrt.UnprocessableEntityError}
|
|
236
|
-
*
|
|
237
|
-
* @example
|
|
238
|
-
* await client.users.updateUserPrivateDataV1()
|
|
239
|
-
*/
|
|
240
|
-
updateUserPrivateDataV1(request = {}, requestOptions) {
|
|
241
|
-
return core.HttpResponsePromise.fromPromise(this.__updateUserPrivateDataV1(request, requestOptions));
|
|
242
|
-
}
|
|
243
|
-
__updateUserPrivateDataV1() {
|
|
244
|
-
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
245
|
-
var _a, _b, _c, _d;
|
|
246
|
-
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
247
|
-
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
248
|
-
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, "users/user_private_data/v1"),
|
|
249
|
-
method: "PATCH",
|
|
250
|
-
headers: _headers,
|
|
251
|
-
contentType: "application/json",
|
|
252
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
253
|
-
requestType: "json",
|
|
254
|
-
body: request,
|
|
255
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
256
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
257
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
258
|
-
});
|
|
259
|
-
if (_response.ok) {
|
|
260
|
-
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
261
|
-
}
|
|
262
|
-
if (_response.error.reason === "status-code") {
|
|
263
|
-
switch (_response.error.statusCode) {
|
|
264
|
-
case 422:
|
|
265
|
-
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
266
|
-
default:
|
|
267
|
-
throw new errors.ChrtError({
|
|
268
|
-
statusCode: _response.error.statusCode,
|
|
269
|
-
body: _response.error.body,
|
|
270
|
-
rawResponse: _response.rawResponse,
|
|
271
|
-
});
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
switch (_response.error.reason) {
|
|
275
|
-
case "non-json":
|
|
276
|
-
throw new errors.ChrtError({
|
|
277
|
-
statusCode: _response.error.statusCode,
|
|
278
|
-
body: _response.error.rawBody,
|
|
279
|
-
rawResponse: _response.rawResponse,
|
|
280
|
-
});
|
|
281
|
-
case "timeout":
|
|
282
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling PATCH /users/user_private_data/v1.");
|
|
283
|
-
case "unknown":
|
|
284
|
-
throw new errors.ChrtError({
|
|
285
|
-
message: _response.error.errorMessage,
|
|
286
|
-
rawResponse: _response.rawResponse,
|
|
287
|
-
});
|
|
288
|
-
}
|
|
289
|
-
});
|
|
290
|
-
}
|
|
291
|
-
/**
|
|
292
|
-
* Upserts a Firebase Cloud Messaging token for the caller. Dedupes on token; if token exists, updates last_used_timestamp. | (FirebaseCloudMessagingTokenClientCreate1) -> (UserPrivateData1)
|
|
293
|
-
*
|
|
294
|
-
* @param {Chrt.FirebaseCloudMessagingTokenClientCreate1} request
|
|
295
|
-
* @param {Users.RequestOptions} requestOptions - Request-specific configuration.
|
|
296
|
-
*
|
|
297
|
-
* @throws {@link Chrt.UnprocessableEntityError}
|
|
298
|
-
*
|
|
299
|
-
* @example
|
|
300
|
-
* await client.users.upsertFirebaseCloudMessagingTokenV1({
|
|
301
|
-
* firebase_cloud_messaging_token: "firebase_cloud_messaging_token"
|
|
302
|
-
* })
|
|
303
|
-
*/
|
|
304
|
-
upsertFirebaseCloudMessagingTokenV1(request, requestOptions) {
|
|
305
|
-
return core.HttpResponsePromise.fromPromise(this.__upsertFirebaseCloudMessagingTokenV1(request, requestOptions));
|
|
306
|
-
}
|
|
307
|
-
__upsertFirebaseCloudMessagingTokenV1(request, requestOptions) {
|
|
308
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
309
|
-
var _a, _b, _c, _d;
|
|
310
|
-
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
311
|
-
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
312
|
-
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, "users/user_private_data/firebase_cloud_messaging_token/v1"),
|
|
313
|
-
method: "PUT",
|
|
314
|
-
headers: _headers,
|
|
315
|
-
contentType: "application/json",
|
|
316
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
317
|
-
requestType: "json",
|
|
318
|
-
body: request,
|
|
319
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
320
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
321
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
322
|
-
});
|
|
323
|
-
if (_response.ok) {
|
|
324
|
-
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
325
|
-
}
|
|
326
|
-
if (_response.error.reason === "status-code") {
|
|
327
|
-
switch (_response.error.statusCode) {
|
|
328
|
-
case 422:
|
|
329
|
-
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
330
|
-
default:
|
|
331
|
-
throw new errors.ChrtError({
|
|
332
|
-
statusCode: _response.error.statusCode,
|
|
333
|
-
body: _response.error.body,
|
|
334
|
-
rawResponse: _response.rawResponse,
|
|
335
|
-
});
|
|
336
|
-
}
|
|
337
|
-
}
|
|
338
|
-
switch (_response.error.reason) {
|
|
339
|
-
case "non-json":
|
|
340
|
-
throw new errors.ChrtError({
|
|
341
|
-
statusCode: _response.error.statusCode,
|
|
342
|
-
body: _response.error.rawBody,
|
|
343
|
-
rawResponse: _response.rawResponse,
|
|
344
|
-
});
|
|
345
|
-
case "timeout":
|
|
346
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling PUT /users/user_private_data/firebase_cloud_messaging_token/v1.");
|
|
347
|
-
case "unknown":
|
|
348
|
-
throw new errors.ChrtError({
|
|
349
|
-
message: _response.error.errorMessage,
|
|
350
|
-
rawResponse: _response.rawResponse,
|
|
351
|
-
});
|
|
352
|
-
}
|
|
353
|
-
});
|
|
18
|
+
get privateData() {
|
|
19
|
+
var _a;
|
|
20
|
+
return ((_a = this._privateData) !== null && _a !== void 0 ? _a : (this._privateData = new Client_js_2.PrivateData(this._options)));
|
|
354
21
|
}
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
if (bearer != null) {
|
|
359
|
-
return `Bearer ${bearer}`;
|
|
360
|
-
}
|
|
361
|
-
return undefined;
|
|
362
|
-
});
|
|
22
|
+
get directoryEntries() {
|
|
23
|
+
var _a;
|
|
24
|
+
return ((_a = this._directoryEntries) !== null && _a !== void 0 ? _a : (this._directoryEntries = new Client_js_3.DirectoryEntries(this._options)));
|
|
363
25
|
}
|
|
364
26
|
}
|
|
365
27
|
exports.Users = Users;
|
|
@@ -1,17 +1,2 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./requests/index.js"), exports);
|
|
@@ -1,2 +1,5 @@
|
|
|
1
|
+
export * as publicData from "./publicData/index.js";
|
|
2
|
+
export * as privateData from "./privateData/index.js";
|
|
1
3
|
export * as directoryEntries from "./directoryEntries/index.js";
|
|
4
|
+
export * from "./privateData/client/requests/index.js";
|
|
2
5
|
export * from "./directoryEntries/client/requests/index.js";
|
|
@@ -36,6 +36,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
36
36
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.directoryEntries = void 0;
|
|
39
|
+
exports.directoryEntries = exports.privateData = exports.publicData = void 0;
|
|
40
|
+
exports.publicData = __importStar(require("./publicData/index.js"));
|
|
41
|
+
exports.privateData = __importStar(require("./privateData/index.js"));
|
|
40
42
|
exports.directoryEntries = __importStar(require("./directoryEntries/index.js"));
|
|
43
|
+
__exportStar(require("./privateData/client/requests/index.js"), exports);
|
|
41
44
|
__exportStar(require("./directoryEntries/client/requests/index.js"), exports);
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as environments from "../../../../../../environments.js";
|
|
5
|
+
import * as core from "../../../../../../core/index.js";
|
|
6
|
+
import * as Chrt from "../../../../../index.js";
|
|
7
|
+
export declare namespace PrivateData {
|
|
8
|
+
interface Options {
|
|
9
|
+
environment?: core.Supplier<environments.ChrtEnvironment | string>;
|
|
10
|
+
/** Specify a custom URL to connect the client to. */
|
|
11
|
+
baseUrl?: core.Supplier<string>;
|
|
12
|
+
token?: core.Supplier<core.BearerToken | undefined>;
|
|
13
|
+
/** Additional headers to include in requests. */
|
|
14
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
15
|
+
fetcher?: core.FetchFunction;
|
|
16
|
+
}
|
|
17
|
+
interface RequestOptions {
|
|
18
|
+
/** The maximum time to wait for a response in seconds. */
|
|
19
|
+
timeoutInSeconds?: number;
|
|
20
|
+
/** The number of times to retry the request. Defaults to 2. */
|
|
21
|
+
maxRetries?: number;
|
|
22
|
+
/** A hook to abort the request. */
|
|
23
|
+
abortSignal?: AbortSignal;
|
|
24
|
+
/** Additional query string parameters to include in the request. */
|
|
25
|
+
queryParams?: Record<string, unknown>;
|
|
26
|
+
/** Additional headers to include in the request. */
|
|
27
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
export declare class PrivateData {
|
|
31
|
+
protected readonly _options: PrivateData.Options;
|
|
32
|
+
constructor(_options?: PrivateData.Options);
|
|
33
|
+
/**
|
|
34
|
+
* Retrieves private user data for the caller. | () -> (UserPrivateData1)
|
|
35
|
+
*
|
|
36
|
+
* @param {PrivateData.RequestOptions} requestOptions - Request-specific configuration.
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* await client.users.privateData.getV1()
|
|
40
|
+
*/
|
|
41
|
+
getV1(requestOptions?: PrivateData.RequestOptions): core.HttpResponsePromise<Chrt.UserPrivateData1>;
|
|
42
|
+
private __getV1;
|
|
43
|
+
/**
|
|
44
|
+
* Creates private user data for the caller. | (UserPrivateDataClientCreate1) -> (UserPrivateData1)
|
|
45
|
+
*
|
|
46
|
+
* @param {Chrt.users.UserPrivateDataClientCreate1} request
|
|
47
|
+
* @param {PrivateData.RequestOptions} requestOptions - Request-specific configuration.
|
|
48
|
+
*
|
|
49
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
50
|
+
*
|
|
51
|
+
* @example
|
|
52
|
+
* await client.users.privateData.createV1({
|
|
53
|
+
* schema_version: 1
|
|
54
|
+
* })
|
|
55
|
+
*/
|
|
56
|
+
createV1(request: Chrt.users.UserPrivateDataClientCreate1, requestOptions?: PrivateData.RequestOptions): core.HttpResponsePromise<Chrt.UserPrivateData1>;
|
|
57
|
+
private __createV1;
|
|
58
|
+
/**
|
|
59
|
+
* Updates private user data for the caller. | (UserPrivateDataClientUpdate1) -> (UserPrivateData1)
|
|
60
|
+
*
|
|
61
|
+
* @param {Chrt.users.UserPrivateDataClientUpdate1} request
|
|
62
|
+
* @param {PrivateData.RequestOptions} requestOptions - Request-specific configuration.
|
|
63
|
+
*
|
|
64
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
65
|
+
*
|
|
66
|
+
* @example
|
|
67
|
+
* await client.users.privateData.updateV1()
|
|
68
|
+
*/
|
|
69
|
+
updateV1(request?: Chrt.users.UserPrivateDataClientUpdate1, requestOptions?: PrivateData.RequestOptions): core.HttpResponsePromise<Chrt.UserPrivateData1>;
|
|
70
|
+
private __updateV1;
|
|
71
|
+
/**
|
|
72
|
+
* Upserts a Firebase Cloud Messaging token for the caller. Dedupes on token; if token exists, updates last_used_timestamp. | (FirebaseCloudMessagingTokenClientCreate1) -> (UserPrivateData1)
|
|
73
|
+
*
|
|
74
|
+
* @param {Chrt.users.FirebaseCloudMessagingTokenClientCreate1} request
|
|
75
|
+
* @param {PrivateData.RequestOptions} requestOptions - Request-specific configuration.
|
|
76
|
+
*
|
|
77
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
78
|
+
*
|
|
79
|
+
* @example
|
|
80
|
+
* await client.users.privateData.upsertFirebaseCloudMessagingTokenV1({
|
|
81
|
+
* firebase_cloud_messaging_token: "firebase_cloud_messaging_token"
|
|
82
|
+
* })
|
|
83
|
+
*/
|
|
84
|
+
upsertFirebaseCloudMessagingTokenV1(request: Chrt.users.FirebaseCloudMessagingTokenClientCreate1, requestOptions?: PrivateData.RequestOptions): core.HttpResponsePromise<Chrt.UserPrivateData1>;
|
|
85
|
+
private __upsertFirebaseCloudMessagingTokenV1;
|
|
86
|
+
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
87
|
+
}
|