@fabriktor/client 0.0.28 → 0.0.31
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 +213 -0
- package/dist/src/billable/billable.js +441 -0
- package/dist/src/calls/calls.d.ts +34 -0
- package/dist/src/calls/calls.js +65 -0
- package/dist/src/chat/chat.d.ts +97 -0
- package/dist/src/chat/chat.js +224 -0
- package/dist/src/contacts/contacts.d.ts +37 -0
- package/dist/src/contacts/contacts.js +94 -0
- package/dist/src/core/col.d.ts +7 -1
- package/dist/src/core/col.js +29 -14
- package/dist/src/core/crud.d.ts +1 -1
- package/dist/src/core/crud.js +1 -1
- package/dist/src/core/http.d.ts +3 -4
- package/dist/src/core/http.js +3 -3
- package/dist/src/core/idempotency.js +1 -1
- package/dist/src/core/multipart.d.ts +25 -0
- package/dist/src/core/multipart.js +93 -0
- package/dist/src/feed/feed.d.ts +65 -0
- package/dist/src/feed/feed.js +130 -0
- package/dist/src/fulfillments/fulfillments.d.ts +36 -0
- package/dist/src/fulfillments/fulfillments.js +68 -0
- package/dist/src/index.d.ts +14 -0
- package/dist/src/index.js +14 -0
- package/dist/src/jobs/jobs.d.ts +69 -0
- package/dist/src/jobs/jobs.js +143 -0
- package/dist/src/marketplace/marketplace.d.ts +49 -0
- package/dist/src/marketplace/marketplace.js +94 -0
- package/dist/src/payments/payments.d.ts +154 -0
- package/dist/src/payments/payments.js +328 -0
- package/dist/src/payrolls/payrolls.d.ts +179 -0
- package/dist/src/payrolls/payrolls.js +380 -0
- package/dist/src/processes/processes.d.ts +3 -3
- package/dist/src/routes/routes.d.ts +93 -0
- package/dist/src/routes/routes.js +185 -0
- package/dist/src/storage/storage.d.ts +124 -0
- package/dist/src/storage/storage.js +242 -0
- package/dist/src/timesheets/timesheets.d.ts +49 -0
- package/dist/src/timesheets/timesheets.js +105 -0
- package/dist/src/users/tmp_phones.d.ts +1 -1
- package/dist/src/users/tmp_usernames.d.ts +5 -4
- package/dist/src/users/users.d.ts +13 -12
- package/dist/src/users/users.js +4 -1
- package/package.json +3 -2
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
// Copyright (C) Fabriktor, Inc. 2025-present.
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
4
|
+
// not use this file except in compliance with the License. You may obtain
|
|
5
|
+
// a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
import { ColJobsJobPrograms, ColJobsJobs, ColJobsLocations, HTTPMethodPost, PathJobsImmediate, PathJobsOverlaps, SvcJobs, } from "@fabriktor/schema";
|
|
7
|
+
import { requiredToken } from "../core/auth.js";
|
|
8
|
+
import { newCRUDClient } from "../core/crud.js";
|
|
9
|
+
import { buildPath } from "../core/path.js";
|
|
10
|
+
export class JobsClient {
|
|
11
|
+
locations;
|
|
12
|
+
job_programs;
|
|
13
|
+
jobs;
|
|
14
|
+
http;
|
|
15
|
+
base_url;
|
|
16
|
+
get_token;
|
|
17
|
+
constructor(opts) {
|
|
18
|
+
this.locations = newCRUDClient({
|
|
19
|
+
http: opts.http,
|
|
20
|
+
base_url: opts.base_url,
|
|
21
|
+
svc: SvcJobs,
|
|
22
|
+
col: ColJobsLocations,
|
|
23
|
+
get_token: opts.get_token,
|
|
24
|
+
});
|
|
25
|
+
this.job_programs = newCRUDClient({
|
|
26
|
+
http: opts.http,
|
|
27
|
+
base_url: opts.base_url,
|
|
28
|
+
svc: SvcJobs,
|
|
29
|
+
col: ColJobsJobPrograms,
|
|
30
|
+
get_token: opts.get_token,
|
|
31
|
+
});
|
|
32
|
+
this.jobs = newCRUDClient({
|
|
33
|
+
http: opts.http,
|
|
34
|
+
base_url: opts.base_url,
|
|
35
|
+
svc: SvcJobs,
|
|
36
|
+
col: ColJobsJobs,
|
|
37
|
+
get_token: opts.get_token,
|
|
38
|
+
});
|
|
39
|
+
this.http = opts.http;
|
|
40
|
+
this.base_url = opts.base_url;
|
|
41
|
+
this.get_token = opts.get_token;
|
|
42
|
+
}
|
|
43
|
+
async queryLocations(opts) {
|
|
44
|
+
return await this.locations.query(opts);
|
|
45
|
+
}
|
|
46
|
+
async insertOneLocation(opts) {
|
|
47
|
+
return await this.locations.insertOne(opts);
|
|
48
|
+
}
|
|
49
|
+
async findOneLocation(opts) {
|
|
50
|
+
return await this.locations.findOne(opts);
|
|
51
|
+
}
|
|
52
|
+
async replaceOneLocation(opts) {
|
|
53
|
+
return await this.locations.replaceOne(opts);
|
|
54
|
+
}
|
|
55
|
+
async deleteOneLocation(opts) {
|
|
56
|
+
return await this.locations.deleteOne(opts);
|
|
57
|
+
}
|
|
58
|
+
async deleteManyLocations(opts) {
|
|
59
|
+
return await this.locations.deleteMany(opts);
|
|
60
|
+
}
|
|
61
|
+
async searchManyLocations(opts) {
|
|
62
|
+
return await this.locations.searchMany(opts);
|
|
63
|
+
}
|
|
64
|
+
async queryJobPrograms(opts) {
|
|
65
|
+
return await this.job_programs.query(opts);
|
|
66
|
+
}
|
|
67
|
+
async insertOneJobProgram(opts) {
|
|
68
|
+
return await this.job_programs.insertOne(opts);
|
|
69
|
+
}
|
|
70
|
+
async findOneJobProgram(opts) {
|
|
71
|
+
return await this.job_programs.findOne(opts);
|
|
72
|
+
}
|
|
73
|
+
async replaceOneJobProgram(opts) {
|
|
74
|
+
return await this.job_programs.replaceOne(opts);
|
|
75
|
+
}
|
|
76
|
+
async deleteOneJobProgram(opts) {
|
|
77
|
+
return await this.job_programs.deleteOne(opts);
|
|
78
|
+
}
|
|
79
|
+
async deleteManyJobPrograms(opts) {
|
|
80
|
+
return await this.job_programs.deleteMany(opts);
|
|
81
|
+
}
|
|
82
|
+
async searchManyJobPrograms(opts) {
|
|
83
|
+
return await this.job_programs.searchMany(opts);
|
|
84
|
+
}
|
|
85
|
+
async queryJobs(opts) {
|
|
86
|
+
return await this.jobs.query(opts);
|
|
87
|
+
}
|
|
88
|
+
async insertOneJob(opts) {
|
|
89
|
+
return await this.jobs.insertOne(opts);
|
|
90
|
+
}
|
|
91
|
+
async findOneJob(opts) {
|
|
92
|
+
return await this.jobs.findOne(opts);
|
|
93
|
+
}
|
|
94
|
+
async replaceOneJob(opts) {
|
|
95
|
+
return await this.jobs.replaceOne(opts);
|
|
96
|
+
}
|
|
97
|
+
async deleteOneJob(opts) {
|
|
98
|
+
return await this.jobs.deleteOne(opts);
|
|
99
|
+
}
|
|
100
|
+
async deleteManyJobs(opts) {
|
|
101
|
+
return await this.jobs.deleteMany(opts);
|
|
102
|
+
}
|
|
103
|
+
async searchManyJobs(opts) {
|
|
104
|
+
return await this.jobs.searchMany(opts);
|
|
105
|
+
}
|
|
106
|
+
async findOverlaps(opts) {
|
|
107
|
+
const token = await requiredToken(this.get_token);
|
|
108
|
+
return await this.http.do({
|
|
109
|
+
base_url: this.base_url,
|
|
110
|
+
path: locationPath(PathJobsOverlaps),
|
|
111
|
+
method: HTTPMethodPost,
|
|
112
|
+
token,
|
|
113
|
+
body: opts,
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
async immediateJobFromProgram(opts) {
|
|
117
|
+
const token = await requiredToken(this.get_token);
|
|
118
|
+
return await this.http.do({
|
|
119
|
+
base_url: this.base_url,
|
|
120
|
+
path: jobProgramPath(PathJobsImmediate),
|
|
121
|
+
method: HTTPMethodPost,
|
|
122
|
+
token,
|
|
123
|
+
body: opts,
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
export function newJobsClient(opts) {
|
|
128
|
+
return new JobsClient(opts);
|
|
129
|
+
}
|
|
130
|
+
function locationPath(action) {
|
|
131
|
+
return buildPath({
|
|
132
|
+
svc: SvcJobs,
|
|
133
|
+
col: ColJobsLocations,
|
|
134
|
+
action,
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
function jobProgramPath(action) {
|
|
138
|
+
return buildPath({
|
|
139
|
+
svc: SvcJobs,
|
|
140
|
+
col: ColJobsJobPrograms,
|
|
141
|
+
action,
|
|
142
|
+
});
|
|
143
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { type InMarketplaceFavorite, type InMarketplacePost, type MarketplaceFavorite, type MarketplacePost, type OperationResult, type PLMarketplacePull, type RPMarketplacePull } from "@fabriktor/schema";
|
|
2
|
+
import type { TokenProvider } from "../core/auth.js";
|
|
3
|
+
import type { DeleteManyOptionsCRUD, DeleteOneOptionsCRUD, FindOneOptionsCRUD, InsertOneOptionsCRUD, OperationResultOf, QueryOptionsCRUD, ReplaceOneOptionsCRUD, SearchManyOptionsCRUD, SearchResultOf } from "../core/crud.js";
|
|
4
|
+
import type { HTTPDoer } from "../core/http.js";
|
|
5
|
+
export type PullMarketplaceOptions = PLMarketplacePull;
|
|
6
|
+
export type MarketplaceClientOptions = {
|
|
7
|
+
http: HTTPDoer;
|
|
8
|
+
base_url: string;
|
|
9
|
+
get_token?: TokenProvider;
|
|
10
|
+
};
|
|
11
|
+
export interface MarketplaceOperator {
|
|
12
|
+
queryMarketplacePosts(opts?: QueryOptionsCRUD): Promise<OperationResultOf<MarketplacePost[]>>;
|
|
13
|
+
insertOneMarketplacePost(opts: InsertOneOptionsCRUD<InMarketplacePost>): Promise<OperationResult>;
|
|
14
|
+
findOneMarketplacePost(opts: FindOneOptionsCRUD): Promise<OperationResultOf<MarketplacePost>>;
|
|
15
|
+
replaceOneMarketplacePost(opts: ReplaceOneOptionsCRUD<InMarketplacePost>): Promise<OperationResult>;
|
|
16
|
+
deleteOneMarketplacePost(opts: DeleteOneOptionsCRUD): Promise<OperationResult>;
|
|
17
|
+
deleteManyMarketplacePosts(opts?: DeleteManyOptionsCRUD): Promise<OperationResultOf<number>>;
|
|
18
|
+
searchManyMarketplacePosts(opts?: SearchManyOptionsCRUD): Promise<OperationResultOf<SearchResultOf<MarketplacePost>>>;
|
|
19
|
+
queryMarketplaceFavorites(opts?: QueryOptionsCRUD): Promise<OperationResultOf<MarketplaceFavorite[]>>;
|
|
20
|
+
insertOneMarketplaceFavorite(opts: InsertOneOptionsCRUD<InMarketplaceFavorite>): Promise<OperationResult>;
|
|
21
|
+
findOneMarketplaceFavorite(opts: FindOneOptionsCRUD): Promise<OperationResultOf<MarketplaceFavorite>>;
|
|
22
|
+
replaceOneMarketplaceFavorite(opts: ReplaceOneOptionsCRUD<InMarketplaceFavorite>): Promise<OperationResult>;
|
|
23
|
+
deleteOneMarketplaceFavorite(opts: DeleteOneOptionsCRUD): Promise<OperationResult>;
|
|
24
|
+
deleteManyMarketplaceFavorites(opts?: DeleteManyOptionsCRUD): Promise<OperationResultOf<number>>;
|
|
25
|
+
pull(opts: PullMarketplaceOptions): Promise<OperationResultOf<RPMarketplacePull>>;
|
|
26
|
+
}
|
|
27
|
+
export declare class MarketplaceClient implements MarketplaceOperator {
|
|
28
|
+
private marketplace_posts;
|
|
29
|
+
private marketplace_favorites;
|
|
30
|
+
private http;
|
|
31
|
+
private base_url;
|
|
32
|
+
private get_token?;
|
|
33
|
+
constructor(opts: MarketplaceClientOptions);
|
|
34
|
+
queryMarketplacePosts(opts?: QueryOptionsCRUD): Promise<OperationResultOf<MarketplacePost[]>>;
|
|
35
|
+
insertOneMarketplacePost(opts: InsertOneOptionsCRUD<InMarketplacePost>): Promise<OperationResult>;
|
|
36
|
+
findOneMarketplacePost(opts: FindOneOptionsCRUD): Promise<OperationResultOf<MarketplacePost>>;
|
|
37
|
+
replaceOneMarketplacePost(opts: ReplaceOneOptionsCRUD<InMarketplacePost>): Promise<OperationResult>;
|
|
38
|
+
deleteOneMarketplacePost(opts: DeleteOneOptionsCRUD): Promise<OperationResult>;
|
|
39
|
+
deleteManyMarketplacePosts(opts?: DeleteManyOptionsCRUD): Promise<OperationResultOf<number>>;
|
|
40
|
+
searchManyMarketplacePosts(opts?: SearchManyOptionsCRUD): Promise<OperationResultOf<SearchResultOf<MarketplacePost>>>;
|
|
41
|
+
queryMarketplaceFavorites(opts?: QueryOptionsCRUD): Promise<OperationResultOf<MarketplaceFavorite[]>>;
|
|
42
|
+
insertOneMarketplaceFavorite(opts: InsertOneOptionsCRUD<InMarketplaceFavorite>): Promise<OperationResult>;
|
|
43
|
+
findOneMarketplaceFavorite(opts: FindOneOptionsCRUD): Promise<OperationResultOf<MarketplaceFavorite>>;
|
|
44
|
+
replaceOneMarketplaceFavorite(opts: ReplaceOneOptionsCRUD<InMarketplaceFavorite>): Promise<OperationResult>;
|
|
45
|
+
deleteOneMarketplaceFavorite(opts: DeleteOneOptionsCRUD): Promise<OperationResult>;
|
|
46
|
+
deleteManyMarketplaceFavorites(opts?: DeleteManyOptionsCRUD): Promise<OperationResultOf<number>>;
|
|
47
|
+
pull(opts: PullMarketplaceOptions): Promise<OperationResultOf<RPMarketplacePull>>;
|
|
48
|
+
}
|
|
49
|
+
export declare function newMarketplaceClient(opts: MarketplaceClientOptions): MarketplaceClient;
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
// Copyright (C) Fabriktor, Inc. 2025-present.
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
4
|
+
// not use this file except in compliance with the License. You may obtain
|
|
5
|
+
// a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
import { ColMarketplaceMarketplaceFavorites, ColMarketplaceMarketplacePosts, HTTPMethodPost, PathPull, SvcMarketplace, } from "@fabriktor/schema";
|
|
7
|
+
import { requiredToken } from "../core/auth.js";
|
|
8
|
+
import { newCRUDClient } from "../core/crud.js";
|
|
9
|
+
import { buildPath } from "../core/path.js";
|
|
10
|
+
export class MarketplaceClient {
|
|
11
|
+
marketplace_posts;
|
|
12
|
+
marketplace_favorites;
|
|
13
|
+
http;
|
|
14
|
+
base_url;
|
|
15
|
+
get_token;
|
|
16
|
+
constructor(opts) {
|
|
17
|
+
this.marketplace_posts = newCRUDClient({
|
|
18
|
+
http: opts.http,
|
|
19
|
+
base_url: opts.base_url,
|
|
20
|
+
svc: SvcMarketplace,
|
|
21
|
+
col: ColMarketplaceMarketplacePosts,
|
|
22
|
+
get_token: opts.get_token,
|
|
23
|
+
});
|
|
24
|
+
this.marketplace_favorites = newCRUDClient({
|
|
25
|
+
http: opts.http,
|
|
26
|
+
base_url: opts.base_url,
|
|
27
|
+
svc: SvcMarketplace,
|
|
28
|
+
col: ColMarketplaceMarketplaceFavorites,
|
|
29
|
+
get_token: opts.get_token,
|
|
30
|
+
});
|
|
31
|
+
this.http = opts.http;
|
|
32
|
+
this.base_url = opts.base_url;
|
|
33
|
+
this.get_token = opts.get_token;
|
|
34
|
+
}
|
|
35
|
+
async queryMarketplacePosts(opts) {
|
|
36
|
+
return await this.marketplace_posts.query(opts);
|
|
37
|
+
}
|
|
38
|
+
async insertOneMarketplacePost(opts) {
|
|
39
|
+
return await this.marketplace_posts.insertOne(opts);
|
|
40
|
+
}
|
|
41
|
+
async findOneMarketplacePost(opts) {
|
|
42
|
+
return await this.marketplace_posts.findOne(opts);
|
|
43
|
+
}
|
|
44
|
+
async replaceOneMarketplacePost(opts) {
|
|
45
|
+
return await this.marketplace_posts.replaceOne(opts);
|
|
46
|
+
}
|
|
47
|
+
async deleteOneMarketplacePost(opts) {
|
|
48
|
+
return await this.marketplace_posts.deleteOne(opts);
|
|
49
|
+
}
|
|
50
|
+
async deleteManyMarketplacePosts(opts) {
|
|
51
|
+
return await this.marketplace_posts.deleteMany(opts);
|
|
52
|
+
}
|
|
53
|
+
async searchManyMarketplacePosts(opts) {
|
|
54
|
+
return await this.marketplace_posts.searchMany(opts);
|
|
55
|
+
}
|
|
56
|
+
async queryMarketplaceFavorites(opts) {
|
|
57
|
+
return await this.marketplace_favorites.query(opts);
|
|
58
|
+
}
|
|
59
|
+
async insertOneMarketplaceFavorite(opts) {
|
|
60
|
+
return await this.marketplace_favorites.insertOne(opts);
|
|
61
|
+
}
|
|
62
|
+
async findOneMarketplaceFavorite(opts) {
|
|
63
|
+
return await this.marketplace_favorites.findOne(opts);
|
|
64
|
+
}
|
|
65
|
+
async replaceOneMarketplaceFavorite(opts) {
|
|
66
|
+
return await this.marketplace_favorites.replaceOne(opts);
|
|
67
|
+
}
|
|
68
|
+
async deleteOneMarketplaceFavorite(opts) {
|
|
69
|
+
return await this.marketplace_favorites.deleteOne(opts);
|
|
70
|
+
}
|
|
71
|
+
async deleteManyMarketplaceFavorites(opts) {
|
|
72
|
+
return await this.marketplace_favorites.deleteMany(opts);
|
|
73
|
+
}
|
|
74
|
+
async pull(opts) {
|
|
75
|
+
const token = await requiredToken(this.get_token);
|
|
76
|
+
return await this.http.do({
|
|
77
|
+
base_url: this.base_url,
|
|
78
|
+
path: marketplacePostPath(PathPull),
|
|
79
|
+
method: HTTPMethodPost,
|
|
80
|
+
token,
|
|
81
|
+
body: opts,
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
export function newMarketplaceClient(opts) {
|
|
86
|
+
return new MarketplaceClient(opts);
|
|
87
|
+
}
|
|
88
|
+
function marketplacePostPath(action) {
|
|
89
|
+
return buildPath({
|
|
90
|
+
svc: SvcMarketplace,
|
|
91
|
+
col: ColMarketplaceMarketplacePosts,
|
|
92
|
+
action,
|
|
93
|
+
});
|
|
94
|
+
}
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import { type CreditLedgerEntry, type InCreditLedgerEntry, type InPayment, type InPmtAccount, type InPmtBankAccount, type InPmtCard, type InPmtCustomer, type InPmtPublicSession, type InPmtRefund, type OperationResult, type Payment, type PLPaymentsBalance, type PLPaymentsOpenPublicSession, type PLPaymentsPaymentFromPublicSession, type PLPaymentsPurchaseCredits, type PLPaymentsTotalCredits, type PmtAccount, type PmtBankAccount, type PmtCard, type PmtCustomer, type PmtPublicSession, type PmtRefund, type RPPaymentsTotalCredits, type SortStripeBalanceResult } from "@fabriktor/schema";
|
|
2
|
+
import type { TokenProvider } from "../core/auth.js";
|
|
3
|
+
import type { DeleteManyOptionsCRUD, DeleteOneOptionsCRUD, FindOneOptionsCRUD, InsertOneOptionsCRUD, OperationResultOf, QueryOptionsCRUD, ReplaceOneOptionsCRUD, SearchManyOptionsCRUD, SearchResultOf } from "../core/crud.js";
|
|
4
|
+
import type { HTTPDoer } from "../core/http.js";
|
|
5
|
+
export type BalanceOptions = PLPaymentsBalance;
|
|
6
|
+
export type PaymentsBalance = SortStripeBalanceResult;
|
|
7
|
+
export type OpenPmtPublicSessionOptions = PLPaymentsOpenPublicSession;
|
|
8
|
+
export type PaymentFromPublicSessionOptions = PLPaymentsPaymentFromPublicSession;
|
|
9
|
+
export type PurchaseCreditsOptions = PLPaymentsPurchaseCredits;
|
|
10
|
+
export type TotalCreditsOptions = PLPaymentsTotalCredits;
|
|
11
|
+
export type PaymentsClientOptions = {
|
|
12
|
+
http: HTTPDoer;
|
|
13
|
+
base_url: string;
|
|
14
|
+
get_token?: TokenProvider;
|
|
15
|
+
};
|
|
16
|
+
export interface PaymentsOperator {
|
|
17
|
+
queryPayments(opts?: QueryOptionsCRUD): Promise<OperationResultOf<Payment[]>>;
|
|
18
|
+
insertOnePayment(opts: InsertOneOptionsCRUD<InPayment>): Promise<OperationResult>;
|
|
19
|
+
findOnePayment(opts: FindOneOptionsCRUD): Promise<OperationResultOf<Payment>>;
|
|
20
|
+
replaceOnePayment(opts: ReplaceOneOptionsCRUD<InPayment>): Promise<OperationResult>;
|
|
21
|
+
deleteOnePayment(opts: DeleteOneOptionsCRUD): Promise<OperationResult>;
|
|
22
|
+
deleteManyPayments(opts?: DeleteManyOptionsCRUD): Promise<OperationResultOf<number>>;
|
|
23
|
+
searchManyPayments(opts?: SearchManyOptionsCRUD): Promise<OperationResultOf<SearchResultOf<Payment>>>;
|
|
24
|
+
queryPmtAccounts(opts?: QueryOptionsCRUD): Promise<OperationResultOf<PmtAccount[]>>;
|
|
25
|
+
insertOnePmtAccount(opts: InsertOneOptionsCRUD<InPmtAccount>): Promise<OperationResult>;
|
|
26
|
+
findOnePmtAccount(opts: FindOneOptionsCRUD): Promise<OperationResultOf<PmtAccount>>;
|
|
27
|
+
replaceOnePmtAccount(opts: ReplaceOneOptionsCRUD<InPmtAccount>): Promise<OperationResult>;
|
|
28
|
+
deleteOnePmtAccount(opts: DeleteOneOptionsCRUD): Promise<OperationResult>;
|
|
29
|
+
deleteManyPmtAccounts(opts?: DeleteManyOptionsCRUD): Promise<OperationResultOf<number>>;
|
|
30
|
+
searchManyPmtAccounts(opts?: SearchManyOptionsCRUD): Promise<OperationResultOf<SearchResultOf<PmtAccount>>>;
|
|
31
|
+
queryPmtBankAccounts(opts?: QueryOptionsCRUD): Promise<OperationResultOf<PmtBankAccount[]>>;
|
|
32
|
+
insertOnePmtBankAccount(opts: InsertOneOptionsCRUD<InPmtBankAccount>): Promise<OperationResult>;
|
|
33
|
+
findOnePmtBankAccount(opts: FindOneOptionsCRUD): Promise<OperationResultOf<PmtBankAccount>>;
|
|
34
|
+
replaceOnePmtBankAccount(opts: ReplaceOneOptionsCRUD<InPmtBankAccount>): Promise<OperationResult>;
|
|
35
|
+
deleteOnePmtBankAccount(opts: DeleteOneOptionsCRUD): Promise<OperationResult>;
|
|
36
|
+
deleteManyPmtBankAccounts(opts?: DeleteManyOptionsCRUD): Promise<OperationResultOf<number>>;
|
|
37
|
+
searchManyPmtBankAccounts(opts?: SearchManyOptionsCRUD): Promise<OperationResultOf<SearchResultOf<PmtBankAccount>>>;
|
|
38
|
+
queryPmtCards(opts?: QueryOptionsCRUD): Promise<OperationResultOf<PmtCard[]>>;
|
|
39
|
+
insertOnePmtCard(opts: InsertOneOptionsCRUD<InPmtCard>): Promise<OperationResult>;
|
|
40
|
+
findOnePmtCard(opts: FindOneOptionsCRUD): Promise<OperationResultOf<PmtCard>>;
|
|
41
|
+
replaceOnePmtCard(opts: ReplaceOneOptionsCRUD<InPmtCard>): Promise<OperationResult>;
|
|
42
|
+
deleteOnePmtCard(opts: DeleteOneOptionsCRUD): Promise<OperationResult>;
|
|
43
|
+
deleteManyPmtCards(opts?: DeleteManyOptionsCRUD): Promise<OperationResultOf<number>>;
|
|
44
|
+
searchManyPmtCards(opts?: SearchManyOptionsCRUD): Promise<OperationResultOf<SearchResultOf<PmtCard>>>;
|
|
45
|
+
queryPmtRefunds(opts?: QueryOptionsCRUD): Promise<OperationResultOf<PmtRefund[]>>;
|
|
46
|
+
insertOnePmtRefund(opts: InsertOneOptionsCRUD<InPmtRefund>): Promise<OperationResult>;
|
|
47
|
+
findOnePmtRefund(opts: FindOneOptionsCRUD): Promise<OperationResultOf<PmtRefund>>;
|
|
48
|
+
replaceOnePmtRefund(opts: ReplaceOneOptionsCRUD<InPmtRefund>): Promise<OperationResult>;
|
|
49
|
+
deleteOnePmtRefund(opts: DeleteOneOptionsCRUD): Promise<OperationResult>;
|
|
50
|
+
deleteManyPmtRefunds(opts?: DeleteManyOptionsCRUD): Promise<OperationResultOf<number>>;
|
|
51
|
+
searchManyPmtRefunds(opts?: SearchManyOptionsCRUD): Promise<OperationResultOf<SearchResultOf<PmtRefund>>>;
|
|
52
|
+
queryPmtCustomers(opts?: QueryOptionsCRUD): Promise<OperationResultOf<PmtCustomer[]>>;
|
|
53
|
+
insertOnePmtCustomer(opts: InsertOneOptionsCRUD<InPmtCustomer>): Promise<OperationResult>;
|
|
54
|
+
findOnePmtCustomer(opts: FindOneOptionsCRUD): Promise<OperationResultOf<PmtCustomer>>;
|
|
55
|
+
replaceOnePmtCustomer(opts: ReplaceOneOptionsCRUD<InPmtCustomer>): Promise<OperationResult>;
|
|
56
|
+
deleteOnePmtCustomer(opts: DeleteOneOptionsCRUD): Promise<OperationResult>;
|
|
57
|
+
deleteManyPmtCustomers(opts?: DeleteManyOptionsCRUD): Promise<OperationResultOf<number>>;
|
|
58
|
+
searchManyPmtCustomers(opts?: SearchManyOptionsCRUD): Promise<OperationResultOf<SearchResultOf<PmtCustomer>>>;
|
|
59
|
+
queryPmtPublicSessions(opts?: QueryOptionsCRUD): Promise<OperationResultOf<PmtPublicSession[]>>;
|
|
60
|
+
insertOnePmtPublicSession(opts: InsertOneOptionsCRUD<InPmtPublicSession>): Promise<OperationResult>;
|
|
61
|
+
findOnePmtPublicSession(opts: FindOneOptionsCRUD): Promise<OperationResultOf<PmtPublicSession>>;
|
|
62
|
+
replaceOnePmtPublicSession(opts: ReplaceOneOptionsCRUD<InPmtPublicSession>): Promise<OperationResult>;
|
|
63
|
+
deleteOnePmtPublicSession(opts: DeleteOneOptionsCRUD): Promise<OperationResult>;
|
|
64
|
+
deleteManyPmtPublicSessions(opts?: DeleteManyOptionsCRUD): Promise<OperationResultOf<number>>;
|
|
65
|
+
searchManyPmtPublicSessions(opts?: SearchManyOptionsCRUD): Promise<OperationResultOf<SearchResultOf<PmtPublicSession>>>;
|
|
66
|
+
queryCreditLedger(opts?: QueryOptionsCRUD): Promise<OperationResultOf<CreditLedgerEntry[]>>;
|
|
67
|
+
insertOneCreditLedgerEntry(opts: InsertOneOptionsCRUD<InCreditLedgerEntry>): Promise<OperationResult>;
|
|
68
|
+
findOneCreditLedgerEntry(opts: FindOneOptionsCRUD): Promise<OperationResultOf<CreditLedgerEntry>>;
|
|
69
|
+
replaceOneCreditLedgerEntry(opts: ReplaceOneOptionsCRUD<InCreditLedgerEntry>): Promise<OperationResult>;
|
|
70
|
+
deleteOneCreditLedgerEntry(opts: DeleteOneOptionsCRUD): Promise<OperationResult>;
|
|
71
|
+
deleteManyCreditLedger(opts?: DeleteManyOptionsCRUD): Promise<OperationResultOf<number>>;
|
|
72
|
+
searchManyCreditLedger(opts?: SearchManyOptionsCRUD): Promise<OperationResultOf<SearchResultOf<CreditLedgerEntry>>>;
|
|
73
|
+
balance(opts: BalanceOptions): Promise<OperationResultOf<PaymentsBalance>>;
|
|
74
|
+
openPmtPublicSession(opts: OpenPmtPublicSessionOptions): Promise<OperationResultOf<PmtPublicSession> | void>;
|
|
75
|
+
paymentFromPublicSession(opts: PaymentFromPublicSessionOptions): Promise<OperationResult>;
|
|
76
|
+
purchaseCredits(opts: PurchaseCreditsOptions): Promise<OperationResult>;
|
|
77
|
+
totalCredits(opts: TotalCreditsOptions): Promise<OperationResultOf<RPPaymentsTotalCredits>>;
|
|
78
|
+
}
|
|
79
|
+
export declare class PaymentsClient implements PaymentsOperator {
|
|
80
|
+
private payments;
|
|
81
|
+
private pmt_accounts;
|
|
82
|
+
private pmt_bank_accounts;
|
|
83
|
+
private pmt_cards;
|
|
84
|
+
private pmt_refunds;
|
|
85
|
+
private pmt_customers;
|
|
86
|
+
private pmt_public_sessions;
|
|
87
|
+
private credit_ledger;
|
|
88
|
+
private http;
|
|
89
|
+
private base_url;
|
|
90
|
+
private get_token?;
|
|
91
|
+
constructor(opts: PaymentsClientOptions);
|
|
92
|
+
queryPayments(opts?: QueryOptionsCRUD): Promise<OperationResultOf<Payment[]>>;
|
|
93
|
+
insertOnePayment(opts: InsertOneOptionsCRUD<InPayment>): Promise<OperationResult>;
|
|
94
|
+
findOnePayment(opts: FindOneOptionsCRUD): Promise<OperationResultOf<Payment>>;
|
|
95
|
+
replaceOnePayment(opts: ReplaceOneOptionsCRUD<InPayment>): Promise<OperationResult>;
|
|
96
|
+
deleteOnePayment(opts: DeleteOneOptionsCRUD): Promise<OperationResult>;
|
|
97
|
+
deleteManyPayments(opts?: DeleteManyOptionsCRUD): Promise<OperationResultOf<number>>;
|
|
98
|
+
searchManyPayments(opts?: SearchManyOptionsCRUD): Promise<OperationResultOf<SearchResultOf<Payment>>>;
|
|
99
|
+
queryPmtAccounts(opts?: QueryOptionsCRUD): Promise<OperationResultOf<PmtAccount[]>>;
|
|
100
|
+
insertOnePmtAccount(opts: InsertOneOptionsCRUD<InPmtAccount>): Promise<OperationResult>;
|
|
101
|
+
findOnePmtAccount(opts: FindOneOptionsCRUD): Promise<OperationResultOf<PmtAccount>>;
|
|
102
|
+
replaceOnePmtAccount(opts: ReplaceOneOptionsCRUD<InPmtAccount>): Promise<OperationResult>;
|
|
103
|
+
deleteOnePmtAccount(opts: DeleteOneOptionsCRUD): Promise<OperationResult>;
|
|
104
|
+
deleteManyPmtAccounts(opts?: DeleteManyOptionsCRUD): Promise<OperationResultOf<number>>;
|
|
105
|
+
searchManyPmtAccounts(opts?: SearchManyOptionsCRUD): Promise<OperationResultOf<SearchResultOf<PmtAccount>>>;
|
|
106
|
+
queryPmtBankAccounts(opts?: QueryOptionsCRUD): Promise<OperationResultOf<PmtBankAccount[]>>;
|
|
107
|
+
insertOnePmtBankAccount(opts: InsertOneOptionsCRUD<InPmtBankAccount>): Promise<OperationResult>;
|
|
108
|
+
findOnePmtBankAccount(opts: FindOneOptionsCRUD): Promise<OperationResultOf<PmtBankAccount>>;
|
|
109
|
+
replaceOnePmtBankAccount(opts: ReplaceOneOptionsCRUD<InPmtBankAccount>): Promise<OperationResult>;
|
|
110
|
+
deleteOnePmtBankAccount(opts: DeleteOneOptionsCRUD): Promise<OperationResult>;
|
|
111
|
+
deleteManyPmtBankAccounts(opts?: DeleteManyOptionsCRUD): Promise<OperationResultOf<number>>;
|
|
112
|
+
searchManyPmtBankAccounts(opts?: SearchManyOptionsCRUD): Promise<OperationResultOf<SearchResultOf<PmtBankAccount>>>;
|
|
113
|
+
queryPmtCards(opts?: QueryOptionsCRUD): Promise<OperationResultOf<PmtCard[]>>;
|
|
114
|
+
insertOnePmtCard(opts: InsertOneOptionsCRUD<InPmtCard>): Promise<OperationResult>;
|
|
115
|
+
findOnePmtCard(opts: FindOneOptionsCRUD): Promise<OperationResultOf<PmtCard>>;
|
|
116
|
+
replaceOnePmtCard(opts: ReplaceOneOptionsCRUD<InPmtCard>): Promise<OperationResult>;
|
|
117
|
+
deleteOnePmtCard(opts: DeleteOneOptionsCRUD): Promise<OperationResult>;
|
|
118
|
+
deleteManyPmtCards(opts?: DeleteManyOptionsCRUD): Promise<OperationResultOf<number>>;
|
|
119
|
+
searchManyPmtCards(opts?: SearchManyOptionsCRUD): Promise<OperationResultOf<SearchResultOf<PmtCard>>>;
|
|
120
|
+
queryPmtRefunds(opts?: QueryOptionsCRUD): Promise<OperationResultOf<PmtRefund[]>>;
|
|
121
|
+
insertOnePmtRefund(opts: InsertOneOptionsCRUD<InPmtRefund>): Promise<OperationResult>;
|
|
122
|
+
findOnePmtRefund(opts: FindOneOptionsCRUD): Promise<OperationResultOf<PmtRefund>>;
|
|
123
|
+
replaceOnePmtRefund(opts: ReplaceOneOptionsCRUD<InPmtRefund>): Promise<OperationResult>;
|
|
124
|
+
deleteOnePmtRefund(opts: DeleteOneOptionsCRUD): Promise<OperationResult>;
|
|
125
|
+
deleteManyPmtRefunds(opts?: DeleteManyOptionsCRUD): Promise<OperationResultOf<number>>;
|
|
126
|
+
searchManyPmtRefunds(opts?: SearchManyOptionsCRUD): Promise<OperationResultOf<SearchResultOf<PmtRefund>>>;
|
|
127
|
+
queryPmtCustomers(opts?: QueryOptionsCRUD): Promise<OperationResultOf<PmtCustomer[]>>;
|
|
128
|
+
insertOnePmtCustomer(opts: InsertOneOptionsCRUD<InPmtCustomer>): Promise<OperationResult>;
|
|
129
|
+
findOnePmtCustomer(opts: FindOneOptionsCRUD): Promise<OperationResultOf<PmtCustomer>>;
|
|
130
|
+
replaceOnePmtCustomer(opts: ReplaceOneOptionsCRUD<InPmtCustomer>): Promise<OperationResult>;
|
|
131
|
+
deleteOnePmtCustomer(opts: DeleteOneOptionsCRUD): Promise<OperationResult>;
|
|
132
|
+
deleteManyPmtCustomers(opts?: DeleteManyOptionsCRUD): Promise<OperationResultOf<number>>;
|
|
133
|
+
searchManyPmtCustomers(opts?: SearchManyOptionsCRUD): Promise<OperationResultOf<SearchResultOf<PmtCustomer>>>;
|
|
134
|
+
queryPmtPublicSessions(opts?: QueryOptionsCRUD): Promise<OperationResultOf<PmtPublicSession[]>>;
|
|
135
|
+
insertOnePmtPublicSession(opts: InsertOneOptionsCRUD<InPmtPublicSession>): Promise<OperationResult>;
|
|
136
|
+
findOnePmtPublicSession(opts: FindOneOptionsCRUD): Promise<OperationResultOf<PmtPublicSession>>;
|
|
137
|
+
replaceOnePmtPublicSession(opts: ReplaceOneOptionsCRUD<InPmtPublicSession>): Promise<OperationResult>;
|
|
138
|
+
deleteOnePmtPublicSession(opts: DeleteOneOptionsCRUD): Promise<OperationResult>;
|
|
139
|
+
deleteManyPmtPublicSessions(opts?: DeleteManyOptionsCRUD): Promise<OperationResultOf<number>>;
|
|
140
|
+
searchManyPmtPublicSessions(opts?: SearchManyOptionsCRUD): Promise<OperationResultOf<SearchResultOf<PmtPublicSession>>>;
|
|
141
|
+
queryCreditLedger(opts?: QueryOptionsCRUD): Promise<OperationResultOf<CreditLedgerEntry[]>>;
|
|
142
|
+
insertOneCreditLedgerEntry(opts: InsertOneOptionsCRUD<InCreditLedgerEntry>): Promise<OperationResult>;
|
|
143
|
+
findOneCreditLedgerEntry(opts: FindOneOptionsCRUD): Promise<OperationResultOf<CreditLedgerEntry>>;
|
|
144
|
+
replaceOneCreditLedgerEntry(opts: ReplaceOneOptionsCRUD<InCreditLedgerEntry>): Promise<OperationResult>;
|
|
145
|
+
deleteOneCreditLedgerEntry(opts: DeleteOneOptionsCRUD): Promise<OperationResult>;
|
|
146
|
+
deleteManyCreditLedger(opts?: DeleteManyOptionsCRUD): Promise<OperationResultOf<number>>;
|
|
147
|
+
searchManyCreditLedger(opts?: SearchManyOptionsCRUD): Promise<OperationResultOf<SearchResultOf<CreditLedgerEntry>>>;
|
|
148
|
+
balance(opts: BalanceOptions): Promise<OperationResultOf<PaymentsBalance>>;
|
|
149
|
+
openPmtPublicSession(opts: OpenPmtPublicSessionOptions): Promise<OperationResultOf<PmtPublicSession> | void>;
|
|
150
|
+
paymentFromPublicSession(opts: PaymentFromPublicSessionOptions): Promise<OperationResult>;
|
|
151
|
+
purchaseCredits(opts: PurchaseCreditsOptions): Promise<OperationResult>;
|
|
152
|
+
totalCredits(opts: TotalCreditsOptions): Promise<OperationResultOf<RPPaymentsTotalCredits>>;
|
|
153
|
+
}
|
|
154
|
+
export declare function newPaymentsClient(opts: PaymentsClientOptions): PaymentsClient;
|