@bitcredit/bcr-ebill-wasm 0.3.1 → 0.3.2

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 CHANGED
@@ -1,6 +1,10 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  export function initialize_api(cfg: Config): Promise<void>;
4
+ /**
5
+ * Entry point invoked by JavaScript in a worker.
6
+ */
7
+ export function task_worker_entry_point(ptr: number): void;
4
8
  export enum ContactTypeWeb {
5
9
  Person = 0,
6
10
  Company = 1,
@@ -298,123 +302,6 @@ export interface LightIdentityPublicDataWeb {
298
302
  node_id: string;
299
303
  }
300
304
 
301
- export interface CompaniesResponse {
302
- companies: CompanyWeb[];
303
- }
304
-
305
- export interface CompanyWeb {
306
- id: string;
307
- name: string;
308
- country_of_registration: string | undefined;
309
- city_of_registration: string | undefined;
310
- postal_address: PostalAddressWeb;
311
- email: string;
312
- registration_number: string | undefined;
313
- registration_date: string | undefined;
314
- proof_of_registration_file: FileWeb | undefined;
315
- logo_file: FileWeb | undefined;
316
- signatories: string[];
317
- }
318
-
319
- export interface CreateCompanyPayload {
320
- name: string;
321
- country_of_registration: string | undefined;
322
- city_of_registration: string | undefined;
323
- postal_address: PostalAddressWeb;
324
- email: string;
325
- registration_number: string | undefined;
326
- registration_date: string | undefined;
327
- proof_of_registration_file_upload_id: string | undefined;
328
- logo_file_upload_id: string | undefined;
329
- }
330
-
331
- export interface EditCompanyPayload {
332
- id: string;
333
- name: string | undefined;
334
- email: string | undefined;
335
- postal_address: OptionalPostalAddressWeb;
336
- country_of_registration: string | undefined;
337
- city_of_registration: string | undefined;
338
- registration_number: string | undefined;
339
- registration_date: string | undefined;
340
- logo_file_upload_id: string | undefined;
341
- proof_of_registration_file_upload_id: string | undefined;
342
- }
343
-
344
- export interface AddSignatoryPayload {
345
- id: string;
346
- signatory_node_id: string;
347
- }
348
-
349
- export interface RemoveSignatoryPayload {
350
- id: string;
351
- signatory_node_id: string;
352
- }
353
-
354
- export interface ListSignatoriesResponse {
355
- signatories: SignatoryResponse[];
356
- }
357
-
358
- export interface SignatoryResponse {
359
- t: ContactTypeWeb;
360
- node_id: string;
361
- name: string;
362
- postal_address: PostalAddressWeb;
363
- avatar_file: FileWeb | undefined;
364
- }
365
-
366
- export interface ContactsResponse {
367
- contacts: ContactWeb[];
368
- }
369
-
370
- export interface NewContactPayload {
371
- t: number;
372
- node_id: string;
373
- name: string;
374
- email: string;
375
- postal_address: PostalAddressWeb;
376
- date_of_birth_or_registration: string | undefined;
377
- country_of_birth_or_registration: string | undefined;
378
- city_of_birth_or_registration: string | undefined;
379
- identification_number: string | undefined;
380
- avatar_file_upload_id: string | undefined;
381
- proof_document_file_upload_id: string | undefined;
382
- }
383
-
384
- export interface EditContactPayload {
385
- node_id: string;
386
- name: string | undefined;
387
- email: string | undefined;
388
- postal_address: OptionalPostalAddressWeb;
389
- date_of_birth_or_registration: string | undefined;
390
- country_of_birth_or_registration: string | undefined;
391
- city_of_birth_or_registration: string | undefined;
392
- identification_number: string | undefined;
393
- avatar_file_upload_id: string | undefined;
394
- proof_document_file_upload_id: string | undefined;
395
- }
396
-
397
- export interface ContactWeb {
398
- t: ContactTypeWeb;
399
- node_id: string;
400
- name: string;
401
- email: string;
402
- postal_address: PostalAddressWeb;
403
- date_of_birth_or_registration: string | undefined;
404
- country_of_birth_or_registration: string | undefined;
405
- city_of_birth_or_registration: string | undefined;
406
- identification_number: string | undefined;
407
- avatar_file: FileWeb | undefined;
408
- proof_document_file: FileWeb | undefined;
409
- nostr_relays: string[];
410
- }
411
-
412
- export interface JsErrorData {
413
- error: string;
414
- message: string;
415
- code: number;
416
- }
417
-
418
305
  export interface StatusResponse {
419
306
  bitcoin_network: string;
420
307
  app_version: string;
@@ -492,7 +379,7 @@ export interface UploadFile {
492
379
  name: string;
493
380
  }
494
381
 
495
- export interface UploadFilesResponse {
382
+ export interface UploadFileResponse {
496
383
  file_upload_id: string;
497
384
  }
498
385
 
@@ -545,12 +432,115 @@ export interface SeedPhrase {
545
432
  seed_phrase: string;
546
433
  }
547
434
 
548
- export interface Config {
549
- log_level: Level | undefined;
550
- bitcoin_network: string;
551
- nostr_relay: string;
552
- job_runner_initial_delay_seconds: number;
553
- job_runner_check_interval_seconds: number;
435
+ export interface CompaniesResponse {
436
+ companies: CompanyWeb[];
437
+ }
438
+
439
+ export interface CompanyWeb {
440
+ id: string;
441
+ name: string;
442
+ country_of_registration: string | undefined;
443
+ city_of_registration: string | undefined;
444
+ postal_address: PostalAddressWeb;
445
+ email: string;
446
+ registration_number: string | undefined;
447
+ registration_date: string | undefined;
448
+ proof_of_registration_file: FileWeb | undefined;
449
+ logo_file: FileWeb | undefined;
450
+ signatories: string[];
451
+ }
452
+
453
+ export interface CreateCompanyPayload {
454
+ name: string;
455
+ country_of_registration: string | undefined;
456
+ city_of_registration: string | undefined;
457
+ postal_address: PostalAddressWeb;
458
+ email: string;
459
+ registration_number: string | undefined;
460
+ registration_date: string | undefined;
461
+ proof_of_registration_file_upload_id: string | undefined;
462
+ logo_file_upload_id: string | undefined;
463
+ }
464
+
465
+ export interface EditCompanyPayload {
466
+ id: string;
467
+ name: string | undefined;
468
+ email: string | undefined;
469
+ postal_address: OptionalPostalAddressWeb;
470
+ country_of_registration: string | undefined;
471
+ city_of_registration: string | undefined;
472
+ registration_number: string | undefined;
473
+ registration_date: string | undefined;
474
+ logo_file_upload_id: string | undefined;
475
+ proof_of_registration_file_upload_id: string | undefined;
476
+ }
477
+
478
+ export interface AddSignatoryPayload {
479
+ id: string;
480
+ signatory_node_id: string;
481
+ }
482
+
483
+ export interface RemoveSignatoryPayload {
484
+ id: string;
485
+ signatory_node_id: string;
486
+ }
487
+
488
+ export interface ListSignatoriesResponse {
489
+ signatories: SignatoryResponse[];
490
+ }
491
+
492
+ export interface SignatoryResponse {
493
+ t: ContactTypeWeb;
494
+ node_id: string;
495
+ name: string;
496
+ postal_address: PostalAddressWeb;
497
+ avatar_file: FileWeb | undefined;
498
+ }
499
+
500
+ export interface ContactsResponse {
501
+ contacts: ContactWeb[];
502
+ }
503
+
504
+ export interface NewContactPayload {
505
+ t: number;
506
+ node_id: string;
507
+ name: string;
508
+ email: string;
509
+ postal_address: PostalAddressWeb;
510
+ date_of_birth_or_registration: string | undefined;
511
+ country_of_birth_or_registration: string | undefined;
512
+ city_of_birth_or_registration: string | undefined;
513
+ identification_number: string | undefined;
514
+ avatar_file_upload_id: string | undefined;
515
+ proof_document_file_upload_id: string | undefined;
516
+ }
517
+
518
+ export interface EditContactPayload {
519
+ node_id: string;
520
+ name: string | undefined;
521
+ email: string | undefined;
522
+ postal_address: OptionalPostalAddressWeb;
523
+ date_of_birth_or_registration: string | undefined;
524
+ country_of_birth_or_registration: string | undefined;
525
+ city_of_birth_or_registration: string | undefined;
526
+ identification_number: string | undefined;
527
+ avatar_file_upload_id: string | undefined;
528
+ proof_document_file_upload_id: string | undefined;
529
+ }
530
+
531
+ export interface ContactWeb {
532
+ t: ContactTypeWeb;
533
+ node_id: string;
534
+ name: string;
535
+ email: string;
536
+ postal_address: PostalAddressWeb;
537
+ date_of_birth_or_registration: string | undefined;
538
+ country_of_birth_or_registration: string | undefined;
539
+ city_of_birth_or_registration: string | undefined;
540
+ identification_number: string | undefined;
541
+ avatar_file: FileWeb | undefined;
542
+ proof_document_file: FileWeb | undefined;
543
+ nostr_relays: string[];
554
544
  }
555
545
 
556
546
  export interface NotificationWeb {
@@ -566,6 +556,22 @@ export interface NotificationWeb {
566
556
 
567
557
  export type NotificationTypeWeb = "General" | "Bill";
568
558
 
559
+ export type JsErrorType = "NoFileForFileUploadId" | "NotFound" | "Validation" | "ExternalApi" | "Io" | "Crypto" | "Persistence" | "Blockchain" | "Serialization" | "Init" | "NotificationNetwork" | "NotificationMessage" | "InvalidBillType" | "InvalidOperation" | "BillAlreadyAccepted" | "BillAlreadyRequestedToAccept" | "BillNotAccepted" | "CallerIsNotDrawee" | "CallerIsNotHolder" | "CallerIsNotRecoursee" | "CallerIsNotBuyer" | "RequestAlreadyExpired" | "RequestAlreadyRejected" | "BillAlreadyPaid" | "BillWasNotRequestedToAccept" | "BillWasNotRequestedToPay" | "BillWasNotOfferedToSell" | "BillRequestToAcceptDidNotExpireAndWasNotRejected" | "BillRequestToPayDidNotExpireAndWasNotRejected" | "RecourseeNotPastHolder" | "BillWasNotRequestedToRecourse" | "BillIsNotRequestedToRecourseAndWaitingForPayment" | "BillIsNotOfferToSellWaitingForPayment" | "BillSellDataInvalid" | "BillRecourseDataInvalid" | "BillIsRequestedToPayAndWaitingForPayment" | "BillIsOfferedToSellAndWaitingForPayment" | "BillIsInRecourseAndWaitingForPayment" | "BillIsRequestedToPay";
560
+
561
+ export interface JsErrorData {
562
+ error: JsErrorType;
563
+ message: string;
564
+ code: number;
565
+ }
566
+
567
+ export interface Config {
568
+ log_level: string | undefined;
569
+ bitcoin_network: string;
570
+ nostr_relay: string;
571
+ job_runner_initial_delay_seconds: number;
572
+ job_runner_check_interval_seconds: number;
573
+ }
574
+
569
575
  export class Api {
570
576
  private constructor();
571
577
  free(): void;
@@ -585,7 +591,7 @@ export class Bill {
585
591
  past_endorsees(id: string): Promise<PastEndorseesResponse>;
586
592
  bitcoin_key(id: string): Promise<BillCombinedBitcoinKeyWeb>;
587
593
  attachment(bill_id: string, file_name: string): Promise<BinaryFileResponse>;
588
- upload(payload: UploadFile): Promise<UploadFilesResponse>;
594
+ upload(payload: UploadFile): Promise<UploadFileResponse>;
589
595
  search(payload: BillsSearchFilterPayload): Promise<LightBillsResponse>;
590
596
  list_light(): Promise<LightBillsResponse>;
591
597
  list(): Promise<BillsResponse>;
@@ -612,7 +618,7 @@ export class Company {
612
618
  free(): void;
613
619
  static new(): Company;
614
620
  file(id: string, file_name: string): Promise<BinaryFileResponse>;
615
- upload(payload: UploadFile): Promise<UploadFilesResponse>;
621
+ upload(payload: UploadFile): Promise<UploadFileResponse>;
616
622
  list(): Promise<CompaniesResponse>;
617
623
  list_signatories(id: string): Promise<ListSignatoriesResponse>;
618
624
  detail(id: string): Promise<CompanyWeb>;
@@ -626,7 +632,7 @@ export class Contact {
626
632
  free(): void;
627
633
  static new(): Contact;
628
634
  file(id: string, file_name: string): Promise<BinaryFileResponse>;
629
- upload(payload: UploadFile): Promise<UploadFilesResponse>;
635
+ upload(payload: UploadFile): Promise<UploadFileResponse>;
630
636
  list(): Promise<ContactsResponse>;
631
637
  detail(node_id: string): Promise<ContactWeb>;
632
638
  remove(node_id: string): Promise<void>;
@@ -648,7 +654,7 @@ export class Identity {
648
654
  free(): void;
649
655
  static new(): Identity;
650
656
  file(file_name: string): Promise<BinaryFileResponse>;
651
- upload(payload: UploadFile): Promise<UploadFilesResponse>;
657
+ upload(payload: UploadFile): Promise<UploadFileResponse>;
652
658
  detail(): Promise<any>;
653
659
  create(payload: NewIdentityPayload): Promise<void>;
654
660
  change(payload: ChangeIdentityPayload): Promise<void>;
@@ -678,10 +684,6 @@ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembl
678
684
 
679
685
  export interface InitOutput {
680
686
  readonly memory: WebAssembly.Memory;
681
- readonly __wbg_quote_free: (a: number, b: number) => void;
682
- readonly quote_new: () => number;
683
- readonly quote_get: (a: number, b: number, c: number) => any;
684
- readonly quote_accept: (a: number, b: number, c: number) => any;
685
687
  readonly __wbg_identity_free: (a: number, b: number) => void;
686
688
  readonly identity_new: () => number;
687
689
  readonly identity_file: (a: number, b: number, c: number) => any;
@@ -693,40 +695,12 @@ export interface InitOutput {
693
695
  readonly identity_switch: (a: number, b: any) => any;
694
696
  readonly identity_seed_backup: (a: number) => any;
695
697
  readonly identity_seed_recover: (a: number, b: any) => any;
696
- readonly __wbg_general_free: (a: number, b: number) => void;
697
- readonly general_new: () => number;
698
- readonly general_status: (a: number) => any;
699
- readonly general_currencies: (a: number) => any;
700
- readonly general_temp_file: (a: number, b: number, c: number) => any;
701
- readonly general_overview: (a: number, b: number, c: number) => any;
702
- readonly general_search: (a: number, b: any) => any;
703
- readonly __wbg_company_free: (a: number, b: number) => void;
704
- readonly company_new: () => number;
705
- readonly company_file: (a: number, b: number, c: number, d: number, e: number) => any;
706
- readonly company_upload: (a: number, b: any) => any;
707
- readonly company_list: (a: number) => any;
708
- readonly company_list_signatories: (a: number, b: number, c: number) => any;
709
- readonly company_detail: (a: number, b: number, c: number) => any;
710
- readonly company_create: (a: number, b: any) => any;
711
- readonly company_edit: (a: number, b: any) => any;
712
- readonly company_add_signatory: (a: number, b: any) => any;
713
- readonly company_remove_signatory: (a: number, b: any) => any;
714
- readonly __wbg_notification_free: (a: number, b: number) => void;
715
- readonly notification_subscribe: (a: number, b: any) => any;
716
- readonly notification_list: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: bigint, i: number, j: bigint) => any;
717
- readonly notification_mark_as_done: (a: number, b: number, c: number) => any;
718
- readonly notification_trigger_test_msg: (a: number, b: any) => any;
719
- readonly notification_new: () => number;
720
- readonly __wbg_contact_free: (a: number, b: number) => void;
721
- readonly contact_new: () => number;
722
- readonly contact_file: (a: number, b: number, c: number, d: number, e: number) => any;
723
- readonly contact_upload: (a: number, b: any) => any;
724
- readonly contact_list: (a: number) => any;
725
- readonly contact_detail: (a: number, b: number, c: number) => any;
726
- readonly contact_remove: (a: number, b: number, c: number) => any;
727
- readonly contact_create: (a: number, b: any) => any;
728
- readonly contact_edit: (a: number, b: any) => any;
698
+ readonly __wbg_quote_free: (a: number, b: number) => void;
699
+ readonly quote_get: (a: number, b: number, c: number) => any;
700
+ readonly quote_accept: (a: number, b: number, c: number) => any;
701
+ readonly quote_new: () => number;
729
702
  readonly __wbg_bill_free: (a: number, b: number) => void;
703
+ readonly bill_new: () => number;
730
704
  readonly bill_endorsements: (a: number, b: number, c: number) => any;
731
705
  readonly bill_past_endorsees: (a: number, b: number, c: number) => any;
732
706
  readonly bill_bitcoin_key: (a: number, b: number, c: number) => any;
@@ -752,16 +726,49 @@ export interface InitOutput {
752
726
  readonly bill_reject_to_pay_recourse: (a: number, b: any) => any;
753
727
  readonly bill_request_to_recourse_bill_payment: (a: number, b: any) => any;
754
728
  readonly bill_request_to_recourse_bill_acceptance: (a: number, b: any) => any;
729
+ readonly __wbg_company_free: (a: number, b: number) => void;
730
+ readonly company_file: (a: number, b: number, c: number, d: number, e: number) => any;
731
+ readonly company_upload: (a: number, b: any) => any;
732
+ readonly company_list: (a: number) => any;
733
+ readonly company_list_signatories: (a: number, b: number, c: number) => any;
734
+ readonly company_detail: (a: number, b: number, c: number) => any;
735
+ readonly company_create: (a: number, b: any) => any;
736
+ readonly company_edit: (a: number, b: any) => any;
737
+ readonly company_add_signatory: (a: number, b: any) => any;
738
+ readonly company_remove_signatory: (a: number, b: any) => any;
739
+ readonly __wbg_general_free: (a: number, b: number) => void;
740
+ readonly general_status: (a: number) => any;
741
+ readonly general_currencies: (a: number) => any;
742
+ readonly general_temp_file: (a: number, b: number, c: number) => any;
743
+ readonly general_overview: (a: number, b: number, c: number) => any;
744
+ readonly general_search: (a: number, b: any) => any;
745
+ readonly company_new: () => number;
746
+ readonly general_new: () => number;
755
747
  readonly __wbg_api_free: (a: number, b: number) => void;
756
748
  readonly api_bill: () => number;
757
- readonly initialize_api: (a: any) => any;
758
- readonly bill_new: () => number;
759
749
  readonly api_general: () => number;
760
750
  readonly api_identity: () => number;
761
751
  readonly api_notification: () => number;
762
752
  readonly api_contact: () => number;
763
753
  readonly api_company: () => number;
764
754
  readonly api_quote: () => number;
755
+ readonly __wbg_contact_free: (a: number, b: number) => void;
756
+ readonly contact_new: () => number;
757
+ readonly contact_file: (a: number, b: number, c: number, d: number, e: number) => any;
758
+ readonly contact_upload: (a: number, b: any) => any;
759
+ readonly contact_list: (a: number) => any;
760
+ readonly contact_detail: (a: number, b: number, c: number) => any;
761
+ readonly contact_remove: (a: number, b: number, c: number) => any;
762
+ readonly contact_create: (a: number, b: any) => any;
763
+ readonly contact_edit: (a: number, b: any) => any;
764
+ readonly __wbg_notification_free: (a: number, b: number) => void;
765
+ readonly notification_new: () => number;
766
+ readonly notification_subscribe: (a: number, b: any) => any;
767
+ readonly notification_list: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: bigint, i: number, j: bigint) => any;
768
+ readonly notification_mark_as_done: (a: number, b: number, c: number) => any;
769
+ readonly notification_trigger_test_msg: (a: number, b: any) => any;
770
+ readonly initialize_api: (a: any) => any;
771
+ readonly task_worker_entry_point: (a: number) => [number, number];
765
772
  readonly ring_core_0_17_14__bn_mul_mont: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
766
773
  readonly rustsecp256k1_v0_10_0_context_create: (a: number) => number;
767
774
  readonly rustsecp256k1_v0_10_0_context_destroy: (a: number) => void;
@@ -774,15 +781,15 @@ export interface InitOutput {
774
781
  readonly __wbindgen_export_4: WebAssembly.Table;
775
782
  readonly __wbindgen_free: (a: number, b: number, c: number) => void;
776
783
  readonly __wbindgen_export_6: WebAssembly.Table;
777
- readonly _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hd28bc47676a15709: (a: number, b: number) => void;
778
- readonly closure3958_externref_shim_multivalue_shim: (a: number, b: number, c: any) => [number, number];
779
784
  readonly __externref_table_dealloc: (a: number) => void;
780
- readonly _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hc6ad37980230d22e: (a: number, b: number) => void;
781
- readonly closure5482_externref_shim: (a: number, b: number, c: any) => void;
782
- readonly closure5745_externref_shim: (a: number, b: number, c: any) => void;
783
- readonly _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h8b6645c2830c9446: (a: number, b: number) => void;
784
- readonly closure5946_externref_shim: (a: number, b: number, c: any) => void;
785
- readonly closure6078_externref_shim: (a: number, b: number, c: any, d: any) => void;
785
+ readonly _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h22fb1808b8ab2d8a: (a: number, b: number) => void;
786
+ readonly closure4143_externref_shim_multivalue_shim: (a: number, b: number, c: any) => [number, number];
787
+ readonly _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h3908efabe940eeba: (a: number, b: number) => void;
788
+ readonly closure5666_externref_shim: (a: number, b: number, c: any) => void;
789
+ readonly closure5903_externref_shim: (a: number, b: number, c: any) => void;
790
+ readonly _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h1098717e74983065: (a: number, b: number) => void;
791
+ readonly closure6117_externref_shim: (a: number, b: number, c: any) => void;
792
+ readonly closure6249_externref_shim: (a: number, b: number, c: any, d: any) => void;
786
793
  readonly __wbindgen_start: () => void;
787
794
  }
788
795
 
package/index.js CHANGED
@@ -211,44 +211,55 @@ export function initialize_api(cfg) {
211
211
  return ret;
212
212
  }
213
213
 
214
- function __wbg_adapter_54(arg0, arg1) {
215
- wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hd28bc47676a15709(arg0, arg1);
216
- }
217
-
218
214
  function takeFromExternrefTable0(idx) {
219
215
  const value = wasm.__wbindgen_export_4.get(idx);
220
216
  wasm.__externref_table_dealloc(idx);
221
217
  return value;
222
218
  }
219
+ /**
220
+ * Entry point invoked by JavaScript in a worker.
221
+ * @param {number} ptr
222
+ */
223
+ export function task_worker_entry_point(ptr) {
224
+ const ret = wasm.task_worker_entry_point(ptr);
225
+ if (ret[1]) {
226
+ throw takeFromExternrefTable0(ret[0]);
227
+ }
228
+ }
229
+
230
+ function __wbg_adapter_54(arg0, arg1) {
231
+ wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h22fb1808b8ab2d8a(arg0, arg1);
232
+ }
233
+
223
234
  function __wbg_adapter_57(arg0, arg1, arg2) {
224
- const ret = wasm.closure3958_externref_shim_multivalue_shim(arg0, arg1, arg2);
235
+ const ret = wasm.closure4143_externref_shim_multivalue_shim(arg0, arg1, arg2);
225
236
  if (ret[1]) {
226
237
  throw takeFromExternrefTable0(ret[0]);
227
238
  }
228
239
  }
229
240
 
230
241
  function __wbg_adapter_60(arg0, arg1) {
231
- wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hc6ad37980230d22e(arg0, arg1);
242
+ wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h3908efabe940eeba(arg0, arg1);
232
243
  }
233
244
 
234
245
  function __wbg_adapter_63(arg0, arg1, arg2) {
235
- wasm.closure5482_externref_shim(arg0, arg1, arg2);
246
+ wasm.closure5666_externref_shim(arg0, arg1, arg2);
236
247
  }
237
248
 
238
249
  function __wbg_adapter_66(arg0, arg1, arg2) {
239
- wasm.closure5745_externref_shim(arg0, arg1, arg2);
250
+ wasm.closure5903_externref_shim(arg0, arg1, arg2);
240
251
  }
241
252
 
242
253
  function __wbg_adapter_69(arg0, arg1) {
243
- wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h8b6645c2830c9446(arg0, arg1);
254
+ wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h1098717e74983065(arg0, arg1);
244
255
  }
245
256
 
246
257
  function __wbg_adapter_72(arg0, arg1, arg2) {
247
- wasm.closure5946_externref_shim(arg0, arg1, arg2);
258
+ wasm.closure6117_externref_shim(arg0, arg1, arg2);
248
259
  }
249
260
 
250
- function __wbg_adapter_427(arg0, arg1, arg2, arg3) {
251
- wasm.closure6078_externref_shim(arg0, arg1, arg2, arg3);
261
+ function __wbg_adapter_430(arg0, arg1, arg2, arg3) {
262
+ wasm.closure6249_externref_shim(arg0, arg1, arg2, arg3);
252
263
  }
253
264
 
254
265
  /**
@@ -373,7 +384,7 @@ export class Bill {
373
384
  * @returns {Bill}
374
385
  */
375
386
  static new() {
376
- const ret = wasm.api_bill();
387
+ const ret = wasm.bill_new();
377
388
  return Bill.__wrap(ret);
378
389
  }
379
390
  /**
@@ -421,7 +432,7 @@ export class Bill {
421
432
  }
422
433
  /**
423
434
  * @param {UploadFile} payload
424
- * @returns {UploadFilesResponse}
435
+ * @returns {UploadFileResponse}
425
436
  */
426
437
  upload(payload) {
427
438
  const ret = wasm.bill_upload(this.__wbg_ptr, payload);
@@ -619,7 +630,7 @@ export class Company {
619
630
  * @returns {Company}
620
631
  */
621
632
  static new() {
622
- const ret = wasm.company_new();
633
+ const ret = wasm.bill_new();
623
634
  return Company.__wrap(ret);
624
635
  }
625
636
  /**
@@ -637,7 +648,7 @@ export class Company {
637
648
  }
638
649
  /**
639
650
  * @param {UploadFile} payload
640
- * @returns {UploadFilesResponse}
651
+ * @returns {UploadFileResponse}
641
652
  */
642
653
  upload(payload) {
643
654
  const ret = wasm.company_upload(this.__wbg_ptr, payload);
@@ -751,7 +762,7 @@ export class Contact {
751
762
  }
752
763
  /**
753
764
  * @param {UploadFile} payload
754
- * @returns {UploadFilesResponse}
765
+ * @returns {UploadFileResponse}
755
766
  */
756
767
  upload(payload) {
757
768
  const ret = wasm.contact_upload(this.__wbg_ptr, payload);
@@ -831,7 +842,7 @@ export class General {
831
842
  * @returns {General}
832
843
  */
833
844
  static new() {
834
- const ret = wasm.general_new();
845
+ const ret = wasm.bill_new();
835
846
  return General.__wrap(ret);
836
847
  }
837
848
  /**
@@ -922,7 +933,7 @@ export class Identity {
922
933
  }
923
934
  /**
924
935
  * @param {UploadFile} payload
925
- * @returns {UploadFilesResponse}
936
+ * @returns {UploadFileResponse}
926
937
  */
927
938
  upload(payload) {
928
939
  const ret = wasm.identity_upload(this.__wbg_ptr, payload);
@@ -1012,7 +1023,7 @@ export class Notification {
1012
1023
  * @returns {Notification}
1013
1024
  */
1014
1025
  static new() {
1015
- const ret = wasm.company_new();
1026
+ const ret = wasm.notification_new();
1016
1027
  return Notification.__wrap(ret);
1017
1028
  }
1018
1029
  /**
@@ -1088,7 +1099,7 @@ export class Quote {
1088
1099
  * @returns {Quote}
1089
1100
  */
1090
1101
  static new() {
1091
- const ret = wasm.quote_new();
1102
+ const ret = wasm.identity_new();
1092
1103
  return Quote.__wrap(ret);
1093
1104
  }
1094
1105
  /**
@@ -1447,7 +1458,7 @@ function __wbg_get_imports() {
1447
1458
  const a = state0.a;
1448
1459
  state0.a = 0;
1449
1460
  try {
1450
- return __wbg_adapter_427(a, state0.b, arg0, arg1);
1461
+ return __wbg_adapter_430(a, state0.b, arg0, arg1);
1451
1462
  } finally {
1452
1463
  state0.a = a;
1453
1464
  }
@@ -1566,6 +1577,9 @@ function __wbg_get_imports() {
1566
1577
  const ret = arg0.performance;
1567
1578
  return ret;
1568
1579
  };
1580
+ imports.wbg.__wbg_postMessage_83a8d58d3fcb6c13 = function() { return handleError(function (arg0, arg1) {
1581
+ arg0.postMessage(arg1);
1582
+ }, arguments) };
1569
1583
  imports.wbg.__wbg_process_5c1d670bc53614b8 = function(arg0) {
1570
1584
  const ret = arg0.process;
1571
1585
  return ret;
@@ -1841,32 +1855,32 @@ function __wbg_get_imports() {
1841
1855
  const ret = false;
1842
1856
  return ret;
1843
1857
  };
1844
- imports.wbg.__wbindgen_closure_wrapper21859 = function(arg0, arg1, arg2) {
1845
- const ret = makeMutClosure(arg0, arg1, 3959, __wbg_adapter_57);
1858
+ imports.wbg.__wbindgen_closure_wrapper21843 = function(arg0, arg1, arg2) {
1859
+ const ret = makeMutClosure(arg0, arg1, 4144, __wbg_adapter_57);
1846
1860
  return ret;
1847
1861
  };
1848
- imports.wbg.__wbindgen_closure_wrapper22371 = function(arg0, arg1, arg2) {
1849
- const ret = makeMutClosure(arg0, arg1, 4107, __wbg_adapter_60);
1862
+ imports.wbg.__wbindgen_closure_wrapper22360 = function(arg0, arg1, arg2) {
1863
+ const ret = makeMutClosure(arg0, arg1, 4296, __wbg_adapter_60);
1850
1864
  return ret;
1851
1865
  };
1852
- imports.wbg.__wbindgen_closure_wrapper27501 = function(arg0, arg1, arg2) {
1853
- const ret = makeMutClosure(arg0, arg1, 5483, __wbg_adapter_63);
1866
+ imports.wbg.__wbindgen_closure_wrapper27496 = function(arg0, arg1, arg2) {
1867
+ const ret = makeMutClosure(arg0, arg1, 5667, __wbg_adapter_63);
1854
1868
  return ret;
1855
1869
  };
1856
- imports.wbg.__wbindgen_closure_wrapper28124 = function(arg0, arg1, arg2) {
1857
- const ret = makeMutClosure(arg0, arg1, 5746, __wbg_adapter_66);
1870
+ imports.wbg.__wbindgen_closure_wrapper28173 = function(arg0, arg1, arg2) {
1871
+ const ret = makeMutClosure(arg0, arg1, 5904, __wbg_adapter_66);
1858
1872
  return ret;
1859
1873
  };
1860
- imports.wbg.__wbindgen_closure_wrapper29350 = function(arg0, arg1, arg2) {
1861
- const ret = makeMutClosure(arg0, arg1, 5937, __wbg_adapter_69);
1874
+ imports.wbg.__wbindgen_closure_wrapper29490 = function(arg0, arg1, arg2) {
1875
+ const ret = makeMutClosure(arg0, arg1, 6108, __wbg_adapter_69);
1862
1876
  return ret;
1863
1877
  };
1864
- imports.wbg.__wbindgen_closure_wrapper29375 = function(arg0, arg1, arg2) {
1865
- const ret = makeMutClosure(arg0, arg1, 5947, __wbg_adapter_72);
1878
+ imports.wbg.__wbindgen_closure_wrapper29515 = function(arg0, arg1, arg2) {
1879
+ const ret = makeMutClosure(arg0, arg1, 6118, __wbg_adapter_72);
1866
1880
  return ret;
1867
1881
  };
1868
- imports.wbg.__wbindgen_closure_wrapper3171 = function(arg0, arg1, arg2) {
1869
- const ret = makeMutClosure(arg0, arg1, 1127, __wbg_adapter_54);
1882
+ imports.wbg.__wbindgen_closure_wrapper3240 = function(arg0, arg1, arg2) {
1883
+ const ret = makeMutClosure(arg0, arg1, 1312, __wbg_adapter_54);
1870
1884
  return ret;
1871
1885
  };
1872
1886
  imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
package/index_bg.wasm CHANGED
Binary file
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bitcredit/bcr-ebill-wasm",
3
3
  "type": "module",
4
- "version": "0.3.1",
4
+ "version": "0.3.2",
5
5
  "files": [
6
6
  "index_bg.wasm",
7
7
  "index.js",