@bitcredit/bcr-ebill-wasm 0.4.2 → 0.4.4
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/index.d.ts +45 -35
- package/index.js +131 -47
- package/index_bg.wasm +0 -0
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -193,16 +193,6 @@ export interface PastPaymentDataRecourseWeb {
|
|
|
193
193
|
status: PastPaymentStatusWeb;
|
|
194
194
|
}
|
|
195
195
|
|
|
196
|
-
export interface BitcreditEbillQuote {
|
|
197
|
-
bill_id: string;
|
|
198
|
-
quote_id: string;
|
|
199
|
-
sum: number;
|
|
200
|
-
mint_node_id: string;
|
|
201
|
-
mint_url: string;
|
|
202
|
-
accepted: boolean;
|
|
203
|
-
token: string;
|
|
204
|
-
}
|
|
205
|
-
|
|
206
196
|
export interface BitcreditBillWeb {
|
|
207
197
|
id: string;
|
|
208
198
|
participants: BillParticipantsWeb;
|
|
@@ -213,37 +203,34 @@ export interface BitcreditBillWeb {
|
|
|
213
203
|
|
|
214
204
|
export type BillCurrentWaitingStateWeb = { Sell: BillWaitingForSellStateWeb } | { Payment: BillWaitingForPaymentStateWeb } | { Recourse: BillWaitingForRecourseStateWeb };
|
|
215
205
|
|
|
216
|
-
export interface
|
|
206
|
+
export interface BillWaitingStatePaymentDataWeb {
|
|
217
207
|
time_of_request: number;
|
|
218
|
-
buyer: BillParticipantWeb;
|
|
219
|
-
seller: BillParticipantWeb;
|
|
220
208
|
currency: string;
|
|
221
209
|
sum: string;
|
|
222
210
|
link_to_pay: string;
|
|
223
211
|
address_to_pay: string;
|
|
224
212
|
mempool_link_for_address_to_pay: string;
|
|
213
|
+
tx_id: string | undefined;
|
|
214
|
+
in_mempool: boolean;
|
|
215
|
+
confirmations: number;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
export interface BillWaitingForSellStateWeb {
|
|
219
|
+
buyer: BillParticipantWeb;
|
|
220
|
+
seller: BillParticipantWeb;
|
|
221
|
+
payment_data: BillWaitingStatePaymentDataWeb;
|
|
225
222
|
}
|
|
226
223
|
|
|
227
224
|
export interface BillWaitingForPaymentStateWeb {
|
|
228
|
-
time_of_request: number;
|
|
229
225
|
payer: BillIdentParticipantWeb;
|
|
230
226
|
payee: BillParticipantWeb;
|
|
231
|
-
|
|
232
|
-
sum: string;
|
|
233
|
-
link_to_pay: string;
|
|
234
|
-
address_to_pay: string;
|
|
235
|
-
mempool_link_for_address_to_pay: string;
|
|
227
|
+
payment_data: BillWaitingStatePaymentDataWeb;
|
|
236
228
|
}
|
|
237
229
|
|
|
238
230
|
export interface BillWaitingForRecourseStateWeb {
|
|
239
|
-
time_of_request: number;
|
|
240
231
|
recourser: BillIdentParticipantWeb;
|
|
241
232
|
recoursee: BillIdentParticipantWeb;
|
|
242
|
-
|
|
243
|
-
sum: string;
|
|
244
|
-
link_to_pay: string;
|
|
245
|
-
address_to_pay: string;
|
|
246
|
-
mempool_link_for_address_to_pay: string;
|
|
233
|
+
payment_data: BillWaitingStatePaymentDataWeb;
|
|
247
234
|
}
|
|
248
235
|
|
|
249
236
|
export interface BillStatusWeb {
|
|
@@ -355,7 +342,7 @@ export interface LightBillIdentParticipantWithAddressWeb {
|
|
|
355
342
|
postal_address: PostalAddressWeb;
|
|
356
343
|
}
|
|
357
344
|
|
|
358
|
-
export type LightBillParticipantWeb = { Anon: LightBillAnonParticipantWeb } | { Ident:
|
|
345
|
+
export type LightBillParticipantWeb = { Anon: LightBillAnonParticipantWeb } | { Ident: LightBillIdentParticipantWithAddressWeb };
|
|
359
346
|
|
|
360
347
|
export interface LightBillAnonParticipantWeb {
|
|
361
348
|
node_id: string;
|
|
@@ -529,6 +516,11 @@ export interface SeedPhrase {
|
|
|
529
516
|
seed_phrase: string;
|
|
530
517
|
}
|
|
531
518
|
|
|
519
|
+
export interface NotificationStatusWeb {
|
|
520
|
+
node_id: string;
|
|
521
|
+
active: boolean;
|
|
522
|
+
}
|
|
523
|
+
|
|
532
524
|
export interface NotificationWeb {
|
|
533
525
|
id: string;
|
|
534
526
|
node_id: string;
|
|
@@ -623,6 +615,12 @@ export interface BinaryFileResponse {
|
|
|
623
615
|
content_type: string;
|
|
624
616
|
}
|
|
625
617
|
|
|
618
|
+
export interface Base64FileResponse {
|
|
619
|
+
data: string;
|
|
620
|
+
name: string;
|
|
621
|
+
content_type: string;
|
|
622
|
+
}
|
|
623
|
+
|
|
626
624
|
export interface UploadFile {
|
|
627
625
|
data: number[];
|
|
628
626
|
extension: string | undefined;
|
|
@@ -633,7 +631,7 @@ export interface UploadFileResponse {
|
|
|
633
631
|
file_upload_id: string;
|
|
634
632
|
}
|
|
635
633
|
|
|
636
|
-
export type JsErrorType = "FieldEmpty" | "InvalidSum" | "InvalidCurrency" | "InvalidPaymentAddress" | "InvalidContentType" | "IdentityCantBeAnon" | "IdentityIsNotBillIssuer" | "InvalidContactType" | "InvalidIdentityType" | "InvalidDate" | "SelfDraftedBillCantBeBlank" | "RequestToMintForBillAndMintAlreadyActive" | "SignerCantBeAnon" | "ContactIsAnonymous" | "InvalidContact" | "InvalidMint" | "IssueDateAfterMaturityDate" | "MaturityDateInThePast" | "InvalidFileUploadId" | "InvalidNodeId" | "InvalidBillId" | "InvalidBillType" | "DraweeCantBePayee" | "EndorserCantBeEndorsee" | "BuyerCantBeSeller" | "RecourserCantBeRecoursee" | "DraweeNotInContacts" | "PayeeNotInContacts" | "MintNotInContacts" | "BuyerNotInContacts" | "EndorseeNotInContacts" | "RecourseeNotInContacts" | "CancelMintRequestNotPending" | "RejectMintRequestNotOffered" | "AcceptMintRequestNotOffered" | "AcceptMintOfferExpired" | "NoFileForFileUploadId" | "NotFound" | "ExternalApi" | "Io" | "Crypto" | "Persistence" | "Blockchain" | "Serialization" | "Init" | "NotificationNetwork" | "NotificationMessage" | "InvalidOperation" | "BillAlreadyAccepted" | "BillWasRejectedToAccept" | "BillAcceptanceExpired" | "BillWasRejectedToPay" | "BillPaymentExpired" | "BillWasRejectedToRecourse" | "BillRequestToRecourseExpired" | "BillWasRecoursedToTheEnd" | "BillAlreadyRequestedToAccept" | "BillNotAccepted" | "CallerIsNotDrawee" | "CallerIsNotHolder" | "CallerIsNotRecoursee" | "CallerIsNotBuyer" | "RequestAlreadyExpired" | "RequestAlreadyRejected" | "BillAlreadyPaid" | "BillWasNotRequestedToAccept" | "BillWasNotRequestedToPay" | "BillWasNotOfferedToSell" | "BillRequestToAcceptDidNotExpireAndWasNotRejected" | "BillRequestToPayDidNotExpireAndWasNotRejected" | "RecourseeNotPastHolder" | "BillWasNotRequestedToRecourse" | "BillIsNotRequestedToRecourseAndWaitingForPayment" | "BillIsNotOfferToSellWaitingForPayment" | "BillSellDataInvalid" | "BillRecourseDataInvalid" | "BillIsRequestedToPayAndWaitingForPayment" | "BillIsOfferedToSellAndWaitingForPayment" | "BillIsInRecourseAndWaitingForPayment" | "BillWasRequestedToPay" | "DrawerIsNotBillIssuer" | "SignatoryNotInContacts" | "SignatoryAlreadySignatory" | "CantRemoveLastSignatory" | "NotASignatory" | "InvalidSecp256k1Key" | "FileIsTooBig" | "InvalidFileName" | "UnknownNodeId" | "BackupNotSupported" | "CallerMustBeSignatory";
|
|
634
|
+
export type JsErrorType = "FieldEmpty" | "InvalidSum" | "InvalidCurrency" | "InvalidPaymentAddress" | "InvalidContentType" | "IdentityCantBeAnon" | "IdentityIsNotBillIssuer" | "InvalidContactType" | "InvalidIdentityType" | "InvalidDate" | "SelfDraftedBillCantBeBlank" | "RequestToMintForBillAndMintAlreadyActive" | "SignerCantBeAnon" | "ContactIsAnonymous" | "InvalidContact" | "InvalidMint" | "IssueDateAfterMaturityDate" | "MaturityDateInThePast" | "InvalidFileUploadId" | "InvalidNodeId" | "InvalidBillId" | "InvalidBillType" | "DraweeCantBePayee" | "EndorserCantBeEndorsee" | "BuyerCantBeSeller" | "RecourserCantBeRecoursee" | "DraweeNotInContacts" | "PayeeNotInContacts" | "MintNotInContacts" | "BuyerNotInContacts" | "EndorseeNotInContacts" | "RecourseeNotInContacts" | "CancelMintRequestNotPending" | "RejectMintRequestNotOffered" | "AcceptMintRequestNotOffered" | "AcceptMintOfferExpired" | "NoFileForFileUploadId" | "NotFound" | "ExternalApi" | "Io" | "Crypto" | "Persistence" | "Blockchain" | "Serialization" | "Init" | "NotificationNetwork" | "NotificationMessage" | "InvalidOperation" | "BillAlreadyAccepted" | "BillWasRejectedToAccept" | "BillAcceptanceExpired" | "BillWasRejectedToPay" | "BillPaymentExpired" | "BillWasRejectedToRecourse" | "BillRequestToRecourseExpired" | "BillWasRecoursedToTheEnd" | "BillAlreadyRequestedToAccept" | "BillNotAccepted" | "CallerIsNotDrawee" | "CallerIsNotHolder" | "CallerIsNotRecoursee" | "CallerIsNotBuyer" | "RequestAlreadyExpired" | "RequestAlreadyRejected" | "BillAlreadyPaid" | "BillWasNotRequestedToAccept" | "BillWasNotRequestedToPay" | "BillWasNotOfferedToSell" | "BillRequestToAcceptDidNotExpireAndWasNotRejected" | "BillRequestToPayDidNotExpireAndWasNotRejected" | "RecourseeNotPastHolder" | "BillWasNotRequestedToRecourse" | "BillIsNotRequestedToRecourseAndWaitingForPayment" | "BillIsNotOfferToSellWaitingForPayment" | "BillSellDataInvalid" | "BillRecourseDataInvalid" | "BillIsRequestedToPayAndWaitingForPayment" | "BillIsOfferedToSellAndWaitingForPayment" | "BillIsInRecourseAndWaitingForPayment" | "BillWasRequestedToPay" | "DrawerIsNotBillIssuer" | "SignatoryNotInContacts" | "SignatoryAlreadySignatory" | "CantRemoveLastSignatory" | "NotASignatory" | "InvalidSecp256k1Key" | "FileIsTooBig" | "FileIsEmpty" | "TooManyFiles" | "InvalidFileName" | "UnknownNodeId" | "BackupNotSupported" | "CallerMustBeSignatory";
|
|
637
635
|
|
|
638
636
|
export interface JsErrorData {
|
|
639
637
|
error: JsErrorType;
|
|
@@ -651,6 +649,7 @@ export interface Config {
|
|
|
651
649
|
job_runner_check_interval_seconds: number;
|
|
652
650
|
default_mint_url: string;
|
|
653
651
|
default_mint_node_id: string;
|
|
652
|
+
num_confirmations_for_payment: number;
|
|
654
653
|
}
|
|
655
654
|
|
|
656
655
|
export interface MintRequestStateWeb {
|
|
@@ -701,6 +700,7 @@ export class Bill {
|
|
|
701
700
|
past_endorsees(id: string): Promise<PastEndorseesResponse>;
|
|
702
701
|
bitcoin_key(id: string): Promise<BillCombinedBitcoinKeyWeb>;
|
|
703
702
|
attachment(bill_id: string, file_name: string): Promise<BinaryFileResponse>;
|
|
703
|
+
attachment_base64(bill_id: string, file_name: string): Promise<Base64FileResponse>;
|
|
704
704
|
upload(payload: UploadFile): Promise<UploadFileResponse>;
|
|
705
705
|
search(payload: BillsSearchFilterPayload): Promise<LightBillsResponse>;
|
|
706
706
|
list_light(): Promise<LightBillsResponse>;
|
|
@@ -743,6 +743,7 @@ export class Company {
|
|
|
743
743
|
free(): void;
|
|
744
744
|
static new(): Company;
|
|
745
745
|
file(id: string, file_name: string): Promise<BinaryFileResponse>;
|
|
746
|
+
file_base64(id: string, file_name: string): Promise<Base64FileResponse>;
|
|
746
747
|
upload(payload: UploadFile): Promise<UploadFileResponse>;
|
|
747
748
|
list(): Promise<CompaniesResponse>;
|
|
748
749
|
list_signatories(id: string): Promise<ListSignatoriesResponse>;
|
|
@@ -757,6 +758,7 @@ export class Contact {
|
|
|
757
758
|
free(): void;
|
|
758
759
|
static new(): Contact;
|
|
759
760
|
file(node_id: string, file_name: string): Promise<BinaryFileResponse>;
|
|
761
|
+
file_base64(node_id: string, file_name: string): Promise<Base64FileResponse>;
|
|
760
762
|
upload(payload: UploadFile): Promise<UploadFileResponse>;
|
|
761
763
|
list(): Promise<ContactsResponse>;
|
|
762
764
|
detail(node_id: string): Promise<ContactWeb>;
|
|
@@ -780,6 +782,7 @@ export class Identity {
|
|
|
780
782
|
free(): void;
|
|
781
783
|
static new(): Identity;
|
|
782
784
|
file(file_name: string): Promise<BinaryFileResponse>;
|
|
785
|
+
file_base64(file_name: string): Promise<Base64FileResponse>;
|
|
783
786
|
upload(payload: UploadFile): Promise<UploadFileResponse>;
|
|
784
787
|
detail(): Promise<IdentityWeb>;
|
|
785
788
|
deanonymize(payload: NewIdentityPayload): Promise<IdentityWeb>;
|
|
@@ -794,6 +797,7 @@ export class Notification {
|
|
|
794
797
|
private constructor();
|
|
795
798
|
free(): void;
|
|
796
799
|
static new(): Notification;
|
|
800
|
+
active_notifications_for_node_ids(node_ids: Vec<String>): Promise<NotificationStatusWeb[]>;
|
|
797
801
|
subscribe(callback: Function): Promise<void>;
|
|
798
802
|
list(filters: NotificationFilters): Promise<NotificationWeb[]>;
|
|
799
803
|
mark_as_done(notification_id: string): Promise<void>;
|
|
@@ -809,6 +813,7 @@ export interface InitOutput {
|
|
|
809
813
|
readonly bill_past_endorsees: (a: number, b: number, c: number) => any;
|
|
810
814
|
readonly bill_bitcoin_key: (a: number, b: number, c: number) => any;
|
|
811
815
|
readonly bill_attachment: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
816
|
+
readonly bill_attachment_base64: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
812
817
|
readonly bill_upload: (a: number, b: any) => any;
|
|
813
818
|
readonly bill_search: (a: number, b: any) => any;
|
|
814
819
|
readonly bill_list_light: (a: number) => any;
|
|
@@ -840,6 +845,7 @@ export interface InitOutput {
|
|
|
840
845
|
readonly bill_request_to_recourse_bill_acceptance: (a: number, b: any) => any;
|
|
841
846
|
readonly bill_clear_bill_cache: (a: number) => any;
|
|
842
847
|
readonly company_file: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
848
|
+
readonly company_file_base64: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
843
849
|
readonly company_upload: (a: number, b: any) => any;
|
|
844
850
|
readonly company_list: (a: number) => any;
|
|
845
851
|
readonly company_list_signatories: (a: number, b: number, c: number) => any;
|
|
@@ -849,6 +855,7 @@ export interface InitOutput {
|
|
|
849
855
|
readonly company_add_signatory: (a: number, b: any) => any;
|
|
850
856
|
readonly company_remove_signatory: (a: number, b: any) => any;
|
|
851
857
|
readonly contact_file: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
858
|
+
readonly contact_file_base64: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
852
859
|
readonly contact_upload: (a: number, b: any) => any;
|
|
853
860
|
readonly contact_list: (a: number) => any;
|
|
854
861
|
readonly contact_detail: (a: number, b: number, c: number) => any;
|
|
@@ -862,6 +869,7 @@ export interface InitOutput {
|
|
|
862
869
|
readonly general_overview: (a: number, b: number, c: number) => any;
|
|
863
870
|
readonly general_search: (a: number, b: any) => any;
|
|
864
871
|
readonly identity_file: (a: number, b: number, c: number) => any;
|
|
872
|
+
readonly identity_file_base64: (a: number, b: number, c: number) => any;
|
|
865
873
|
readonly identity_upload: (a: number, b: any) => any;
|
|
866
874
|
readonly identity_detail: (a: number) => any;
|
|
867
875
|
readonly identity_deanonymize: (a: number, b: any) => any;
|
|
@@ -871,6 +879,7 @@ export interface InitOutput {
|
|
|
871
879
|
readonly identity_switch: (a: number, b: any) => any;
|
|
872
880
|
readonly identity_seed_backup: (a: number) => any;
|
|
873
881
|
readonly identity_seed_recover: (a: number, b: any) => any;
|
|
882
|
+
readonly notification_active_notifications_for_node_ids: (a: number, b: any) => any;
|
|
874
883
|
readonly notification_subscribe: (a: number, b: any) => any;
|
|
875
884
|
readonly notification_list: (a: number, b: any) => any;
|
|
876
885
|
readonly notification_mark_as_done: (a: number, b: number, c: number) => any;
|
|
@@ -895,12 +904,12 @@ export interface InitOutput {
|
|
|
895
904
|
readonly api_notification: () => number;
|
|
896
905
|
readonly api_contact: () => number;
|
|
897
906
|
readonly api_company: () => number;
|
|
898
|
-
readonly __wbg_identity_free: (a: number, b: number) => void;
|
|
899
|
-
readonly __wbg_notification_free: (a: number, b: number) => void;
|
|
900
|
-
readonly __wbg_general_free: (a: number, b: number) => void;
|
|
901
|
-
readonly __wbg_contact_free: (a: number, b: number) => void;
|
|
902
907
|
readonly __wbg_company_free: (a: number, b: number) => void;
|
|
908
|
+
readonly __wbg_general_free: (a: number, b: number) => void;
|
|
903
909
|
readonly __wbg_bill_free: (a: number, b: number) => void;
|
|
910
|
+
readonly __wbg_notification_free: (a: number, b: number) => void;
|
|
911
|
+
readonly __wbg_contact_free: (a: number, b: number) => void;
|
|
912
|
+
readonly __wbg_identity_free: (a: number, b: number) => void;
|
|
904
913
|
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
905
914
|
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
906
915
|
readonly __wbindgen_exn_store: (a: number) => void;
|
|
@@ -909,10 +918,11 @@ export interface InitOutput {
|
|
|
909
918
|
readonly __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
910
919
|
readonly __wbindgen_export_6: WebAssembly.Table;
|
|
911
920
|
readonly __externref_table_dealloc: (a: number) => void;
|
|
912
|
-
readonly
|
|
913
|
-
readonly
|
|
914
|
-
readonly
|
|
915
|
-
readonly
|
|
921
|
+
readonly _dyn_core__ops__function__Fn_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hcdc569c6fce875f5: (a: number, b: number) => void;
|
|
922
|
+
readonly closure336_externref_shim: (a: number, b: number, c: any) => void;
|
|
923
|
+
readonly _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h05d8c0db83408407: (a: number, b: number) => void;
|
|
924
|
+
readonly closure843_externref_shim_multivalue_shim: (a: number, b: number, c: any) => [number, number];
|
|
925
|
+
readonly closure626_externref_shim: (a: number, b: number, c: any, d: any) => void;
|
|
916
926
|
readonly __wbindgen_start: () => void;
|
|
917
927
|
}
|
|
918
928
|
|
package/index.js
CHANGED
|
@@ -138,6 +138,28 @@ function makeMutClosure(arg0, arg1, dtor, f) {
|
|
|
138
138
|
return real;
|
|
139
139
|
}
|
|
140
140
|
|
|
141
|
+
function makeClosure(arg0, arg1, dtor, f) {
|
|
142
|
+
const state = { a: arg0, b: arg1, cnt: 1, dtor };
|
|
143
|
+
const real = (...args) => {
|
|
144
|
+
// First up with a closure we increment the internal reference
|
|
145
|
+
// count. This ensures that the Rust closure environment won't
|
|
146
|
+
// be deallocated while we're invoking it.
|
|
147
|
+
state.cnt++;
|
|
148
|
+
try {
|
|
149
|
+
return f(state.a, state.b, ...args);
|
|
150
|
+
} finally {
|
|
151
|
+
if (--state.cnt === 0) {
|
|
152
|
+
wasm.__wbindgen_export_6.get(state.dtor)(state.a, state.b);
|
|
153
|
+
state.a = 0;
|
|
154
|
+
CLOSURE_DTORS.unregister(state);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
};
|
|
158
|
+
real.original = state;
|
|
159
|
+
CLOSURE_DTORS.register(real, state, state);
|
|
160
|
+
return real;
|
|
161
|
+
}
|
|
162
|
+
|
|
141
163
|
function debugString(val) {
|
|
142
164
|
// primitive types
|
|
143
165
|
const type = typeof val;
|
|
@@ -228,22 +250,26 @@ export function task_worker_entry_point(ptr) {
|
|
|
228
250
|
}
|
|
229
251
|
|
|
230
252
|
function __wbg_adapter_54(arg0, arg1) {
|
|
231
|
-
wasm.
|
|
253
|
+
wasm._dyn_core__ops__function__Fn_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hcdc569c6fce875f5(arg0, arg1);
|
|
232
254
|
}
|
|
233
255
|
|
|
234
256
|
function __wbg_adapter_57(arg0, arg1, arg2) {
|
|
235
|
-
wasm.
|
|
257
|
+
wasm.closure336_externref_shim(arg0, arg1, arg2);
|
|
236
258
|
}
|
|
237
259
|
|
|
238
|
-
function
|
|
239
|
-
|
|
260
|
+
function __wbg_adapter_60(arg0, arg1) {
|
|
261
|
+
wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h05d8c0db83408407(arg0, arg1);
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
function __wbg_adapter_69(arg0, arg1, arg2) {
|
|
265
|
+
const ret = wasm.closure843_externref_shim_multivalue_shim(arg0, arg1, arg2);
|
|
240
266
|
if (ret[1]) {
|
|
241
267
|
throw takeFromExternrefTable0(ret[0]);
|
|
242
268
|
}
|
|
243
269
|
}
|
|
244
270
|
|
|
245
|
-
function
|
|
246
|
-
wasm.
|
|
271
|
+
function __wbg_adapter_251(arg0, arg1, arg2, arg3) {
|
|
272
|
+
wasm.closure626_externref_shim(arg0, arg1, arg2, arg3);
|
|
247
273
|
}
|
|
248
274
|
|
|
249
275
|
/**
|
|
@@ -275,6 +301,8 @@ const __wbindgen_enum_IdbCursorDirection = ["next", "nextunique", "prev", "prevu
|
|
|
275
301
|
|
|
276
302
|
const __wbindgen_enum_IdbTransactionMode = ["readonly", "readwrite", "versionchange", "readwriteflush", "cleanup"];
|
|
277
303
|
|
|
304
|
+
const __wbindgen_enum_RequestCache = ["default", "no-store", "reload", "no-cache", "force-cache", "only-if-cached"];
|
|
305
|
+
|
|
278
306
|
const __wbindgen_enum_RequestCredentials = ["omit", "same-origin", "include"];
|
|
279
307
|
|
|
280
308
|
const __wbindgen_enum_RequestMode = ["same-origin", "no-cors", "cors", "navigate"];
|
|
@@ -425,6 +453,19 @@ export class Bill {
|
|
|
425
453
|
const ret = wasm.bill_attachment(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
426
454
|
return ret;
|
|
427
455
|
}
|
|
456
|
+
/**
|
|
457
|
+
* @param {string} bill_id
|
|
458
|
+
* @param {string} file_name
|
|
459
|
+
* @returns {Base64FileResponse}
|
|
460
|
+
*/
|
|
461
|
+
attachment_base64(bill_id, file_name) {
|
|
462
|
+
const ptr0 = passStringToWasm0(bill_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
463
|
+
const len0 = WASM_VECTOR_LEN;
|
|
464
|
+
const ptr1 = passStringToWasm0(file_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
465
|
+
const len1 = WASM_VECTOR_LEN;
|
|
466
|
+
const ret = wasm.bill_attachment_base64(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
467
|
+
return ret;
|
|
468
|
+
}
|
|
428
469
|
/**
|
|
429
470
|
* @param {UploadFile} payload
|
|
430
471
|
* @returns {UploadFileResponse}
|
|
@@ -726,6 +767,19 @@ export class Company {
|
|
|
726
767
|
const ret = wasm.company_file(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
727
768
|
return ret;
|
|
728
769
|
}
|
|
770
|
+
/**
|
|
771
|
+
* @param {string} id
|
|
772
|
+
* @param {string} file_name
|
|
773
|
+
* @returns {Base64FileResponse}
|
|
774
|
+
*/
|
|
775
|
+
file_base64(id, file_name) {
|
|
776
|
+
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
777
|
+
const len0 = WASM_VECTOR_LEN;
|
|
778
|
+
const ptr1 = passStringToWasm0(file_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
779
|
+
const len1 = WASM_VECTOR_LEN;
|
|
780
|
+
const ret = wasm.company_file_base64(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
781
|
+
return ret;
|
|
782
|
+
}
|
|
729
783
|
/**
|
|
730
784
|
* @param {UploadFile} payload
|
|
731
785
|
* @returns {UploadFileResponse}
|
|
@@ -840,6 +894,19 @@ export class Contact {
|
|
|
840
894
|
const ret = wasm.contact_file(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
841
895
|
return ret;
|
|
842
896
|
}
|
|
897
|
+
/**
|
|
898
|
+
* @param {string} node_id
|
|
899
|
+
* @param {string} file_name
|
|
900
|
+
* @returns {Base64FileResponse}
|
|
901
|
+
*/
|
|
902
|
+
file_base64(node_id, file_name) {
|
|
903
|
+
const ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
904
|
+
const len0 = WASM_VECTOR_LEN;
|
|
905
|
+
const ptr1 = passStringToWasm0(file_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
906
|
+
const len1 = WASM_VECTOR_LEN;
|
|
907
|
+
const ret = wasm.contact_file_base64(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
908
|
+
return ret;
|
|
909
|
+
}
|
|
843
910
|
/**
|
|
844
911
|
* @param {UploadFile} payload
|
|
845
912
|
* @returns {UploadFileResponse}
|
|
@@ -1019,6 +1086,16 @@ export class Identity {
|
|
|
1019
1086
|
const ret = wasm.identity_file(this.__wbg_ptr, ptr0, len0);
|
|
1020
1087
|
return ret;
|
|
1021
1088
|
}
|
|
1089
|
+
/**
|
|
1090
|
+
* @param {string} file_name
|
|
1091
|
+
* @returns {Base64FileResponse}
|
|
1092
|
+
*/
|
|
1093
|
+
file_base64(file_name) {
|
|
1094
|
+
const ptr0 = passStringToWasm0(file_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1095
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1096
|
+
const ret = wasm.identity_file_base64(this.__wbg_ptr, ptr0, len0);
|
|
1097
|
+
return ret;
|
|
1098
|
+
}
|
|
1022
1099
|
/**
|
|
1023
1100
|
* @param {UploadFile} payload
|
|
1024
1101
|
* @returns {UploadFileResponse}
|
|
@@ -1122,6 +1199,14 @@ export class Notification {
|
|
|
1122
1199
|
const ret = wasm.api_bill();
|
|
1123
1200
|
return Notification.__wrap(ret);
|
|
1124
1201
|
}
|
|
1202
|
+
/**
|
|
1203
|
+
* @param {Vec<String>} node_ids
|
|
1204
|
+
* @returns {NotificationStatusWeb[]}
|
|
1205
|
+
*/
|
|
1206
|
+
active_notifications_for_node_ids(node_ids) {
|
|
1207
|
+
const ret = wasm.notification_active_notifications_for_node_ids(this.__wbg_ptr, node_ids);
|
|
1208
|
+
return ret;
|
|
1209
|
+
}
|
|
1125
1210
|
/**
|
|
1126
1211
|
* @param {Function} callback
|
|
1127
1212
|
* @returns {Promise<void>}
|
|
@@ -1234,15 +1319,14 @@ function __wbg_get_imports() {
|
|
|
1234
1319
|
const ret = arg0.call(arg1, arg2);
|
|
1235
1320
|
return ret;
|
|
1236
1321
|
}, arguments) };
|
|
1237
|
-
imports.wbg.
|
|
1238
|
-
|
|
1239
|
-
return ret;
|
|
1322
|
+
imports.wbg.__wbg_clearInterval_938929bdd0f2dff9 = function(arg0) {
|
|
1323
|
+
globalThis.clearInterval(arg0);
|
|
1240
1324
|
};
|
|
1241
|
-
imports.wbg.
|
|
1325
|
+
imports.wbg.__wbg_clearTimeout_5a54f8841c30079a = function(arg0) {
|
|
1242
1326
|
const ret = clearTimeout(arg0);
|
|
1243
1327
|
return ret;
|
|
1244
1328
|
};
|
|
1245
|
-
imports.wbg.
|
|
1329
|
+
imports.wbg.__wbg_clearTimeout_6222fede17abcb1a = function(arg0) {
|
|
1246
1330
|
const ret = clearTimeout(arg0);
|
|
1247
1331
|
return ret;
|
|
1248
1332
|
};
|
|
@@ -1301,9 +1385,6 @@ function __wbg_get_imports() {
|
|
|
1301
1385
|
const ret = Object.entries(arg0);
|
|
1302
1386
|
return ret;
|
|
1303
1387
|
};
|
|
1304
|
-
imports.wbg.__wbg_error_1d3b71fa51de155e = function(arg0, arg1) {
|
|
1305
|
-
console.error(getStringFromWasm0(arg0, arg1));
|
|
1306
|
-
};
|
|
1307
1388
|
imports.wbg.__wbg_error_7534b8e9a36f1ab4 = function(arg0, arg1) {
|
|
1308
1389
|
let deferred0_0;
|
|
1309
1390
|
let deferred0_1;
|
|
@@ -1318,18 +1399,21 @@ function __wbg_get_imports() {
|
|
|
1318
1399
|
imports.wbg.__wbg_error_80de38b3f7cc3c3c = function(arg0, arg1, arg2, arg3) {
|
|
1319
1400
|
console.error(arg0, arg1, arg2, arg3);
|
|
1320
1401
|
};
|
|
1402
|
+
imports.wbg.__wbg_error_e98c298703cffa97 = function(arg0, arg1) {
|
|
1403
|
+
console.error(getStringFromWasm0(arg0, arg1));
|
|
1404
|
+
};
|
|
1321
1405
|
imports.wbg.__wbg_error_ff4ddaabdfc5dbb3 = function() { return handleError(function (arg0) {
|
|
1322
1406
|
const ret = arg0.error;
|
|
1323
1407
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1324
1408
|
}, arguments) };
|
|
1325
|
-
imports.wbg.__wbg_fetch_11bff8299d0ecd2b = function(arg0) {
|
|
1326
|
-
const ret = fetch(arg0);
|
|
1327
|
-
return ret;
|
|
1328
|
-
};
|
|
1329
1409
|
imports.wbg.__wbg_fetch_509096533071c657 = function(arg0, arg1) {
|
|
1330
1410
|
const ret = arg0.fetch(arg1);
|
|
1331
1411
|
return ret;
|
|
1332
1412
|
};
|
|
1413
|
+
imports.wbg.__wbg_fetch_f156d10be9a5c88a = function(arg0) {
|
|
1414
|
+
const ret = fetch(arg0);
|
|
1415
|
+
return ret;
|
|
1416
|
+
};
|
|
1333
1417
|
imports.wbg.__wbg_getRandomValues_3c9c0d586e575a16 = function() { return handleError(function (arg0, arg1) {
|
|
1334
1418
|
globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
|
|
1335
1419
|
}, arguments) };
|
|
@@ -1442,16 +1526,6 @@ function __wbg_get_imports() {
|
|
|
1442
1526
|
const ret = result;
|
|
1443
1527
|
return ret;
|
|
1444
1528
|
};
|
|
1445
|
-
imports.wbg.__wbg_instanceof_Window_def73ea0955fc569 = function(arg0) {
|
|
1446
|
-
let result;
|
|
1447
|
-
try {
|
|
1448
|
-
result = arg0 instanceof Window;
|
|
1449
|
-
} catch (_) {
|
|
1450
|
-
result = false;
|
|
1451
|
-
}
|
|
1452
|
-
const ret = result;
|
|
1453
|
-
return ret;
|
|
1454
|
-
};
|
|
1455
1529
|
imports.wbg.__wbg_isArray_a1eab7e0d067391b = function(arg0) {
|
|
1456
1530
|
const ret = Array.isArray(arg0);
|
|
1457
1531
|
return ret;
|
|
@@ -1502,7 +1576,7 @@ function __wbg_get_imports() {
|
|
|
1502
1576
|
const a = state0.a;
|
|
1503
1577
|
state0.a = 0;
|
|
1504
1578
|
try {
|
|
1505
|
-
return
|
|
1579
|
+
return __wbg_adapter_251(a, state0.b, arg0, arg1);
|
|
1506
1580
|
} finally {
|
|
1507
1581
|
state0.a = a;
|
|
1508
1582
|
}
|
|
@@ -1679,14 +1753,17 @@ function __wbg_get_imports() {
|
|
|
1679
1753
|
imports.wbg.__wbg_send_fc0c204e8a1757f4 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
1680
1754
|
arg0.send(getArrayU8FromWasm0(arg1, arg2));
|
|
1681
1755
|
}, arguments) };
|
|
1682
|
-
imports.wbg.
|
|
1683
|
-
const ret = setInterval(arg0, arg1);
|
|
1756
|
+
imports.wbg.__wbg_setInterval_c733bbe39e9b7c2b = function(arg0, arg1) {
|
|
1757
|
+
const ret = globalThis.setInterval(arg0, arg1);
|
|
1684
1758
|
return ret;
|
|
1685
|
-
}
|
|
1686
|
-
imports.wbg.
|
|
1759
|
+
};
|
|
1760
|
+
imports.wbg.__wbg_setTimeout_2b339866a2aa3789 = function(arg0, arg1) {
|
|
1687
1761
|
const ret = setTimeout(arg0, arg1);
|
|
1688
1762
|
return ret;
|
|
1689
1763
|
};
|
|
1764
|
+
imports.wbg.__wbg_setTimeout_8f06012fba12034e = function(arg0, arg1) {
|
|
1765
|
+
globalThis.setTimeout(arg0, arg1);
|
|
1766
|
+
};
|
|
1690
1767
|
imports.wbg.__wbg_setTimeout_db2dbaeefb6f39c7 = function() { return handleError(function (arg0, arg1) {
|
|
1691
1768
|
const ret = setTimeout(arg0, arg1);
|
|
1692
1769
|
return ret;
|
|
@@ -1717,6 +1794,9 @@ function __wbg_get_imports() {
|
|
|
1717
1794
|
imports.wbg.__wbg_setbody_5923b78a95eedf29 = function(arg0, arg1) {
|
|
1718
1795
|
arg0.body = arg1;
|
|
1719
1796
|
};
|
|
1797
|
+
imports.wbg.__wbg_setcache_12f17c3a980650e4 = function(arg0, arg1) {
|
|
1798
|
+
arg0.cache = __wbindgen_enum_RequestCache[arg1];
|
|
1799
|
+
};
|
|
1720
1800
|
imports.wbg.__wbg_setcredentials_c3a22f1cd105a2c6 = function(arg0, arg1) {
|
|
1721
1801
|
arg0.credentials = __wbindgen_enum_RequestCredentials[arg1];
|
|
1722
1802
|
};
|
|
@@ -1899,32 +1979,36 @@ function __wbg_get_imports() {
|
|
|
1899
1979
|
const ret = false;
|
|
1900
1980
|
return ret;
|
|
1901
1981
|
};
|
|
1902
|
-
imports.wbg.
|
|
1903
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1982
|
+
imports.wbg.__wbindgen_closure_wrapper10178 = function(arg0, arg1, arg2) {
|
|
1983
|
+
const ret = makeMutClosure(arg0, arg1, 702, __wbg_adapter_57);
|
|
1984
|
+
return ret;
|
|
1985
|
+
};
|
|
1986
|
+
imports.wbg.__wbindgen_closure_wrapper11112 = function(arg0, arg1, arg2) {
|
|
1987
|
+
const ret = makeMutClosure(arg0, arg1, 841, __wbg_adapter_60);
|
|
1904
1988
|
return ret;
|
|
1905
1989
|
};
|
|
1906
|
-
imports.wbg.
|
|
1907
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1990
|
+
imports.wbg.__wbindgen_closure_wrapper11135 = function(arg0, arg1, arg2) {
|
|
1991
|
+
const ret = makeMutClosure(arg0, arg1, 844, __wbg_adapter_69);
|
|
1908
1992
|
return ret;
|
|
1909
1993
|
};
|
|
1910
|
-
imports.wbg.
|
|
1911
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1994
|
+
imports.wbg.__wbindgen_closure_wrapper19898 = function(arg0, arg1, arg2) {
|
|
1995
|
+
const ret = makeMutClosure(arg0, arg1, 616, __wbg_adapter_57);
|
|
1912
1996
|
return ret;
|
|
1913
1997
|
};
|
|
1914
|
-
imports.wbg.
|
|
1915
|
-
const ret =
|
|
1998
|
+
imports.wbg.__wbindgen_closure_wrapper2097 = function(arg0, arg1, arg2) {
|
|
1999
|
+
const ret = makeClosure(arg0, arg1, 337, __wbg_adapter_54);
|
|
1916
2000
|
return ret;
|
|
1917
2001
|
};
|
|
1918
|
-
imports.wbg.
|
|
1919
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
2002
|
+
imports.wbg.__wbindgen_closure_wrapper2811 = function(arg0, arg1, arg2) {
|
|
2003
|
+
const ret = makeMutClosure(arg0, arg1, 337, __wbg_adapter_57);
|
|
1920
2004
|
return ret;
|
|
1921
2005
|
};
|
|
1922
|
-
imports.wbg.
|
|
1923
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
2006
|
+
imports.wbg.__wbindgen_closure_wrapper5282 = function(arg0, arg1, arg2) {
|
|
2007
|
+
const ret = makeMutClosure(arg0, arg1, 616, __wbg_adapter_60);
|
|
1924
2008
|
return ret;
|
|
1925
2009
|
};
|
|
1926
|
-
imports.wbg.
|
|
1927
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
2010
|
+
imports.wbg.__wbindgen_closure_wrapper8377 = function(arg0, arg1, arg2) {
|
|
2011
|
+
const ret = makeMutClosure(arg0, arg1, 616, __wbg_adapter_60);
|
|
1928
2012
|
return ret;
|
|
1929
2013
|
};
|
|
1930
2014
|
imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
|
package/index_bg.wasm
CHANGED
|
Binary file
|