@juhuu/sdk-ts 1.0.9 → 1.1.1

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/index.d.mts CHANGED
@@ -569,7 +569,7 @@ declare class UsersService extends Service {
569
569
 
570
570
  declare class PaymentsService extends Service {
571
571
  constructor(config: JUHUU.SetupConfig);
572
- create(): Promise<void>;
572
+ list(PaymentListParams: JUHUU.Payment.List.Params, PaymentListOptions?: JUHUU.Payment.List.Options): Promise<JUHUU.HttpResponse<JUHUU.Payment.List.Response>>;
573
573
  retrieve(PaymentRetrieveParams: JUHUU.Payment.Retrieve.Params, PaymentRetrieveOptions?: JUHUU.Payment.Retrieve.Options): Promise<JUHUU.HttpResponse<JUHUU.Payment.Retrieve.Response>>;
574
574
  tokens(PaymentTokensParams: JUHUU.Payment.Tokens.Params, PaymentTokensOptions?: JUHUU.Payment.Tokens.Options): Promise<JUHUU.HttpResponse<JUHUU.Payment.Tokens.Response>>;
575
575
  update(): Promise<void>;
@@ -579,7 +579,7 @@ declare class PaymentsService extends Service {
579
579
 
580
580
  declare class PropertiesService extends Service {
581
581
  constructor(config: JUHUU.SetupConfig);
582
- create(): Promise<void>;
582
+ create(PropertyCreateParams: JUHUU.Property.Create.Params, PropertyCreateOptions?: JUHUU.Property.Create.Options): Promise<JUHUU.HttpResponse<JUHUU.Property.Create.Response>>;
583
583
  retrieve(PropertyRetrieveParams: JUHUU.Property.Retrieve.Params, PropertyRetrieveOptions?: JUHUU.Property.Retrieve.Options): Promise<JUHUU.HttpResponse<JUHUU.Property.Retrieve.Response>>;
584
584
  list(PropertyListParams: JUHUU.Property.List.Params, PropertyListOptions?: JUHUU.Property.List.Options): Promise<JUHUU.HttpResponse<JUHUU.Property.List.Response>>;
585
585
  update(): Promise<void>;
@@ -1107,6 +1107,17 @@ declare namespace JUHUU {
1107
1107
  type: "external";
1108
1108
  }
1109
1109
  export type Object = Internal | External;
1110
+ export namespace Create {
1111
+ type Params = {
1112
+ userId?: string;
1113
+ name: string;
1114
+ type?: Object["type"];
1115
+ };
1116
+ type Options = {};
1117
+ type Response = {
1118
+ property: JUHUU.Property.Object;
1119
+ };
1120
+ }
1110
1121
  export namespace Retrieve {
1111
1122
  type Params = {
1112
1123
  propertyId: string;
@@ -1239,6 +1250,15 @@ declare namespace JUHUU {
1239
1250
  property?: JUHUU.Property.Object;
1240
1251
  };
1241
1252
  }
1253
+ namespace List {
1254
+ type Params = {
1255
+ propertyId?: string;
1256
+ userId?: string;
1257
+ statusArray?: JUHUU.Payment.Object["status"][];
1258
+ };
1259
+ type Options = JUHUU.RequestOptions;
1260
+ type Response = JUHUU.Payment.Object[];
1261
+ }
1242
1262
  namespace RetrieveInvoiceUrl {
1243
1263
  type Params = {
1244
1264
  paymentId: string;
package/dist/index.d.ts CHANGED
@@ -569,7 +569,7 @@ declare class UsersService extends Service {
569
569
 
570
570
  declare class PaymentsService extends Service {
571
571
  constructor(config: JUHUU.SetupConfig);
572
- create(): Promise<void>;
572
+ list(PaymentListParams: JUHUU.Payment.List.Params, PaymentListOptions?: JUHUU.Payment.List.Options): Promise<JUHUU.HttpResponse<JUHUU.Payment.List.Response>>;
573
573
  retrieve(PaymentRetrieveParams: JUHUU.Payment.Retrieve.Params, PaymentRetrieveOptions?: JUHUU.Payment.Retrieve.Options): Promise<JUHUU.HttpResponse<JUHUU.Payment.Retrieve.Response>>;
574
574
  tokens(PaymentTokensParams: JUHUU.Payment.Tokens.Params, PaymentTokensOptions?: JUHUU.Payment.Tokens.Options): Promise<JUHUU.HttpResponse<JUHUU.Payment.Tokens.Response>>;
575
575
  update(): Promise<void>;
@@ -579,7 +579,7 @@ declare class PaymentsService extends Service {
579
579
 
580
580
  declare class PropertiesService extends Service {
581
581
  constructor(config: JUHUU.SetupConfig);
582
- create(): Promise<void>;
582
+ create(PropertyCreateParams: JUHUU.Property.Create.Params, PropertyCreateOptions?: JUHUU.Property.Create.Options): Promise<JUHUU.HttpResponse<JUHUU.Property.Create.Response>>;
583
583
  retrieve(PropertyRetrieveParams: JUHUU.Property.Retrieve.Params, PropertyRetrieveOptions?: JUHUU.Property.Retrieve.Options): Promise<JUHUU.HttpResponse<JUHUU.Property.Retrieve.Response>>;
584
584
  list(PropertyListParams: JUHUU.Property.List.Params, PropertyListOptions?: JUHUU.Property.List.Options): Promise<JUHUU.HttpResponse<JUHUU.Property.List.Response>>;
585
585
  update(): Promise<void>;
@@ -1107,6 +1107,17 @@ declare namespace JUHUU {
1107
1107
  type: "external";
1108
1108
  }
1109
1109
  export type Object = Internal | External;
1110
+ export namespace Create {
1111
+ type Params = {
1112
+ userId?: string;
1113
+ name: string;
1114
+ type?: Object["type"];
1115
+ };
1116
+ type Options = {};
1117
+ type Response = {
1118
+ property: JUHUU.Property.Object;
1119
+ };
1120
+ }
1110
1121
  export namespace Retrieve {
1111
1122
  type Params = {
1112
1123
  propertyId: string;
@@ -1239,6 +1250,15 @@ declare namespace JUHUU {
1239
1250
  property?: JUHUU.Property.Object;
1240
1251
  };
1241
1252
  }
1253
+ namespace List {
1254
+ type Params = {
1255
+ propertyId?: string;
1256
+ userId?: string;
1257
+ statusArray?: JUHUU.Payment.Object["status"][];
1258
+ };
1259
+ type Options = JUHUU.RequestOptions;
1260
+ type Response = JUHUU.Payment.Object[];
1261
+ }
1242
1262
  namespace RetrieveInvoiceUrl {
1243
1263
  type Params = {
1244
1264
  paymentId: string;
package/dist/index.js CHANGED
@@ -569,7 +569,26 @@ var PaymentsService = class extends Service {
569
569
  constructor(config) {
570
570
  super(config);
571
571
  }
572
- async create() {
572
+ async list(PaymentListParams, PaymentListOptions) {
573
+ const queryArray = [];
574
+ if (PaymentListParams.userId !== void 0) {
575
+ queryArray.push("userId=" + PaymentListParams.userId);
576
+ }
577
+ if (PaymentListParams.propertyId !== void 0) {
578
+ queryArray.push("propertyId=" + PaymentListParams.propertyId);
579
+ }
580
+ if (PaymentListParams.statusArray !== void 0) {
581
+ queryArray.push("statusArray=" + PaymentListParams.statusArray.join(","));
582
+ }
583
+ return await super.sendRequest(
584
+ {
585
+ method: "GET",
586
+ url: "payments?" + queryArray.join("&"),
587
+ body: void 0,
588
+ useAuthentication: true
589
+ },
590
+ PaymentListOptions
591
+ );
573
592
  }
574
593
  async retrieve(PaymentRetrieveParams, PaymentRetrieveOptions) {
575
594
  const queryArray = [];
@@ -614,7 +633,18 @@ var PropertiesService = class extends Service {
614
633
  constructor(config) {
615
634
  super(config);
616
635
  }
617
- async create() {
636
+ async create(PropertyCreateParams, PropertyCreateOptions) {
637
+ const queryArray = [];
638
+ return await super.sendRequest({
639
+ method: "POST",
640
+ url: "properties",
641
+ body: {
642
+ userId: PropertyCreateParams.userId,
643
+ name: PropertyCreateParams.name,
644
+ type: PropertyCreateParams.type
645
+ },
646
+ useAuthentication: true
647
+ });
618
648
  }
619
649
  async retrieve(PropertyRetrieveParams, PropertyRetrieveOptions) {
620
650
  const queryArray = [];
package/dist/index.mjs CHANGED
@@ -524,7 +524,26 @@ var PaymentsService = class extends Service {
524
524
  constructor(config) {
525
525
  super(config);
526
526
  }
527
- async create() {
527
+ async list(PaymentListParams, PaymentListOptions) {
528
+ const queryArray = [];
529
+ if (PaymentListParams.userId !== void 0) {
530
+ queryArray.push("userId=" + PaymentListParams.userId);
531
+ }
532
+ if (PaymentListParams.propertyId !== void 0) {
533
+ queryArray.push("propertyId=" + PaymentListParams.propertyId);
534
+ }
535
+ if (PaymentListParams.statusArray !== void 0) {
536
+ queryArray.push("statusArray=" + PaymentListParams.statusArray.join(","));
537
+ }
538
+ return await super.sendRequest(
539
+ {
540
+ method: "GET",
541
+ url: "payments?" + queryArray.join("&"),
542
+ body: void 0,
543
+ useAuthentication: true
544
+ },
545
+ PaymentListOptions
546
+ );
528
547
  }
529
548
  async retrieve(PaymentRetrieveParams, PaymentRetrieveOptions) {
530
549
  const queryArray = [];
@@ -569,7 +588,18 @@ var PropertiesService = class extends Service {
569
588
  constructor(config) {
570
589
  super(config);
571
590
  }
572
- async create() {
591
+ async create(PropertyCreateParams, PropertyCreateOptions) {
592
+ const queryArray = [];
593
+ return await super.sendRequest({
594
+ method: "POST",
595
+ url: "properties",
596
+ body: {
597
+ userId: PropertyCreateParams.userId,
598
+ name: PropertyCreateParams.name,
599
+ type: PropertyCreateParams.type
600
+ },
601
+ useAuthentication: true
602
+ });
573
603
  }
574
604
  async retrieve(PropertyRetrieveParams, PropertyRetrieveOptions) {
575
605
  const queryArray = [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@juhuu/sdk-ts",
3
- "version": "1.0.9",
3
+ "version": "1.1.001",
4
4
  "description": "Typescript wrapper for juhuu services",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",