@fabriktor/client 0.0.41 → 0.0.42
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/dist/src/billable/billable.d.ts +6 -5
- package/dist/src/calls/calls.d.ts +2 -1
- package/dist/src/chat/chat.d.ts +3 -2
- package/dist/src/contacts/contacts.d.ts +2 -1
- package/dist/src/core/crud.d.ts +4 -4
- package/dist/src/core/http.d.ts +5 -2
- package/dist/src/core/type.d.ts +3 -0
- package/dist/src/feed/feed.d.ts +3 -2
- package/dist/src/fulfillments/fulfillments.d.ts +2 -1
- package/dist/src/jobs/jobs.d.ts +3 -2
- package/dist/src/marketplace/marketplace.d.ts +2 -1
- package/dist/src/notifications/notifications.d.ts +2 -1
- package/dist/src/payments/payments.d.ts +6 -5
- package/dist/src/payrolls/payrolls.d.ts +4 -3
- package/dist/src/processes/processes.d.ts +2 -1
- package/dist/src/routes/routes.d.ts +3 -2
- package/dist/src/storage/storage.d.ts +2 -1
- package/dist/src/timesheets/timesheets.d.ts +3 -2
- package/dist/src/users/tmp_phones.d.ts +3 -2
- package/dist/src/users/tmp_phones.js +2 -7
- package/dist/src/users/tmp_usernames.d.ts +2 -1
- package/dist/src/users/tmp_usernames.js +1 -4
- package/dist/src/users/users.d.ts +7 -6
- package/dist/src/users/users.js +5 -15
- package/package.json +1 -1
|
@@ -2,11 +2,12 @@ import { type Bill, type BillableFolder, type Charge, type Equipment, type InBil
|
|
|
2
2
|
import type { TokenProvider } from "../core/auth.js";
|
|
3
3
|
import type { DeleteOneOptionsCRUD, FindOneOptionsCRUD, InsertOneOptionsCRUD, OperationResultOf, QueryOptionsCRUD, ReplaceOneOptionsCRUD, SearchManyOptionsCRUD, SearchResultOf } from "../core/crud.js";
|
|
4
4
|
import type { HTTPDoer } from "../core/http.js";
|
|
5
|
-
|
|
6
|
-
export type
|
|
7
|
-
export type
|
|
8
|
-
export type
|
|
9
|
-
export type
|
|
5
|
+
import type { CompletePayload } from "../core/type.js";
|
|
6
|
+
export type GenerateBillOptions = CompletePayload<InBill>;
|
|
7
|
+
export type YearSpanOptions = CompletePayload<PLBillableYearSpan>;
|
|
8
|
+
export type PeriodsFromDatesOptions = CompletePayload<PLBillablePeriodsFromDates>;
|
|
9
|
+
export type VendorInvoiceFromBillOptions = CompletePayload<PLBillableVendorInvoiceFromBill>;
|
|
10
|
+
export type SetItemQuantityOptions = CompletePayload<PLBillableSetItemQuantity>;
|
|
10
11
|
export type BillableClientOptions = {
|
|
11
12
|
http: HTTPDoer;
|
|
12
13
|
base_url: string;
|
|
@@ -2,7 +2,8 @@ import { type Event, type InEvent, type OperationResult, type PLCallsMintVideoTo
|
|
|
2
2
|
import type { TokenProvider } from "../core/auth.js";
|
|
3
3
|
import type { DeleteOneOptionsCRUD, FindOneOptionsCRUD, InsertOneOptionsCRUD, OperationResultOf, QueryOptionsCRUD, ReplaceOneOptionsCRUD } from "../core/crud.js";
|
|
4
4
|
import type { HTTPDoer } from "../core/http.js";
|
|
5
|
-
|
|
5
|
+
import type { CompletePayload } from "../core/type.js";
|
|
6
|
+
export type MintVideoTokenOptions = CompletePayload<PLCallsMintVideoToken>;
|
|
6
7
|
export type CallsClientOptions = {
|
|
7
8
|
http: HTTPDoer;
|
|
8
9
|
base_url: string;
|
package/dist/src/chat/chat.d.ts
CHANGED
|
@@ -2,9 +2,10 @@ import { type Chat, type ChatRoom, type ChatRoomMember, type ID, type InChat, ty
|
|
|
2
2
|
import type { TokenProvider } from "../core/auth.js";
|
|
3
3
|
import type { DeleteOneOptionsCRUD, FindOneOptionsCRUD, InsertOneOptionsCRUD, OperationResultOf, QueryOptionsCRUD, ReplaceOneOptionsCRUD, SearchManyOptionsCRUD, SearchResultOf } from "../core/crud.js";
|
|
4
4
|
import type { HTTPDoer } from "../core/http.js";
|
|
5
|
+
import type { CompletePayload } from "../core/type.js";
|
|
5
6
|
import { type WSCloseHandler, type WSConnection, type WSErrorHandler, type WSMessageHandler } from "../core/ws.js";
|
|
6
|
-
export type ReactChatOptions = PLChatReact
|
|
7
|
-
export type EnsureChatRoomOptions = PLChatEnsure
|
|
7
|
+
export type ReactChatOptions = CompletePayload<PLChatReact>;
|
|
8
|
+
export type EnsureChatRoomOptions = CompletePayload<PLChatEnsure>;
|
|
8
9
|
export type WSChatsOptions = {
|
|
9
10
|
owner_id: string;
|
|
10
11
|
chat_room_id: string;
|
|
@@ -2,7 +2,8 @@ import { type Contact, type ID, type InContact, type OperationResult, type PLCon
|
|
|
2
2
|
import type { TokenProvider } from "../core/auth.js";
|
|
3
3
|
import type { DeleteOneOptionsCRUD, FindOneOptionsCRUD, InsertOneOptionsCRUD, OperationResultOf, ReplaceOneOptionsCRUD } from "../core/crud.js";
|
|
4
4
|
import type { HTTPDoer } from "../core/http.js";
|
|
5
|
-
|
|
5
|
+
import type { CompletePayload } from "../core/type.js";
|
|
6
|
+
export type GenerateQROptions = CompletePayload<PLContactsGenerateQR>;
|
|
6
7
|
export type ContactsClientOptions = {
|
|
7
8
|
http: HTTPDoer;
|
|
8
9
|
base_url: string;
|
package/dist/src/core/crud.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { OperationResultValueKey, SearchResultResultsKey, type OperationResult, type SearchResult, type UpsertResult } from "@fabriktor/schema";
|
|
2
|
-
import { type ReplaceOptionalField } from "./type.js";
|
|
3
2
|
import type { TokenProvider } from "./auth.js";
|
|
4
3
|
import { type QueryOptions } from "./col.js";
|
|
5
4
|
import type { HTTPDoer } from "./http.js";
|
|
5
|
+
import type { CompletePayload, ReplaceOptionalField } from "./type.js";
|
|
6
6
|
export type OperationResultOf<T> = ReplaceOptionalField<OperationResult, typeof OperationResultValueKey, T>;
|
|
7
7
|
export type SearchResultOf<T> = ReplaceOptionalField<SearchResult, typeof SearchResultResultsKey, T[]>;
|
|
8
8
|
export type CRUDClientOptions = {
|
|
@@ -16,10 +16,10 @@ export type QueryOptionsCRUD = {
|
|
|
16
16
|
query?: QueryOptions;
|
|
17
17
|
};
|
|
18
18
|
export type InsertOneOptionsCRUD<In> = {
|
|
19
|
-
in: In
|
|
19
|
+
in: CompletePayload<In>;
|
|
20
20
|
};
|
|
21
21
|
export type UpsertOneOptionsCRUD<In> = {
|
|
22
|
-
in: In
|
|
22
|
+
in: CompletePayload<In>;
|
|
23
23
|
query?: QueryOptions;
|
|
24
24
|
};
|
|
25
25
|
export type FindOneOptionsCRUD = {
|
|
@@ -27,7 +27,7 @@ export type FindOneOptionsCRUD = {
|
|
|
27
27
|
};
|
|
28
28
|
export type ReplaceOneOptionsCRUD<In> = {
|
|
29
29
|
id: string;
|
|
30
|
-
in: In
|
|
30
|
+
in: Partial<In>;
|
|
31
31
|
};
|
|
32
32
|
export type DeleteOneOptionsCRUD = {
|
|
33
33
|
id: string;
|
package/dist/src/core/http.d.ts
CHANGED
|
@@ -9,8 +9,11 @@ export type HTTPOptions<T> = {
|
|
|
9
9
|
path: string;
|
|
10
10
|
method: Method;
|
|
11
11
|
token?: string;
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
} & ({
|
|
13
|
+
body: T;
|
|
14
|
+
} | ([T] extends [undefined] ? {
|
|
15
|
+
body?: undefined;
|
|
16
|
+
} : never));
|
|
14
17
|
export interface Fetcher {
|
|
15
18
|
fetch(input: RequestInfo | URL, init?: RequestInit): Promise<Response>;
|
|
16
19
|
}
|
package/dist/src/core/type.d.ts
CHANGED
package/dist/src/feed/feed.d.ts
CHANGED
|
@@ -2,8 +2,9 @@ import { type FeedFavorite, type FeedPost, type FeedReaction, type InFeedFavorit
|
|
|
2
2
|
import type { TokenProvider } from "../core/auth.js";
|
|
3
3
|
import type { DeleteOneOptionsCRUD, FindOneOptionsCRUD, InsertOneOptionsCRUD, OperationResultOf, QueryOptionsCRUD, ReplaceOneOptionsCRUD, SearchManyOptionsCRUD, SearchResultOf } from "../core/crud.js";
|
|
4
4
|
import type { HTTPDoer } from "../core/http.js";
|
|
5
|
-
|
|
6
|
-
export type
|
|
5
|
+
import type { CompletePayload } from "../core/type.js";
|
|
6
|
+
export type PullFeedOptions = CompletePayload<PLFeedPull>;
|
|
7
|
+
export type RestrictFeedOptions = CompletePayload<PLFeedRestrict>;
|
|
7
8
|
export type FeedClientOptions = {
|
|
8
9
|
http: HTTPDoer;
|
|
9
10
|
base_url: string;
|
|
@@ -2,7 +2,8 @@ import { type FulfillOrder, type InFulfillOrder, type OperationResult, type PLFu
|
|
|
2
2
|
import type { TokenProvider } from "../core/auth.js";
|
|
3
3
|
import type { DeleteOneOptionsCRUD, FindOneOptionsCRUD, InsertOneOptionsCRUD, OperationResultOf, QueryOptionsCRUD, ReplaceOneOptionsCRUD, SearchManyOptionsCRUD, SearchResultOf } from "../core/crud.js";
|
|
4
4
|
import type { HTTPDoer } from "../core/http.js";
|
|
5
|
-
|
|
5
|
+
import type { CompletePayload } from "../core/type.js";
|
|
6
|
+
export type ShipmentStatusOptions = CompletePayload<PLFulfillmentsShipmentStatus>;
|
|
6
7
|
export type FulfillmentsClientOptions = {
|
|
7
8
|
http: HTTPDoer;
|
|
8
9
|
base_url: string;
|
package/dist/src/jobs/jobs.d.ts
CHANGED
|
@@ -2,8 +2,9 @@ import { type InJob, type InJobProgram, type InLocation, type Job, type JobProgr
|
|
|
2
2
|
import type { TokenProvider } from "../core/auth.js";
|
|
3
3
|
import type { DeleteOneOptionsCRUD, FindOneOptionsCRUD, InsertOneOptionsCRUD, OperationResultOf, QueryOptionsCRUD, ReplaceOneOptionsCRUD, SearchManyOptionsCRUD, SearchResultOf } from "../core/crud.js";
|
|
4
4
|
import type { HTTPDoer } from "../core/http.js";
|
|
5
|
-
|
|
6
|
-
export type
|
|
5
|
+
import type { CompletePayload } from "../core/type.js";
|
|
6
|
+
export type FindOverlapsOptions = CompletePayload<PLJobsFindOverlaps>;
|
|
7
|
+
export type ImmediateJobFromProgramOptions = CompletePayload<InJobProgram>;
|
|
7
8
|
export type JobsClientOptions = {
|
|
8
9
|
http: HTTPDoer;
|
|
9
10
|
base_url: string;
|
|
@@ -2,7 +2,8 @@ import { type InMarketplaceFavorite, type InMarketplacePost, type MarketplaceFav
|
|
|
2
2
|
import type { TokenProvider } from "../core/auth.js";
|
|
3
3
|
import type { DeleteOneOptionsCRUD, FindOneOptionsCRUD, InsertOneOptionsCRUD, OperationResultOf, QueryOptionsCRUD, ReplaceOneOptionsCRUD, SearchManyOptionsCRUD, SearchResultOf } from "../core/crud.js";
|
|
4
4
|
import type { HTTPDoer } from "../core/http.js";
|
|
5
|
-
|
|
5
|
+
import type { CompletePayload } from "../core/type.js";
|
|
6
|
+
export type PullMarketplaceOptions = CompletePayload<PLMarketplacePull>;
|
|
6
7
|
export type MarketplaceClientOptions = {
|
|
7
8
|
http: HTTPDoer;
|
|
8
9
|
base_url: string;
|
|
@@ -2,7 +2,8 @@ import { type InDTok, type PLNotificationsRelay, type UpsertResult } from "@fabr
|
|
|
2
2
|
import type { TokenProvider } from "../core/auth.js";
|
|
3
3
|
import type { OperationResultOf, UpsertOneOptionsCRUD } from "../core/crud.js";
|
|
4
4
|
import type { HTTPDoer } from "../core/http.js";
|
|
5
|
-
|
|
5
|
+
import type { CompletePayload } from "../core/type.js";
|
|
6
|
+
export type RelayNotificationOptions = CompletePayload<PLNotificationsRelay>;
|
|
6
7
|
export type NotificationsClientOptions = {
|
|
7
8
|
http: HTTPDoer;
|
|
8
9
|
base_url: string;
|
|
@@ -2,12 +2,13 @@ import { type CreditLedgerEntry, type InCreditLedgerEntry, type InPayment, type
|
|
|
2
2
|
import type { TokenProvider } from "../core/auth.js";
|
|
3
3
|
import type { DeleteOneOptionsCRUD, FindOneOptionsCRUD, InsertOneOptionsCRUD, OperationResultOf, QueryOptionsCRUD, ReplaceOneOptionsCRUD, SearchManyOptionsCRUD, SearchResultOf } from "../core/crud.js";
|
|
4
4
|
import type { HTTPDoer } from "../core/http.js";
|
|
5
|
-
|
|
5
|
+
import type { CompletePayload } from "../core/type.js";
|
|
6
|
+
export type BalanceOptions = CompletePayload<PLPaymentsBalance>;
|
|
6
7
|
export type PaymentsBalance = SortStripeBalanceResult;
|
|
7
|
-
export type OpenPmtPublicSessionOptions = PLPaymentsOpenPublicSession
|
|
8
|
-
export type PaymentFromPublicSessionOptions = PLPaymentsPaymentFromPublicSession
|
|
9
|
-
export type PurchaseCreditsOptions = PLPaymentsPurchaseCredits
|
|
10
|
-
export type TotalCreditsOptions = PLPaymentsTotalCredits
|
|
8
|
+
export type OpenPmtPublicSessionOptions = CompletePayload<PLPaymentsOpenPublicSession>;
|
|
9
|
+
export type PaymentFromPublicSessionOptions = CompletePayload<PLPaymentsPaymentFromPublicSession>;
|
|
10
|
+
export type PurchaseCreditsOptions = CompletePayload<PLPaymentsPurchaseCredits>;
|
|
11
|
+
export type TotalCreditsOptions = CompletePayload<PLPaymentsTotalCredits>;
|
|
11
12
|
export type PaymentsClientOptions = {
|
|
12
13
|
http: HTTPDoer;
|
|
13
14
|
base_url: string;
|
|
@@ -2,9 +2,10 @@ import { type Adjustment, type AdjustmentAggregate, type AdjustmentFolder, type
|
|
|
2
2
|
import type { TokenProvider } from "../core/auth.js";
|
|
3
3
|
import type { DeleteOneOptionsCRUD, FindOneOptionsCRUD, InsertOneOptionsCRUD, OperationResultOf, QueryOptionsCRUD, ReplaceOneOptionsCRUD, SearchManyOptionsCRUD, SearchResultOf } from "../core/crud.js";
|
|
4
4
|
import type { HTTPDoer } from "../core/http.js";
|
|
5
|
-
|
|
6
|
-
export type
|
|
7
|
-
export type
|
|
5
|
+
import type { CompletePayload } from "../core/type.js";
|
|
6
|
+
export type GeneratePayrollOptions = CompletePayload<InPayroll>;
|
|
7
|
+
export type GeneratePayrollFromEntitiesOptions = CompletePayload<PLPayrollsGeneratePayrollFromEntities>;
|
|
8
|
+
export type AggregateAdjustmentsOptions = CompletePayload<InAdjustmentAggregate>;
|
|
8
9
|
export type PayrollsClientOptions = {
|
|
9
10
|
http: HTTPDoer;
|
|
10
11
|
base_url: string;
|
|
@@ -2,7 +2,8 @@ import { type PLProcessesSpeechToText, type RPProcessesSpeechToText } from "@fab
|
|
|
2
2
|
import type { TokenProvider } from "../core/auth.js";
|
|
3
3
|
import type { OperationResultOf } from "../core/crud.js";
|
|
4
4
|
import type { HTTPDoer } from "../core/http.js";
|
|
5
|
-
|
|
5
|
+
import type { CompletePayload } from "../core/type.js";
|
|
6
|
+
export type SpeechToTextOptions = CompletePayload<PLProcessesSpeechToText>;
|
|
6
7
|
export type ProcessesClientOptions = {
|
|
7
8
|
http: HTTPDoer;
|
|
8
9
|
base_url: string;
|
|
@@ -2,8 +2,9 @@ import { type ClientAvailability, type InClientAvailability, type InRoute, type
|
|
|
2
2
|
import type { TokenProvider } from "../core/auth.js";
|
|
3
3
|
import type { DeleteOneOptionsCRUD, FindOneOptionsCRUD, InsertOneOptionsCRUD, OperationResultOf, QueryOptionsCRUD, ReplaceOneOptionsCRUD, SearchManyOptionsCRUD, SearchResultOf } from "../core/crud.js";
|
|
4
4
|
import type { HTTPDoer } from "../core/http.js";
|
|
5
|
-
|
|
6
|
-
export type
|
|
5
|
+
import type { CompletePayload } from "../core/type.js";
|
|
6
|
+
export type GetAvailabilityOptions = CompletePayload<PLRoutesAvailability>;
|
|
7
|
+
export type GetDesignationOptions = CompletePayload<PLRoutesDesignation>;
|
|
7
8
|
export type RoutesClientOptions = {
|
|
8
9
|
http: HTTPDoer;
|
|
9
10
|
base_url: string;
|
|
@@ -3,6 +3,7 @@ import type { TokenProvider } from "../core/auth.js";
|
|
|
3
3
|
import type { DeleteOneOptionsCRUD, OperationResultOf } from "../core/crud.js";
|
|
4
4
|
import type { HTTPDoer } from "../core/http.js";
|
|
5
5
|
import { type MultipartDoer } from "../core/multipart.js";
|
|
6
|
+
import type { CompletePayload } from "../core/type.js";
|
|
6
7
|
export declare const storageCollections: readonly ["calls", "chat", "contacts", "jobs", "locations", "memos", "qr", "reports", "tickets", "users", "feed"];
|
|
7
8
|
export type StorageCollection = (typeof storageCollections)[number];
|
|
8
9
|
export type StorageUploadFile = File | {
|
|
@@ -15,7 +16,7 @@ export type UploadStorageOptions = {
|
|
|
15
16
|
full_quality?: boolean;
|
|
16
17
|
files: StorageUploadFile[];
|
|
17
18
|
};
|
|
18
|
-
export type DownloadStorageOptions = PLStorageDownload
|
|
19
|
+
export type DownloadStorageOptions = CompletePayload<PLStorageDownload>;
|
|
19
20
|
export type StorageClientOptions = {
|
|
20
21
|
http: HTTPDoer;
|
|
21
22
|
base_url: string;
|
|
@@ -2,8 +2,9 @@ import { type InSummary, type InWeekSheet, type OperationResult, type PLTimeshee
|
|
|
2
2
|
import type { TokenProvider } from "../core/auth.js";
|
|
3
3
|
import type { DeleteOneOptionsCRUD, FindOneOptionsCRUD, OperationResultOf, QueryOptionsCRUD, ReplaceOneOptionsCRUD } from "../core/crud.js";
|
|
4
4
|
import type { HTTPDoer } from "../core/http.js";
|
|
5
|
-
|
|
6
|
-
export type
|
|
5
|
+
import type { CompletePayload } from "../core/type.js";
|
|
6
|
+
export type ApproveTimesheetsOptions = CompletePayload<PLTimesheetsApprove>;
|
|
7
|
+
export type SyncTimesheetsOptions = CompletePayload<PLTimesheetsSync>;
|
|
7
8
|
export type PunchTimesheetOptions = Punch;
|
|
8
9
|
export type TimesheetsClientOptions = {
|
|
9
10
|
http: HTTPDoer;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { type PLUsersSendCode, type PLUsersVerifyCode } from "@fabriktor/schema";
|
|
2
2
|
import type { TokenProvider } from "../core/auth.js";
|
|
3
3
|
import type { HTTPDoer } from "../core/http.js";
|
|
4
|
-
|
|
5
|
-
export type
|
|
4
|
+
import type { CompletePayload } from "../core/type.js";
|
|
5
|
+
export type SendPhoneVerificationOptions = CompletePayload<PLUsersSendCode>;
|
|
6
|
+
export type VerifyPhoneOptions = CompletePayload<PLUsersVerifyCode>;
|
|
6
7
|
export interface TmpPhonesOperator {
|
|
7
8
|
send(opts: SendPhoneVerificationOptions): Promise<void>;
|
|
8
9
|
verify(opts: VerifyPhoneOptions): Promise<void>;
|
|
@@ -22,9 +22,7 @@ export class TmpPhonesClient {
|
|
|
22
22
|
path: tmpPhonePath(PathUsersSend),
|
|
23
23
|
method: HTTPMethodPost,
|
|
24
24
|
token,
|
|
25
|
-
body:
|
|
26
|
-
phone: opts.phone,
|
|
27
|
-
},
|
|
25
|
+
body: opts,
|
|
28
26
|
});
|
|
29
27
|
}
|
|
30
28
|
async verify(opts) {
|
|
@@ -34,10 +32,7 @@ export class TmpPhonesClient {
|
|
|
34
32
|
path: tmpPhonePath(PathUsersVerify),
|
|
35
33
|
method: HTTPMethodPost,
|
|
36
34
|
token,
|
|
37
|
-
body:
|
|
38
|
-
phone: opts.phone,
|
|
39
|
-
code: opts.code,
|
|
40
|
-
},
|
|
35
|
+
body: opts,
|
|
41
36
|
});
|
|
42
37
|
}
|
|
43
38
|
}
|
|
@@ -2,7 +2,8 @@ import { type PLUsersUsername } from "@fabriktor/schema";
|
|
|
2
2
|
import type { TokenProvider } from "../core/auth.js";
|
|
3
3
|
import type { OperationResultOf } from "../core/crud.js";
|
|
4
4
|
import type { HTTPDoer } from "../core/http.js";
|
|
5
|
-
|
|
5
|
+
import type { CompletePayload } from "../core/type.js";
|
|
6
|
+
export type VerifyUsernameOptions = CompletePayload<PLUsersUsername>;
|
|
6
7
|
export type UsernameVerification = string[];
|
|
7
8
|
export interface TmpUsernamesOperator {
|
|
8
9
|
verify(opts: VerifyUsernameOptions): Promise<OperationResultOf<UsernameVerification>>;
|
|
@@ -2,14 +2,15 @@ import { type InUser, type OperationResult, type PLUsersContactList, type PLUser
|
|
|
2
2
|
import type { TokenProvider } from "../core/auth.js";
|
|
3
3
|
import type { OperationResultOf } from "../core/crud.js";
|
|
4
4
|
import type { HTTPDoer } from "../core/http.js";
|
|
5
|
+
import type { CompletePayload } from "../core/type.js";
|
|
5
6
|
export type BootstrapOptions = {
|
|
6
|
-
in: InUser
|
|
7
|
+
in: CompletePayload<InUser>;
|
|
7
8
|
};
|
|
8
|
-
export type ResolveUsernameOptions = PLUsersResolveUsername
|
|
9
|
-
export type ForgotPasswordOptions = PLUsersForgotPassword
|
|
10
|
-
export type SendSignInLinkOptions = PLUsersSignInLink
|
|
11
|
-
export type SendEmailVerificationOptions = PLUsersVerifyEmail
|
|
12
|
-
export type MatchOptions = PLUsersContactList
|
|
9
|
+
export type ResolveUsernameOptions = CompletePayload<PLUsersResolveUsername>;
|
|
10
|
+
export type ForgotPasswordOptions = CompletePayload<PLUsersForgotPassword>;
|
|
11
|
+
export type SendSignInLinkOptions = CompletePayload<PLUsersSignInLink>;
|
|
12
|
+
export type SendEmailVerificationOptions = CompletePayload<PLUsersVerifyEmail>;
|
|
13
|
+
export type MatchOptions = CompletePayload<PLUsersContactList>;
|
|
13
14
|
export type SearchOptions = {
|
|
14
15
|
q: string;
|
|
15
16
|
limit?: number;
|
package/dist/src/users/users.js
CHANGED
|
@@ -42,9 +42,7 @@ export class UsersClient {
|
|
|
42
42
|
path: userPath(PathUsersSendEmailVerification),
|
|
43
43
|
method: HTTPMethodPost,
|
|
44
44
|
token,
|
|
45
|
-
body:
|
|
46
|
-
language: opts.language,
|
|
47
|
-
},
|
|
45
|
+
body: opts,
|
|
48
46
|
});
|
|
49
47
|
}
|
|
50
48
|
async forgotPassword(opts) {
|
|
@@ -52,9 +50,7 @@ export class UsersClient {
|
|
|
52
50
|
base_url: this.base_url,
|
|
53
51
|
path: userPath(PathUsersForgotPassword),
|
|
54
52
|
method: HTTPMethodPost,
|
|
55
|
-
body:
|
|
56
|
-
email: opts.email,
|
|
57
|
-
},
|
|
53
|
+
body: opts,
|
|
58
54
|
});
|
|
59
55
|
}
|
|
60
56
|
async sendSignInLink(opts) {
|
|
@@ -62,9 +58,7 @@ export class UsersClient {
|
|
|
62
58
|
base_url: this.base_url,
|
|
63
59
|
path: userPath(PathUsersSendSignInLink),
|
|
64
60
|
method: HTTPMethodPost,
|
|
65
|
-
body:
|
|
66
|
-
email: opts.email,
|
|
67
|
-
},
|
|
61
|
+
body: opts,
|
|
68
62
|
});
|
|
69
63
|
}
|
|
70
64
|
async resolveUsername(opts) {
|
|
@@ -72,9 +66,7 @@ export class UsersClient {
|
|
|
72
66
|
base_url: this.base_url,
|
|
73
67
|
path: userPath(PathUsersResolveUsername),
|
|
74
68
|
method: HTTPMethodPost,
|
|
75
|
-
body:
|
|
76
|
-
username: opts.username,
|
|
77
|
-
},
|
|
69
|
+
body: opts,
|
|
78
70
|
});
|
|
79
71
|
}
|
|
80
72
|
async match(opts) {
|
|
@@ -84,9 +76,7 @@ export class UsersClient {
|
|
|
84
76
|
path: userPath(PathUsersMatch),
|
|
85
77
|
method: HTTPMethodPost,
|
|
86
78
|
token,
|
|
87
|
-
body:
|
|
88
|
-
contacts: opts.contacts,
|
|
89
|
-
},
|
|
79
|
+
body: opts,
|
|
90
80
|
});
|
|
91
81
|
}
|
|
92
82
|
async search(opts) {
|