@fabriktor/fx 0.0.39 → 0.0.40
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 +164 -1
- package/dist/src/billable/billable.js +436 -0
- package/dist/src/calls/calls.d.ts +11 -0
- package/dist/src/calls/calls.js +26 -0
- package/dist/src/chat/chat.d.ts +22 -1
- package/dist/src/chat/chat.js +33 -25
- package/dist/src/contacts/contacts.d.ts +12 -2
- package/dist/src/contacts/contacts.js +33 -7
- package/dist/src/core/id.d.ts +3 -0
- package/dist/src/core/id.js +24 -0
- package/dist/src/feed/feed.d.ts +39 -3
- package/dist/src/feed/feed.js +85 -7
- package/dist/src/fulfillments/fulfillments.d.ts +32 -0
- package/dist/src/fulfillments/fulfillments.js +54 -0
- package/dist/src/fx.d.ts +5 -1
- package/dist/src/fx.js +11 -1
- package/dist/src/index.d.ts +2 -0
- package/dist/src/index.js +2 -0
- package/dist/src/jobs/jobs.d.ts +52 -4
- package/dist/src/jobs/jobs.js +120 -9
- package/dist/src/marketplace/marketplace.d.ts +29 -1
- package/dist/src/marketplace/marketplace.js +64 -1
- package/dist/src/memos/memos.js +4 -28
- package/dist/src/payments/payments.d.ts +112 -1
- package/dist/src/payments/payments.js +291 -15
- package/dist/src/payrolls/payrolls.d.ts +134 -1
- package/dist/src/payrolls/payrolls.js +364 -0
- package/dist/src/preferences/preferences.d.ts +83 -1
- package/dist/src/preferences/preferences.js +227 -0
- package/dist/src/privacy/privacy.d.ts +21 -2
- package/dist/src/privacy/privacy.js +56 -5
- package/dist/src/routes/routes.d.ts +63 -3
- package/dist/src/routes/routes.js +151 -1
- package/dist/src/timesheets/timesheets.d.ts +11 -1
- package/dist/src/timesheets/timesheets.js +39 -1
- package/package.json +2 -2
|
@@ -1,8 +1,63 @@
|
|
|
1
|
-
import { type Payment, type PmtPublicSession } from "@fabriktor/schema";
|
|
1
|
+
import { type CreditLedgerEntry, type Payment, type PmtAccount, type PmtBankAccount, type PmtCard, type PmtCustomer, type PmtPublicSession, type PmtRefund } from "@fabriktor/schema";
|
|
2
2
|
import type { PaymentsOperator } from "@fabriktor/client";
|
|
3
|
+
import { type SearchPage } from "../core/search.js";
|
|
3
4
|
type PurchaseCreditsPayload = Parameters<PaymentsOperator["purchaseCredits"]>[0];
|
|
4
5
|
type OpenPublicSessionPayload = Parameters<PaymentsOperator["openPmtPublicSession"]>[0];
|
|
5
6
|
type PaymentFromPublicSessionPayload = Parameters<PaymentsOperator["paymentFromPublicSession"]>[0];
|
|
7
|
+
type PaymentInsertOptions = Parameters<PaymentsOperator["insertOnePayment"]>[0];
|
|
8
|
+
type PaymentReplaceOptions = Parameters<PaymentsOperator["replaceOnePayment"]>[0];
|
|
9
|
+
type PmtAccountInsertOptions = Parameters<PaymentsOperator["insertOnePmtAccount"]>[0];
|
|
10
|
+
type PmtAccountReplaceOptions = Parameters<PaymentsOperator["replaceOnePmtAccount"]>[0];
|
|
11
|
+
type PmtBankAccountInsertOptions = Parameters<PaymentsOperator["insertOnePmtBankAccount"]>[0];
|
|
12
|
+
type PmtBankAccountReplaceOptions = Parameters<PaymentsOperator["replaceOnePmtBankAccount"]>[0];
|
|
13
|
+
type PmtCardInsertOptions = Parameters<PaymentsOperator["insertOnePmtCard"]>[0];
|
|
14
|
+
type PmtCardReplaceOptions = Parameters<PaymentsOperator["replaceOnePmtCard"]>[0];
|
|
15
|
+
type PmtRefundInsertOptions = Parameters<PaymentsOperator["insertOnePmtRefund"]>[0];
|
|
16
|
+
type PmtRefundReplaceOptions = Parameters<PaymentsOperator["replaceOnePmtRefund"]>[0];
|
|
17
|
+
type PmtCustomerInsertOptions = Parameters<PaymentsOperator["insertOnePmtCustomer"]>[0];
|
|
18
|
+
type PmtCustomerReplaceOptions = Parameters<PaymentsOperator["replaceOnePmtCustomer"]>[0];
|
|
19
|
+
type PmtPublicSessionInsertOptions = Parameters<PaymentsOperator["insertOnePmtPublicSession"]>[0];
|
|
20
|
+
type PmtPublicSessionReplaceOptions = Parameters<PaymentsOperator["replaceOnePmtPublicSession"]>[0];
|
|
21
|
+
type CreditLedgerEntryInsertOptions = Parameters<PaymentsOperator["insertOneCreditLedgerEntry"]>[0];
|
|
22
|
+
type CreditLedgerEntryReplaceOptions = Parameters<PaymentsOperator["replaceOneCreditLedgerEntry"]>[0];
|
|
23
|
+
type SearchPaymentRecordsOptions = {
|
|
24
|
+
owner_id: string;
|
|
25
|
+
q?: string;
|
|
26
|
+
page?: number;
|
|
27
|
+
per_page?: number;
|
|
28
|
+
};
|
|
29
|
+
export type CreatePaymentOptions = PaymentInsertOptions;
|
|
30
|
+
export type ReplacePaymentOptions = PaymentReplaceOptions;
|
|
31
|
+
export type SearchPaymentsOptions = SearchPaymentRecordsOptions;
|
|
32
|
+
export type SearchPaymentsPage = SearchPage<Payment>;
|
|
33
|
+
export type CreatePmtAccountOptions = PmtAccountInsertOptions;
|
|
34
|
+
export type ReplacePmtAccountOptions = PmtAccountReplaceOptions;
|
|
35
|
+
export type SearchPmtAccountsOptions = SearchPaymentRecordsOptions;
|
|
36
|
+
export type SearchPmtAccountsPage = SearchPage<PmtAccount>;
|
|
37
|
+
export type CreatePmtBankAccountOptions = PmtBankAccountInsertOptions;
|
|
38
|
+
export type ReplacePmtBankAccountOptions = PmtBankAccountReplaceOptions;
|
|
39
|
+
export type SearchPmtBankAccountsOptions = SearchPaymentRecordsOptions;
|
|
40
|
+
export type SearchPmtBankAccountsPage = SearchPage<PmtBankAccount>;
|
|
41
|
+
export type CreatePmtCardOptions = PmtCardInsertOptions;
|
|
42
|
+
export type ReplacePmtCardOptions = PmtCardReplaceOptions;
|
|
43
|
+
export type SearchPmtCardsOptions = SearchPaymentRecordsOptions;
|
|
44
|
+
export type SearchPmtCardsPage = SearchPage<PmtCard>;
|
|
45
|
+
export type CreatePmtRefundOptions = PmtRefundInsertOptions;
|
|
46
|
+
export type ReplacePmtRefundOptions = PmtRefundReplaceOptions;
|
|
47
|
+
export type SearchPmtRefundsOptions = SearchPaymentRecordsOptions;
|
|
48
|
+
export type SearchPmtRefundsPage = SearchPage<PmtRefund>;
|
|
49
|
+
export type CreatePmtCustomerOptions = PmtCustomerInsertOptions;
|
|
50
|
+
export type ReplacePmtCustomerOptions = PmtCustomerReplaceOptions;
|
|
51
|
+
export type SearchPmtCustomersOptions = SearchPaymentRecordsOptions;
|
|
52
|
+
export type SearchPmtCustomersPage = SearchPage<PmtCustomer>;
|
|
53
|
+
export type CreatePmtPublicSessionOptions = PmtPublicSessionInsertOptions;
|
|
54
|
+
export type ReplacePmtPublicSessionOptions = PmtPublicSessionReplaceOptions;
|
|
55
|
+
export type SearchPmtPublicSessionsOptions = SearchPaymentRecordsOptions;
|
|
56
|
+
export type SearchPmtPublicSessionsPage = SearchPage<PmtPublicSession>;
|
|
57
|
+
export type CreateCreditLedgerEntryOptions = CreditLedgerEntryInsertOptions;
|
|
58
|
+
export type ReplaceCreditLedgerEntryOptions = CreditLedgerEntryReplaceOptions;
|
|
59
|
+
export type SearchCreditLedgerOptions = SearchPaymentRecordsOptions;
|
|
60
|
+
export type SearchCreditLedgerPage = SearchPage<CreditLedgerEntry>;
|
|
6
61
|
export declare const PublicPaymentSessionStatus: {
|
|
7
62
|
readonly NotFound: "not_found";
|
|
8
63
|
readonly Ready: "ready";
|
|
@@ -34,6 +89,30 @@ export type PaymentsFXOptions = {
|
|
|
34
89
|
payments: PaymentsOperator;
|
|
35
90
|
};
|
|
36
91
|
export interface PaymentsFXOperator {
|
|
92
|
+
createPayment(opts: CreatePaymentOptions): Promise<Payment>;
|
|
93
|
+
replacePayment(opts: ReplacePaymentOptions): Promise<Payment>;
|
|
94
|
+
searchPayments(opts: SearchPaymentsOptions): Promise<SearchPaymentsPage>;
|
|
95
|
+
createPmtAccount(opts: CreatePmtAccountOptions): Promise<PmtAccount>;
|
|
96
|
+
replacePmtAccount(opts: ReplacePmtAccountOptions): Promise<PmtAccount>;
|
|
97
|
+
searchPmtAccounts(opts: SearchPmtAccountsOptions): Promise<SearchPmtAccountsPage>;
|
|
98
|
+
createPmtBankAccount(opts: CreatePmtBankAccountOptions): Promise<PmtBankAccount>;
|
|
99
|
+
replacePmtBankAccount(opts: ReplacePmtBankAccountOptions): Promise<PmtBankAccount>;
|
|
100
|
+
searchPmtBankAccounts(opts: SearchPmtBankAccountsOptions): Promise<SearchPmtBankAccountsPage>;
|
|
101
|
+
createPmtCard(opts: CreatePmtCardOptions): Promise<PmtCard>;
|
|
102
|
+
replacePmtCard(opts: ReplacePmtCardOptions): Promise<PmtCard>;
|
|
103
|
+
searchPmtCards(opts: SearchPmtCardsOptions): Promise<SearchPmtCardsPage>;
|
|
104
|
+
createPmtRefund(opts: CreatePmtRefundOptions): Promise<PmtRefund>;
|
|
105
|
+
replacePmtRefund(opts: ReplacePmtRefundOptions): Promise<PmtRefund>;
|
|
106
|
+
searchPmtRefunds(opts: SearchPmtRefundsOptions): Promise<SearchPmtRefundsPage>;
|
|
107
|
+
createPmtCustomer(opts: CreatePmtCustomerOptions): Promise<PmtCustomer>;
|
|
108
|
+
replacePmtCustomer(opts: ReplacePmtCustomerOptions): Promise<PmtCustomer>;
|
|
109
|
+
searchPmtCustomers(opts: SearchPmtCustomersOptions): Promise<SearchPmtCustomersPage>;
|
|
110
|
+
createPmtPublicSession(opts: CreatePmtPublicSessionOptions): Promise<PmtPublicSession>;
|
|
111
|
+
replacePmtPublicSession(opts: ReplacePmtPublicSessionOptions): Promise<PmtPublicSession>;
|
|
112
|
+
searchPmtPublicSessions(opts: SearchPmtPublicSessionsOptions): Promise<SearchPmtPublicSessionsPage>;
|
|
113
|
+
createCreditLedgerEntry(opts: CreateCreditLedgerEntryOptions): Promise<CreditLedgerEntry>;
|
|
114
|
+
replaceCreditLedgerEntry(opts: ReplaceCreditLedgerEntryOptions): Promise<CreditLedgerEntry>;
|
|
115
|
+
searchCreditLedger(opts: SearchCreditLedgerOptions): Promise<SearchCreditLedgerPage>;
|
|
37
116
|
purchaseAppleCredits(opts: PurchaseAppleCreditsOptions): Promise<void>;
|
|
38
117
|
purchaseGoogleCredits(opts: PurchaseGoogleCreditsOptions): Promise<void>;
|
|
39
118
|
prepareStripeCreditPurchase(opts: PrepareStripeCreditPurchaseOptions): Promise<PrepareStripeCreditPurchaseResult>;
|
|
@@ -46,6 +125,30 @@ export declare class PaymentsFX implements PaymentsFXOperator {
|
|
|
46
125
|
private payments;
|
|
47
126
|
private submittedPublicSessionIDs;
|
|
48
127
|
constructor(opts: PaymentsFXOptions);
|
|
128
|
+
createPayment(opts: CreatePaymentOptions): Promise<Payment>;
|
|
129
|
+
replacePayment(opts: ReplacePaymentOptions): Promise<Payment>;
|
|
130
|
+
searchPayments(opts: SearchPaymentsOptions): Promise<SearchPaymentsPage>;
|
|
131
|
+
createPmtAccount(opts: CreatePmtAccountOptions): Promise<PmtAccount>;
|
|
132
|
+
replacePmtAccount(opts: ReplacePmtAccountOptions): Promise<PmtAccount>;
|
|
133
|
+
searchPmtAccounts(opts: SearchPmtAccountsOptions): Promise<SearchPmtAccountsPage>;
|
|
134
|
+
createPmtBankAccount(opts: CreatePmtBankAccountOptions): Promise<PmtBankAccount>;
|
|
135
|
+
replacePmtBankAccount(opts: ReplacePmtBankAccountOptions): Promise<PmtBankAccount>;
|
|
136
|
+
searchPmtBankAccounts(opts: SearchPmtBankAccountsOptions): Promise<SearchPmtBankAccountsPage>;
|
|
137
|
+
createPmtCard(opts: CreatePmtCardOptions): Promise<PmtCard>;
|
|
138
|
+
replacePmtCard(opts: ReplacePmtCardOptions): Promise<PmtCard>;
|
|
139
|
+
searchPmtCards(opts: SearchPmtCardsOptions): Promise<SearchPmtCardsPage>;
|
|
140
|
+
createPmtRefund(opts: CreatePmtRefundOptions): Promise<PmtRefund>;
|
|
141
|
+
replacePmtRefund(opts: ReplacePmtRefundOptions): Promise<PmtRefund>;
|
|
142
|
+
searchPmtRefunds(opts: SearchPmtRefundsOptions): Promise<SearchPmtRefundsPage>;
|
|
143
|
+
createPmtCustomer(opts: CreatePmtCustomerOptions): Promise<PmtCustomer>;
|
|
144
|
+
replacePmtCustomer(opts: ReplacePmtCustomerOptions): Promise<PmtCustomer>;
|
|
145
|
+
searchPmtCustomers(opts: SearchPmtCustomersOptions): Promise<SearchPmtCustomersPage>;
|
|
146
|
+
createPmtPublicSession(opts: CreatePmtPublicSessionOptions): Promise<PmtPublicSession>;
|
|
147
|
+
replacePmtPublicSession(opts: ReplacePmtPublicSessionOptions): Promise<PmtPublicSession>;
|
|
148
|
+
searchPmtPublicSessions(opts: SearchPmtPublicSessionsOptions): Promise<SearchPmtPublicSessionsPage>;
|
|
149
|
+
createCreditLedgerEntry(opts: CreateCreditLedgerEntryOptions): Promise<CreditLedgerEntry>;
|
|
150
|
+
replaceCreditLedgerEntry(opts: ReplaceCreditLedgerEntryOptions): Promise<CreditLedgerEntry>;
|
|
151
|
+
searchCreditLedger(opts: SearchCreditLedgerOptions): Promise<SearchCreditLedgerPage>;
|
|
49
152
|
purchaseAppleCredits(opts: PurchaseAppleCreditsOptions): Promise<void>;
|
|
50
153
|
purchaseGoogleCredits(opts: PurchaseGoogleCreditsOptions): Promise<void>;
|
|
51
154
|
prepareStripeCreditPurchase(opts: PrepareStripeCreditPurchaseOptions): Promise<PrepareStripeCreditPurchaseResult>;
|
|
@@ -53,6 +156,14 @@ export declare class PaymentsFX implements PaymentsFXOperator {
|
|
|
53
156
|
openDirectPublicPaymentSession(opts: OpenDirectPublicPaymentSessionOptions): Promise<OpenPublicPaymentSessionResult>;
|
|
54
157
|
openLookupPublicPaymentSession(opts: OpenLookupPublicPaymentSessionOptions): Promise<OpenPublicPaymentSessionResult>;
|
|
55
158
|
payPublicSession(opts: PayPublicSessionOptions): Promise<PayPublicSessionResult>;
|
|
159
|
+
private findPayment;
|
|
160
|
+
private findPmtAccount;
|
|
161
|
+
private findPmtBankAccount;
|
|
162
|
+
private findPmtCard;
|
|
163
|
+
private findPmtRefund;
|
|
164
|
+
private findPmtCustomer;
|
|
165
|
+
private findPmtPublicSession;
|
|
166
|
+
private findCreditLedgerEntry;
|
|
56
167
|
private openPublicPaymentSession;
|
|
57
168
|
}
|
|
58
169
|
export declare function newPaymentsFX(opts: PaymentsFXOptions): PaymentsFX;
|
|
@@ -3,11 +3,37 @@
|
|
|
3
3
|
// Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
4
4
|
// not use this file except in compliance with the License. You may obtain
|
|
5
5
|
// a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
-
import { CreditLedgerSourceAndroidIAP, CreditLedgerSourceAppleIAP, CreditLedgerSourceStripe, ZeroID, } from "@fabriktor/schema";
|
|
6
|
+
import { CreditLedgerSourceAndroidIAP, CreditLedgerSourceAppleIAP, CreditLedgerSourceStripe, OwnerIDKey, ZeroID, } from "@fabriktor/schema";
|
|
7
7
|
import { errResolveFailed, errValidation } from "../core/err.js";
|
|
8
|
+
import { requiredOperationID, resolvedID } from "../core/id.js";
|
|
9
|
+
import { runSearch } from "../core/search.js";
|
|
8
10
|
const publicAmountPattern = /^\d+$/;
|
|
11
|
+
const resourcePayment = "payment";
|
|
12
|
+
const resourcePmtAccount = "pmt_account";
|
|
13
|
+
const resourcePmtBankAccount = "pmt_bank_account";
|
|
14
|
+
const resourcePmtCard = "pmt_card";
|
|
15
|
+
const resourcePmtRefund = "pmt_refund";
|
|
16
|
+
const resourcePmtCustomer = "pmt_customer";
|
|
17
|
+
const resourcePmtPublicSession = "pmt_public_session";
|
|
18
|
+
const resourceCreditLedgerEntry = "credit_ledger_entry";
|
|
9
19
|
const resourceStripeCreditPayment = "stripe credit payment";
|
|
10
20
|
const resourcePublicPaymentSession = "public payment session";
|
|
21
|
+
const msgCreatedPaymentIDMissing = "Created payment response did not contain an ID.";
|
|
22
|
+
const msgPaymentMissing = "Payment could not be resolved after the mutation.";
|
|
23
|
+
const msgCreatedPmtAccountIDMissing = "Created payment account response did not contain an ID.";
|
|
24
|
+
const msgPmtAccountMissing = "Payment account could not be resolved after the mutation.";
|
|
25
|
+
const msgCreatedPmtBankAccountIDMissing = "Created payment bank account response did not contain an ID.";
|
|
26
|
+
const msgPmtBankAccountMissing = "Payment bank account could not be resolved after the mutation.";
|
|
27
|
+
const msgCreatedPmtCardIDMissing = "Created payment card response did not contain an ID.";
|
|
28
|
+
const msgPmtCardMissing = "Payment card could not be resolved after the mutation.";
|
|
29
|
+
const msgCreatedPmtRefundIDMissing = "Created payment refund response did not contain an ID.";
|
|
30
|
+
const msgPmtRefundMissing = "Payment refund could not be resolved after the mutation.";
|
|
31
|
+
const msgCreatedPmtCustomerIDMissing = "Created payment customer response did not contain an ID.";
|
|
32
|
+
const msgPmtCustomerMissing = "Payment customer could not be resolved after the mutation.";
|
|
33
|
+
const msgCreatedPmtPublicSessionIDMissing = "Created payment public session response did not contain an ID.";
|
|
34
|
+
const msgPmtPublicSessionMissing = "Payment public session could not be resolved after the mutation.";
|
|
35
|
+
const msgCreatedCreditLedgerEntryIDMissing = "Created credit ledger entry response did not contain an ID.";
|
|
36
|
+
const msgCreditLedgerEntryMissing = "Credit ledger entry could not be resolved after the mutation.";
|
|
11
37
|
const msgStripeCreditPaymentIDMissing = "Stripe credit payment ID could not be resolved.";
|
|
12
38
|
const msgStripeCreditPaymentMissing = "Stripe credit payment could not be resolved.";
|
|
13
39
|
const msgStripeCreditPaymentAlreadyConfirmed = "Stripe credit payment is already confirmed.";
|
|
@@ -30,6 +56,166 @@ export class PaymentsFX {
|
|
|
30
56
|
this.payments = opts.payments;
|
|
31
57
|
this.submittedPublicSessionIDs = new Set();
|
|
32
58
|
}
|
|
59
|
+
async createPayment(opts) {
|
|
60
|
+
const out = await this.payments.insertOnePayment(opts);
|
|
61
|
+
const id = requiredOperationID(out, msgCreatedPaymentIDMissing);
|
|
62
|
+
return await this.findPayment(id);
|
|
63
|
+
}
|
|
64
|
+
async replacePayment(opts) {
|
|
65
|
+
await this.payments.replaceOnePayment(opts);
|
|
66
|
+
return await this.findPayment(opts.id);
|
|
67
|
+
}
|
|
68
|
+
async searchPayments(opts) {
|
|
69
|
+
return await runSearch({
|
|
70
|
+
search: (searchOpts) => this.payments.searchManyPayments(searchOpts),
|
|
71
|
+
query: {
|
|
72
|
+
[OwnerIDKey]: opts.owner_id,
|
|
73
|
+
},
|
|
74
|
+
q: opts.q,
|
|
75
|
+
page: opts.page,
|
|
76
|
+
per_page: opts.per_page,
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
async createPmtAccount(opts) {
|
|
80
|
+
const out = await this.payments.insertOnePmtAccount(opts);
|
|
81
|
+
const id = requiredOperationID(out, msgCreatedPmtAccountIDMissing);
|
|
82
|
+
return await this.findPmtAccount(id);
|
|
83
|
+
}
|
|
84
|
+
async replacePmtAccount(opts) {
|
|
85
|
+
await this.payments.replaceOnePmtAccount(opts);
|
|
86
|
+
return await this.findPmtAccount(opts.id);
|
|
87
|
+
}
|
|
88
|
+
async searchPmtAccounts(opts) {
|
|
89
|
+
return await runSearch({
|
|
90
|
+
search: (searchOpts) => this.payments.searchManyPmtAccounts(searchOpts),
|
|
91
|
+
query: {
|
|
92
|
+
[OwnerIDKey]: opts.owner_id,
|
|
93
|
+
},
|
|
94
|
+
q: opts.q,
|
|
95
|
+
page: opts.page,
|
|
96
|
+
per_page: opts.per_page,
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
async createPmtBankAccount(opts) {
|
|
100
|
+
const out = await this.payments.insertOnePmtBankAccount(opts);
|
|
101
|
+
const id = requiredOperationID(out, msgCreatedPmtBankAccountIDMissing);
|
|
102
|
+
return await this.findPmtBankAccount(id);
|
|
103
|
+
}
|
|
104
|
+
async replacePmtBankAccount(opts) {
|
|
105
|
+
await this.payments.replaceOnePmtBankAccount(opts);
|
|
106
|
+
return await this.findPmtBankAccount(opts.id);
|
|
107
|
+
}
|
|
108
|
+
async searchPmtBankAccounts(opts) {
|
|
109
|
+
return await runSearch({
|
|
110
|
+
search: (searchOpts) => this.payments.searchManyPmtBankAccounts(searchOpts),
|
|
111
|
+
query: {
|
|
112
|
+
[OwnerIDKey]: opts.owner_id,
|
|
113
|
+
},
|
|
114
|
+
q: opts.q,
|
|
115
|
+
page: opts.page,
|
|
116
|
+
per_page: opts.per_page,
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
async createPmtCard(opts) {
|
|
120
|
+
const out = await this.payments.insertOnePmtCard(opts);
|
|
121
|
+
const id = requiredOperationID(out, msgCreatedPmtCardIDMissing);
|
|
122
|
+
return await this.findPmtCard(id);
|
|
123
|
+
}
|
|
124
|
+
async replacePmtCard(opts) {
|
|
125
|
+
await this.payments.replaceOnePmtCard(opts);
|
|
126
|
+
return await this.findPmtCard(opts.id);
|
|
127
|
+
}
|
|
128
|
+
async searchPmtCards(opts) {
|
|
129
|
+
return await runSearch({
|
|
130
|
+
search: (searchOpts) => this.payments.searchManyPmtCards(searchOpts),
|
|
131
|
+
query: {
|
|
132
|
+
[OwnerIDKey]: opts.owner_id,
|
|
133
|
+
},
|
|
134
|
+
q: opts.q,
|
|
135
|
+
page: opts.page,
|
|
136
|
+
per_page: opts.per_page,
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
async createPmtRefund(opts) {
|
|
140
|
+
const out = await this.payments.insertOnePmtRefund(opts);
|
|
141
|
+
const id = requiredOperationID(out, msgCreatedPmtRefundIDMissing);
|
|
142
|
+
return await this.findPmtRefund(id);
|
|
143
|
+
}
|
|
144
|
+
async replacePmtRefund(opts) {
|
|
145
|
+
await this.payments.replaceOnePmtRefund(opts);
|
|
146
|
+
return await this.findPmtRefund(opts.id);
|
|
147
|
+
}
|
|
148
|
+
async searchPmtRefunds(opts) {
|
|
149
|
+
return await runSearch({
|
|
150
|
+
search: (searchOpts) => this.payments.searchManyPmtRefunds(searchOpts),
|
|
151
|
+
query: {
|
|
152
|
+
[OwnerIDKey]: opts.owner_id,
|
|
153
|
+
},
|
|
154
|
+
q: opts.q,
|
|
155
|
+
page: opts.page,
|
|
156
|
+
per_page: opts.per_page,
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
async createPmtCustomer(opts) {
|
|
160
|
+
const out = await this.payments.insertOnePmtCustomer(opts);
|
|
161
|
+
const id = requiredOperationID(out, msgCreatedPmtCustomerIDMissing);
|
|
162
|
+
return await this.findPmtCustomer(id);
|
|
163
|
+
}
|
|
164
|
+
async replacePmtCustomer(opts) {
|
|
165
|
+
await this.payments.replaceOnePmtCustomer(opts);
|
|
166
|
+
return await this.findPmtCustomer(opts.id);
|
|
167
|
+
}
|
|
168
|
+
async searchPmtCustomers(opts) {
|
|
169
|
+
return await runSearch({
|
|
170
|
+
search: (searchOpts) => this.payments.searchManyPmtCustomers(searchOpts),
|
|
171
|
+
query: {
|
|
172
|
+
[OwnerIDKey]: opts.owner_id,
|
|
173
|
+
},
|
|
174
|
+
q: opts.q,
|
|
175
|
+
page: opts.page,
|
|
176
|
+
per_page: opts.per_page,
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
async createPmtPublicSession(opts) {
|
|
180
|
+
const out = await this.payments.insertOnePmtPublicSession(opts);
|
|
181
|
+
const id = requiredOperationID(out, msgCreatedPmtPublicSessionIDMissing);
|
|
182
|
+
return await this.findPmtPublicSession(id);
|
|
183
|
+
}
|
|
184
|
+
async replacePmtPublicSession(opts) {
|
|
185
|
+
await this.payments.replaceOnePmtPublicSession(opts);
|
|
186
|
+
return await this.findPmtPublicSession(opts.id);
|
|
187
|
+
}
|
|
188
|
+
async searchPmtPublicSessions(opts) {
|
|
189
|
+
return await runSearch({
|
|
190
|
+
search: (searchOpts) => this.payments.searchManyPmtPublicSessions(searchOpts),
|
|
191
|
+
query: {
|
|
192
|
+
[OwnerIDKey]: opts.owner_id,
|
|
193
|
+
},
|
|
194
|
+
q: opts.q,
|
|
195
|
+
page: opts.page,
|
|
196
|
+
per_page: opts.per_page,
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
async createCreditLedgerEntry(opts) {
|
|
200
|
+
const out = await this.payments.insertOneCreditLedgerEntry(opts);
|
|
201
|
+
const id = requiredOperationID(out, msgCreatedCreditLedgerEntryIDMissing);
|
|
202
|
+
return await this.findCreditLedgerEntry(id);
|
|
203
|
+
}
|
|
204
|
+
async replaceCreditLedgerEntry(opts) {
|
|
205
|
+
await this.payments.replaceOneCreditLedgerEntry(opts);
|
|
206
|
+
return await this.findCreditLedgerEntry(opts.id);
|
|
207
|
+
}
|
|
208
|
+
async searchCreditLedger(opts) {
|
|
209
|
+
return await runSearch({
|
|
210
|
+
search: (searchOpts) => this.payments.searchManyCreditLedger(searchOpts),
|
|
211
|
+
query: {
|
|
212
|
+
[OwnerIDKey]: opts.owner_id,
|
|
213
|
+
},
|
|
214
|
+
q: opts.q,
|
|
215
|
+
page: opts.page,
|
|
216
|
+
per_page: opts.per_page,
|
|
217
|
+
});
|
|
218
|
+
}
|
|
33
219
|
async purchaseAppleCredits(opts) {
|
|
34
220
|
await this.payments.purchaseCredits({
|
|
35
221
|
src: CreditLedgerSourceAppleIAP,
|
|
@@ -145,6 +331,110 @@ export class PaymentsFX {
|
|
|
145
331
|
throw err;
|
|
146
332
|
}
|
|
147
333
|
}
|
|
334
|
+
async findPayment(id) {
|
|
335
|
+
const out = await this.payments.findOnePayment({
|
|
336
|
+
id,
|
|
337
|
+
});
|
|
338
|
+
const payment = out.value;
|
|
339
|
+
if (payment === undefined) {
|
|
340
|
+
throw errResolveFailed({
|
|
341
|
+
resource: resourcePayment,
|
|
342
|
+
msg: msgPaymentMissing,
|
|
343
|
+
});
|
|
344
|
+
}
|
|
345
|
+
return payment;
|
|
346
|
+
}
|
|
347
|
+
async findPmtAccount(id) {
|
|
348
|
+
const out = await this.payments.findOnePmtAccount({
|
|
349
|
+
id,
|
|
350
|
+
});
|
|
351
|
+
const account = out.value;
|
|
352
|
+
if (account === undefined) {
|
|
353
|
+
throw errResolveFailed({
|
|
354
|
+
resource: resourcePmtAccount,
|
|
355
|
+
msg: msgPmtAccountMissing,
|
|
356
|
+
});
|
|
357
|
+
}
|
|
358
|
+
return account;
|
|
359
|
+
}
|
|
360
|
+
async findPmtBankAccount(id) {
|
|
361
|
+
const out = await this.payments.findOnePmtBankAccount({
|
|
362
|
+
id,
|
|
363
|
+
});
|
|
364
|
+
const account = out.value;
|
|
365
|
+
if (account === undefined) {
|
|
366
|
+
throw errResolveFailed({
|
|
367
|
+
resource: resourcePmtBankAccount,
|
|
368
|
+
msg: msgPmtBankAccountMissing,
|
|
369
|
+
});
|
|
370
|
+
}
|
|
371
|
+
return account;
|
|
372
|
+
}
|
|
373
|
+
async findPmtCard(id) {
|
|
374
|
+
const out = await this.payments.findOnePmtCard({
|
|
375
|
+
id,
|
|
376
|
+
});
|
|
377
|
+
const card = out.value;
|
|
378
|
+
if (card === undefined) {
|
|
379
|
+
throw errResolveFailed({
|
|
380
|
+
resource: resourcePmtCard,
|
|
381
|
+
msg: msgPmtCardMissing,
|
|
382
|
+
});
|
|
383
|
+
}
|
|
384
|
+
return card;
|
|
385
|
+
}
|
|
386
|
+
async findPmtRefund(id) {
|
|
387
|
+
const out = await this.payments.findOnePmtRefund({
|
|
388
|
+
id,
|
|
389
|
+
});
|
|
390
|
+
const refund = out.value;
|
|
391
|
+
if (refund === undefined) {
|
|
392
|
+
throw errResolveFailed({
|
|
393
|
+
resource: resourcePmtRefund,
|
|
394
|
+
msg: msgPmtRefundMissing,
|
|
395
|
+
});
|
|
396
|
+
}
|
|
397
|
+
return refund;
|
|
398
|
+
}
|
|
399
|
+
async findPmtCustomer(id) {
|
|
400
|
+
const out = await this.payments.findOnePmtCustomer({
|
|
401
|
+
id,
|
|
402
|
+
});
|
|
403
|
+
const customer = out.value;
|
|
404
|
+
if (customer === undefined) {
|
|
405
|
+
throw errResolveFailed({
|
|
406
|
+
resource: resourcePmtCustomer,
|
|
407
|
+
msg: msgPmtCustomerMissing,
|
|
408
|
+
});
|
|
409
|
+
}
|
|
410
|
+
return customer;
|
|
411
|
+
}
|
|
412
|
+
async findPmtPublicSession(id) {
|
|
413
|
+
const out = await this.payments.findOnePmtPublicSession({
|
|
414
|
+
id,
|
|
415
|
+
});
|
|
416
|
+
const session = out.value;
|
|
417
|
+
if (session === undefined) {
|
|
418
|
+
throw errResolveFailed({
|
|
419
|
+
resource: resourcePmtPublicSession,
|
|
420
|
+
msg: msgPmtPublicSessionMissing,
|
|
421
|
+
});
|
|
422
|
+
}
|
|
423
|
+
return session;
|
|
424
|
+
}
|
|
425
|
+
async findCreditLedgerEntry(id) {
|
|
426
|
+
const out = await this.payments.findOneCreditLedgerEntry({
|
|
427
|
+
id,
|
|
428
|
+
});
|
|
429
|
+
const entry = out.value;
|
|
430
|
+
if (entry === undefined) {
|
|
431
|
+
throw errResolveFailed({
|
|
432
|
+
resource: resourceCreditLedgerEntry,
|
|
433
|
+
msg: msgCreditLedgerEntryMissing,
|
|
434
|
+
});
|
|
435
|
+
}
|
|
436
|
+
return entry;
|
|
437
|
+
}
|
|
148
438
|
async openPublicPaymentSession(input) {
|
|
149
439
|
const out = await this.payments.openPmtPublicSession(input);
|
|
150
440
|
if (out === undefined) {
|
|
@@ -238,20 +528,6 @@ function publicSessionID(session) {
|
|
|
238
528
|
function operationID(out) {
|
|
239
529
|
return resolvedID(out.id);
|
|
240
530
|
}
|
|
241
|
-
function resolvedID(v) {
|
|
242
|
-
const out = resolvedValue(v);
|
|
243
|
-
if (out === undefined || out === ZeroID) {
|
|
244
|
-
return undefined;
|
|
245
|
-
}
|
|
246
|
-
return out;
|
|
247
|
-
}
|
|
248
|
-
function resolvedValue(v) {
|
|
249
|
-
const out = v?.trim();
|
|
250
|
-
if (out === undefined || out.length === 0) {
|
|
251
|
-
return undefined;
|
|
252
|
-
}
|
|
253
|
-
return out;
|
|
254
|
-
}
|
|
255
531
|
function zeroAppleIAP() {
|
|
256
532
|
return {
|
|
257
533
|
transaction_id: "",
|
|
@@ -1,9 +1,72 @@
|
|
|
1
1
|
import type { PayrollsOperator } from "@fabriktor/client";
|
|
2
|
+
import { type Payable, type Payroll, type PayConfig, type HourBank, type Adjustment, type AdjustmentFolder, type AdjustmentRecord, type AdjustmentAggregate, type EmployeePayConfig, type PayrollProgram } from "@fabriktor/schema";
|
|
3
|
+
import { type SearchPage } from "../core/search.js";
|
|
4
|
+
type PayableInsertOptions = Parameters<PayrollsOperator["insertOnePayable"]>[0];
|
|
5
|
+
type PayableReplaceOptions = Parameters<PayrollsOperator["replaceOnePayable"]>[0];
|
|
6
|
+
type PayrollInsertOptions = Parameters<PayrollsOperator["insertOnePayroll"]>[0];
|
|
7
|
+
type PayrollReplaceOptions = Parameters<PayrollsOperator["replaceOnePayroll"]>[0];
|
|
8
|
+
type PayConfigInsertOptions = Parameters<PayrollsOperator["insertOnePayConfig"]>[0];
|
|
9
|
+
type PayConfigReplaceOptions = Parameters<PayrollsOperator["replaceOnePayConfig"]>[0];
|
|
10
|
+
type HourBankInsertOptions = Parameters<PayrollsOperator["insertOneHourBank"]>[0];
|
|
11
|
+
type HourBankReplaceOptions = Parameters<PayrollsOperator["replaceOneHourBank"]>[0];
|
|
12
|
+
type AdjustmentInsertOptions = Parameters<PayrollsOperator["insertOneAdjustment"]>[0];
|
|
2
13
|
type AdjustmentReplaceOptions = Parameters<PayrollsOperator["replaceOneAdjustment"]>[0];
|
|
14
|
+
type AdjustmentFolderInsertOptions = Parameters<PayrollsOperator["insertOneAdjustmentFolder"]>[0];
|
|
3
15
|
type AdjustmentFolderReplaceOptions = Parameters<PayrollsOperator["replaceOneAdjustmentFolder"]>[0];
|
|
4
|
-
type
|
|
16
|
+
type AdjustmentRecordInsertOptions = Parameters<PayrollsOperator["insertOneAdjustmentRecord"]>[0];
|
|
17
|
+
type AdjustmentRecordReplaceOptions = Parameters<PayrollsOperator["replaceOneAdjustmentRecord"]>[0];
|
|
18
|
+
type AdjustmentAggregateInsertOptions = Parameters<PayrollsOperator["insertOneAdjustmentAggregate"]>[0];
|
|
19
|
+
type AdjustmentAggregateReplaceOptions = Parameters<PayrollsOperator["replaceOneAdjustmentAggregate"]>[0];
|
|
20
|
+
type EmployeePayConfigInsertOptions = Parameters<PayrollsOperator["insertOneEmployeePayConfig"]>[0];
|
|
5
21
|
type EmployeePayConfigReplaceOptions = Parameters<PayrollsOperator["replaceOneEmployeePayConfig"]>[0];
|
|
22
|
+
type PayrollProgramInsertOptions = Parameters<PayrollsOperator["insertOnePayrollProgram"]>[0];
|
|
6
23
|
type PayrollProgramReplaceOptions = Parameters<PayrollsOperator["replaceOnePayrollProgram"]>[0];
|
|
24
|
+
type SearchPayrollRecordsOptions = {
|
|
25
|
+
owner_id: string;
|
|
26
|
+
q?: string;
|
|
27
|
+
page?: number;
|
|
28
|
+
per_page?: number;
|
|
29
|
+
};
|
|
30
|
+
export type CreatePayableOptions = PayableInsertOptions;
|
|
31
|
+
export type ReplacePayableOptions = PayableReplaceOptions;
|
|
32
|
+
export type SearchPayablesOptions = SearchPayrollRecordsOptions;
|
|
33
|
+
export type SearchPayablesPage = SearchPage<Payable>;
|
|
34
|
+
export type CreatePayrollOptions = PayrollInsertOptions;
|
|
35
|
+
export type ReplacePayrollOptions = PayrollReplaceOptions;
|
|
36
|
+
export type SearchPayrollsOptions = SearchPayrollRecordsOptions;
|
|
37
|
+
export type SearchPayrollsPage = SearchPage<Payroll>;
|
|
38
|
+
export type CreatePayConfigOptions = PayConfigInsertOptions;
|
|
39
|
+
export type ReplacePayConfigOptions = PayConfigReplaceOptions;
|
|
40
|
+
export type SearchPayConfigsOptions = SearchPayrollRecordsOptions;
|
|
41
|
+
export type SearchPayConfigsPage = SearchPage<PayConfig>;
|
|
42
|
+
export type CreateHourBankOptions = HourBankInsertOptions;
|
|
43
|
+
export type ReplaceHourBankOptions = HourBankReplaceOptions;
|
|
44
|
+
export type SearchHourBanksOptions = SearchPayrollRecordsOptions;
|
|
45
|
+
export type SearchHourBanksPage = SearchPage<HourBank>;
|
|
46
|
+
export type CreateAdjustmentOptions = AdjustmentInsertOptions;
|
|
47
|
+
export type ReplaceAdjustmentOptions = AdjustmentReplaceOptions;
|
|
48
|
+
export type SearchAdjustmentsOptions = SearchPayrollRecordsOptions;
|
|
49
|
+
export type SearchAdjustmentsPage = SearchPage<Adjustment>;
|
|
50
|
+
export type CreateAdjustmentFolderOptions = AdjustmentFolderInsertOptions;
|
|
51
|
+
export type ReplaceAdjustmentFolderOptions = AdjustmentFolderReplaceOptions;
|
|
52
|
+
export type SearchAdjustmentFoldersOptions = SearchPayrollRecordsOptions;
|
|
53
|
+
export type SearchAdjustmentFoldersPage = SearchPage<AdjustmentFolder>;
|
|
54
|
+
export type CreateAdjustmentRecordOptions = AdjustmentRecordInsertOptions;
|
|
55
|
+
export type ReplaceAdjustmentRecordOptions = AdjustmentRecordReplaceOptions;
|
|
56
|
+
export type SearchAdjustmentRecordsOptions = SearchPayrollRecordsOptions;
|
|
57
|
+
export type SearchAdjustmentRecordsPage = SearchPage<AdjustmentRecord>;
|
|
58
|
+
export type CreateAdjustmentAggregateOptions = AdjustmentAggregateInsertOptions;
|
|
59
|
+
export type ReplaceAdjustmentAggregateOptions = AdjustmentAggregateReplaceOptions;
|
|
60
|
+
export type SearchAdjustmentAggregatesOptions = SearchPayrollRecordsOptions;
|
|
61
|
+
export type SearchAdjustmentAggregatesPage = SearchPage<AdjustmentAggregate>;
|
|
62
|
+
export type CreateEmployeePayConfigOptions = EmployeePayConfigInsertOptions;
|
|
63
|
+
export type ReplaceEmployeePayConfigOptions = EmployeePayConfigReplaceOptions;
|
|
64
|
+
export type SearchEmployeePayConfigsOptions = SearchPayrollRecordsOptions;
|
|
65
|
+
export type SearchEmployeePayConfigsPage = SearchPage<EmployeePayConfig>;
|
|
66
|
+
export type CreatePayrollProgramOptions = PayrollProgramInsertOptions;
|
|
67
|
+
export type ReplacePayrollProgramOptions = PayrollProgramReplaceOptions;
|
|
68
|
+
export type SearchPayrollProgramsOptions = SearchPayrollRecordsOptions;
|
|
69
|
+
export type SearchPayrollProgramsPage = SearchPage<PayrollProgram>;
|
|
7
70
|
export type SetAdjustmentArchivedOptions = {
|
|
8
71
|
id: AdjustmentReplaceOptions["id"];
|
|
9
72
|
is_archived: NonNullable<AdjustmentReplaceOptions["in"]["is_archived"]>;
|
|
@@ -33,6 +96,36 @@ export type PayrollsFXOptions = {
|
|
|
33
96
|
payrolls: PayrollsOperator;
|
|
34
97
|
};
|
|
35
98
|
export interface PayrollsFXOperator {
|
|
99
|
+
createPayable(opts: CreatePayableOptions): Promise<Payable>;
|
|
100
|
+
replacePayable(opts: ReplacePayableOptions): Promise<Payable>;
|
|
101
|
+
searchPayables(opts: SearchPayablesOptions): Promise<SearchPayablesPage>;
|
|
102
|
+
createPayroll(opts: CreatePayrollOptions): Promise<Payroll>;
|
|
103
|
+
replacePayroll(opts: ReplacePayrollOptions): Promise<Payroll>;
|
|
104
|
+
searchPayrolls(opts: SearchPayrollsOptions): Promise<SearchPayrollsPage>;
|
|
105
|
+
createPayConfig(opts: CreatePayConfigOptions): Promise<PayConfig>;
|
|
106
|
+
replacePayConfig(opts: ReplacePayConfigOptions): Promise<PayConfig>;
|
|
107
|
+
searchPayConfigs(opts: SearchPayConfigsOptions): Promise<SearchPayConfigsPage>;
|
|
108
|
+
createHourBank(opts: CreateHourBankOptions): Promise<HourBank>;
|
|
109
|
+
replaceHourBank(opts: ReplaceHourBankOptions): Promise<HourBank>;
|
|
110
|
+
searchHourBanks(opts: SearchHourBanksOptions): Promise<SearchHourBanksPage>;
|
|
111
|
+
createAdjustment(opts: CreateAdjustmentOptions): Promise<Adjustment>;
|
|
112
|
+
replaceAdjustment(opts: ReplaceAdjustmentOptions): Promise<Adjustment>;
|
|
113
|
+
searchAdjustments(opts: SearchAdjustmentsOptions): Promise<SearchAdjustmentsPage>;
|
|
114
|
+
createAdjustmentFolder(opts: CreateAdjustmentFolderOptions): Promise<AdjustmentFolder>;
|
|
115
|
+
replaceAdjustmentFolder(opts: ReplaceAdjustmentFolderOptions): Promise<AdjustmentFolder>;
|
|
116
|
+
searchAdjustmentFolders(opts: SearchAdjustmentFoldersOptions): Promise<SearchAdjustmentFoldersPage>;
|
|
117
|
+
createAdjustmentRecord(opts: CreateAdjustmentRecordOptions): Promise<AdjustmentRecord>;
|
|
118
|
+
replaceAdjustmentRecord(opts: ReplaceAdjustmentRecordOptions): Promise<AdjustmentRecord>;
|
|
119
|
+
searchAdjustmentRecords(opts: SearchAdjustmentRecordsOptions): Promise<SearchAdjustmentRecordsPage>;
|
|
120
|
+
createAdjustmentAggregate(opts: CreateAdjustmentAggregateOptions): Promise<AdjustmentAggregate>;
|
|
121
|
+
replaceAdjustmentAggregate(opts: ReplaceAdjustmentAggregateOptions): Promise<AdjustmentAggregate>;
|
|
122
|
+
searchAdjustmentAggregates(opts: SearchAdjustmentAggregatesOptions): Promise<SearchAdjustmentAggregatesPage>;
|
|
123
|
+
createEmployeePayConfig(opts: CreateEmployeePayConfigOptions): Promise<EmployeePayConfig>;
|
|
124
|
+
replaceEmployeePayConfig(opts: ReplaceEmployeePayConfigOptions): Promise<EmployeePayConfig>;
|
|
125
|
+
searchEmployeePayConfigs(opts: SearchEmployeePayConfigsOptions): Promise<SearchEmployeePayConfigsPage>;
|
|
126
|
+
createPayrollProgram(opts: CreatePayrollProgramOptions): Promise<PayrollProgram>;
|
|
127
|
+
replacePayrollProgram(opts: ReplacePayrollProgramOptions): Promise<PayrollProgram>;
|
|
128
|
+
searchPayrollPrograms(opts: SearchPayrollProgramsOptions): Promise<SearchPayrollProgramsPage>;
|
|
36
129
|
setAdjustmentArchived(opts: SetAdjustmentArchivedOptions): Promise<SetAdjustmentArchivedResult>;
|
|
37
130
|
setAdjustmentFolderArchived(opts: SetAdjustmentFolderArchivedOptions): Promise<SetAdjustmentFolderArchivedResult>;
|
|
38
131
|
setPayConfigArchived(opts: SetPayConfigArchivedOptions): Promise<SetPayConfigArchivedResult>;
|
|
@@ -42,11 +135,51 @@ export interface PayrollsFXOperator {
|
|
|
42
135
|
export declare class PayrollsFX implements PayrollsFXOperator {
|
|
43
136
|
private payrolls;
|
|
44
137
|
constructor(opts: PayrollsFXOptions);
|
|
138
|
+
createPayable(opts: CreatePayableOptions): Promise<Payable>;
|
|
139
|
+
replacePayable(opts: ReplacePayableOptions): Promise<Payable>;
|
|
140
|
+
searchPayables(opts: SearchPayablesOptions): Promise<SearchPayablesPage>;
|
|
141
|
+
createPayroll(opts: CreatePayrollOptions): Promise<Payroll>;
|
|
142
|
+
replacePayroll(opts: ReplacePayrollOptions): Promise<Payroll>;
|
|
143
|
+
searchPayrolls(opts: SearchPayrollsOptions): Promise<SearchPayrollsPage>;
|
|
144
|
+
createPayConfig(opts: CreatePayConfigOptions): Promise<PayConfig>;
|
|
145
|
+
replacePayConfig(opts: ReplacePayConfigOptions): Promise<PayConfig>;
|
|
146
|
+
searchPayConfigs(opts: SearchPayConfigsOptions): Promise<SearchPayConfigsPage>;
|
|
147
|
+
createHourBank(opts: CreateHourBankOptions): Promise<HourBank>;
|
|
148
|
+
replaceHourBank(opts: ReplaceHourBankOptions): Promise<HourBank>;
|
|
149
|
+
searchHourBanks(opts: SearchHourBanksOptions): Promise<SearchHourBanksPage>;
|
|
150
|
+
createAdjustment(opts: CreateAdjustmentOptions): Promise<Adjustment>;
|
|
151
|
+
replaceAdjustment(opts: ReplaceAdjustmentOptions): Promise<Adjustment>;
|
|
152
|
+
searchAdjustments(opts: SearchAdjustmentsOptions): Promise<SearchAdjustmentsPage>;
|
|
153
|
+
createAdjustmentFolder(opts: CreateAdjustmentFolderOptions): Promise<AdjustmentFolder>;
|
|
154
|
+
replaceAdjustmentFolder(opts: ReplaceAdjustmentFolderOptions): Promise<AdjustmentFolder>;
|
|
155
|
+
searchAdjustmentFolders(opts: SearchAdjustmentFoldersOptions): Promise<SearchAdjustmentFoldersPage>;
|
|
156
|
+
createAdjustmentRecord(opts: CreateAdjustmentRecordOptions): Promise<AdjustmentRecord>;
|
|
157
|
+
replaceAdjustmentRecord(opts: ReplaceAdjustmentRecordOptions): Promise<AdjustmentRecord>;
|
|
158
|
+
searchAdjustmentRecords(opts: SearchAdjustmentRecordsOptions): Promise<SearchAdjustmentRecordsPage>;
|
|
159
|
+
createAdjustmentAggregate(opts: CreateAdjustmentAggregateOptions): Promise<AdjustmentAggregate>;
|
|
160
|
+
replaceAdjustmentAggregate(opts: ReplaceAdjustmentAggregateOptions): Promise<AdjustmentAggregate>;
|
|
161
|
+
searchAdjustmentAggregates(opts: SearchAdjustmentAggregatesOptions): Promise<SearchAdjustmentAggregatesPage>;
|
|
162
|
+
createEmployeePayConfig(opts: CreateEmployeePayConfigOptions): Promise<EmployeePayConfig>;
|
|
163
|
+
replaceEmployeePayConfig(opts: ReplaceEmployeePayConfigOptions): Promise<EmployeePayConfig>;
|
|
164
|
+
searchEmployeePayConfigs(opts: SearchEmployeePayConfigsOptions): Promise<SearchEmployeePayConfigsPage>;
|
|
165
|
+
createPayrollProgram(opts: CreatePayrollProgramOptions): Promise<PayrollProgram>;
|
|
166
|
+
replacePayrollProgram(opts: ReplacePayrollProgramOptions): Promise<PayrollProgram>;
|
|
167
|
+
searchPayrollPrograms(opts: SearchPayrollProgramsOptions): Promise<SearchPayrollProgramsPage>;
|
|
45
168
|
setAdjustmentArchived(opts: SetAdjustmentArchivedOptions): Promise<SetAdjustmentArchivedResult>;
|
|
46
169
|
setAdjustmentFolderArchived(opts: SetAdjustmentFolderArchivedOptions): Promise<SetAdjustmentFolderArchivedResult>;
|
|
47
170
|
setPayConfigArchived(opts: SetPayConfigArchivedOptions): Promise<SetPayConfigArchivedResult>;
|
|
48
171
|
setEmployeePayConfigArchived(opts: SetEmployeePayConfigArchivedOptions): Promise<SetEmployeePayConfigArchivedResult>;
|
|
49
172
|
setPayrollProgramEnabled(opts: SetPayrollProgramEnabledOptions): Promise<SetPayrollProgramEnabledResult>;
|
|
173
|
+
private findPayable;
|
|
174
|
+
private findPayroll;
|
|
175
|
+
private findPayConfig;
|
|
176
|
+
private findHourBank;
|
|
177
|
+
private findAdjustment;
|
|
178
|
+
private findAdjustmentFolder;
|
|
179
|
+
private findAdjustmentRecord;
|
|
180
|
+
private findAdjustmentAggregate;
|
|
181
|
+
private findEmployeePayConfig;
|
|
182
|
+
private findPayrollProgram;
|
|
50
183
|
}
|
|
51
184
|
export declare function newPayrollsFX(opts: PayrollsFXOptions): PayrollsFX;
|
|
52
185
|
export {};
|