@juhuu/sdk-ts 1.0.8 → 1.1.0

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
@@ -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;
package/dist/index.d.ts CHANGED
@@ -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;
package/dist/index.js CHANGED
@@ -288,7 +288,7 @@ var SessionService = class extends Service {
288
288
  return await super.sendRequest(
289
289
  {
290
290
  method: "POST",
291
- url: "sessions",
291
+ url: "sessions/export",
292
292
  body: {
293
293
  propertyId: SessionExportParams.propertyId,
294
294
  outputType: SessionExportParams.outputType
@@ -614,7 +614,18 @@ var PropertiesService = class extends Service {
614
614
  constructor(config) {
615
615
  super(config);
616
616
  }
617
- async create() {
617
+ async create(PropertyCreateParams, PropertyCreateOptions) {
618
+ const queryArray = [];
619
+ return await super.sendRequest({
620
+ method: "POST",
621
+ url: "properties",
622
+ body: {
623
+ userId: PropertyCreateParams.userId,
624
+ name: PropertyCreateParams.name,
625
+ type: PropertyCreateParams.type
626
+ },
627
+ useAuthentication: true
628
+ });
618
629
  }
619
630
  async retrieve(PropertyRetrieveParams, PropertyRetrieveOptions) {
620
631
  const queryArray = [];
package/dist/index.mjs CHANGED
@@ -243,7 +243,7 @@ var SessionService = class extends Service {
243
243
  return await super.sendRequest(
244
244
  {
245
245
  method: "POST",
246
- url: "sessions",
246
+ url: "sessions/export",
247
247
  body: {
248
248
  propertyId: SessionExportParams.propertyId,
249
249
  outputType: SessionExportParams.outputType
@@ -569,7 +569,18 @@ var PropertiesService = class extends Service {
569
569
  constructor(config) {
570
570
  super(config);
571
571
  }
572
- async create() {
572
+ async create(PropertyCreateParams, PropertyCreateOptions) {
573
+ const queryArray = [];
574
+ return await super.sendRequest({
575
+ method: "POST",
576
+ url: "properties",
577
+ body: {
578
+ userId: PropertyCreateParams.userId,
579
+ name: PropertyCreateParams.name,
580
+ type: PropertyCreateParams.type
581
+ },
582
+ useAuthentication: true
583
+ });
573
584
  }
574
585
  async retrieve(PropertyRetrieveParams, PropertyRetrieveOptions) {
575
586
  const queryArray = [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@juhuu/sdk-ts",
3
- "version": "1.0.8",
3
+ "version": "1.1.000",
4
4
  "description": "Typescript wrapper for juhuu services",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",