@pax2pay/client 0.10.29 → 0.10.30

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.
@@ -14,6 +14,12 @@ export class Notifications extends List<model.Notification.Response> {
14
14
  async save(request: model.Notification.InsertRequest): Promise<model.Notification.Response | model.ErrorResponse> {
15
15
  return await this.connection.post<model.Notification.Response>(`${this.folder}`, request)
16
16
  }
17
+ async update(
18
+ id: string,
19
+ request: model.Notification.UpdateRequest
20
+ ): Promise<model.Notification.Response | model.ErrorResponse> {
21
+ return await this.connection.put<model.Notification.Response>(`${this.folder}/${id}`, request)
22
+ }
17
23
  async markAsRead(id: string): Promise<model.Notification.Response | model.ErrorResponse> {
18
24
  return await this.connection.put<model.Notification.Response>(`${this.folder}/${id}/read`, undefined)
19
25
  }
@@ -7,6 +7,7 @@ export declare class Notifications extends List<model.Notification.Response> {
7
7
  constructor(connection: Connection);
8
8
  static create(connection: Connection): Notifications;
9
9
  save(request: model.Notification.InsertRequest): Promise<model.Notification.Response | model.ErrorResponse>;
10
+ update(id: string, request: model.Notification.UpdateRequest): Promise<model.Notification.Response | model.ErrorResponse>;
10
11
  markAsRead(id: string): Promise<model.Notification.Response | model.ErrorResponse>;
11
12
  get(id: string): Promise<model.Notification.Response | model.ErrorResponse>;
12
13
  delete(id: string): Promise<undefined | model.ErrorResponse>;
@@ -10,6 +10,9 @@ export class Notifications extends List {
10
10
  async save(request) {
11
11
  return await this.connection.post(`${this.folder}`, request);
12
12
  }
13
+ async update(id, request) {
14
+ return await this.connection.put(`${this.folder}/${id}`, request);
15
+ }
13
16
  async markAsRead(id) {
14
17
  return await this.connection.put(`${this.folder}/${id}/read`, undefined);
15
18
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"../","sources":["Client/Notifications/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAG9B,MAAM,OAAO,aAAc,SAAQ,IAAi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AI,CAAC,MAAM,IAAI,EAAE,EAAE,CAAC,CAAA;IACvE,CAAC;IACD,KAAK,CAAC,MAAM,CACX,QAAiD,EACjD,IAAa,EACb,IAAa,EACb,OAAe,gBAAgB;QAE/B,OAAO,MAAM,IAAI,CAAC,gBAAgB,CACjC,QAAQ,EACR,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,CACd,IAAI,CAAC,UAAU,CAAC,GAAG,CAEjB,GAAG,IAAI,CAAC,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAC1C,SAAS,EACT,IAAI,EACJ,IAAI,EACJ,IAAI,CACJ,CAAA;IACF,CAAC;IACD,KAAK,CAAC,iBAAiB;QACtB,OAAO,MAAM,IAAI,CAAC,UAAU,CAAC,GAAG,CAAS,GAAG,IAAI,CAAC,MAAM,SAAS,CAAC,CAAA;IAClE,CAAC;CACD"}
@@ -0,0 +1,13 @@
1
+ import { CreatableType } from "./CreatableType";
2
+ import { TargetRequest } from "./TargetRequest";
3
+ export interface UpdateRequest {
4
+ title?: string;
5
+ body?: string;
6
+ type?: CreatableType;
7
+ target?: TargetRequest[];
8
+ createDefault?: boolean;
9
+ }
10
+ export declare namespace UpdateRequest {
11
+ const type: import("isly/dist/types/object").IslyObject<UpdateRequest, object>;
12
+ const is: (value: UpdateRequest | any) => value is UpdateRequest;
13
+ }
@@ -0,0 +1,15 @@
1
+ import { isly } from "isly";
2
+ import { CreatableType } from "./CreatableType";
3
+ import { TargetRequest } from "./TargetRequest";
4
+ export var UpdateRequest;
5
+ (function (UpdateRequest) {
6
+ UpdateRequest.type = isly.object({
7
+ title: isly.string().optional(),
8
+ body: isly.string().optional(),
9
+ type: CreatableType.type.optional(),
10
+ target: TargetRequest.type.array().optional(),
11
+ createDefault: isly.boolean().optional(),
12
+ });
13
+ UpdateRequest.is = UpdateRequest.type.is;
14
+ })(UpdateRequest || (UpdateRequest = {}));
15
+ //# sourceMappingURL=UpdateRequest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UpdateRequest.js","sourceRoot":"../","sources":["model/Notification/UpdateRequest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAU/C,MAAM,KAAW,aAAa,CAS7B;AATD,WAAiB,aAAa;IAChB,kBAAI,GAAG,IAAI,CAAC,MAAM,CAAgB;QAC9C,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC/B,IAAI,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC9B,IAAI,EAAE,aAAa,CAAC,IAAI,CAAC,QAAQ,EAAE;QACnC,MAAM,EAAE,aAAa,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE;QAC7C,aAAa,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;KACxC,CAAC,CAAA;IACW,gBAAE,GAAG,cAAA,IAAI,CAAC,EAAE,CAAA;AAC1B,CAAC,EATgB,aAAa,KAAb,aAAa,QAS7B"}
@@ -5,6 +5,7 @@ import { Response as NotificationResponse } from "./Response";
5
5
  import { Tag as NotificationTag } from "./Tag";
6
6
  import { TargetRequest as NotificationTargetRequest } from "./TargetRequest";
7
7
  import { Type as NotificationType } from "./Type";
8
+ import { UpdateRequest as NotificationUpdateRequest } from "./UpdateRequest";
8
9
  export declare namespace Notification {
9
10
  export import Format = NotificationFormat;
10
11
  export import InsertRequest = NotificationInsertRequest;
@@ -13,4 +14,5 @@ export declare namespace Notification {
13
14
  export import TargetRequest = NotificationTargetRequest;
14
15
  export import Type = NotificationType;
15
16
  export import CreatableType = NotificationCreatableType;
17
+ export import UpdateRequest = NotificationUpdateRequest;
16
18
  }
@@ -5,6 +5,7 @@ import { Response as NotificationResponse } from "./Response";
5
5
  import { Tag as NotificationTag } from "./Tag";
6
6
  import { TargetRequest as NotificationTargetRequest } from "./TargetRequest";
7
7
  import { Type as NotificationType } from "./Type";
8
+ import { UpdateRequest as NotificationUpdateRequest } from "./UpdateRequest";
8
9
  export var Notification;
9
10
  (function (Notification) {
10
11
  Notification.Format = NotificationFormat;
@@ -14,5 +15,6 @@ export var Notification;
14
15
  Notification.TargetRequest = NotificationTargetRequest;
15
16
  Notification.Type = NotificationType;
16
17
  Notification.CreatableType = NotificationCreatableType;
18
+ Notification.UpdateRequest = NotificationUpdateRequest;
17
19
  })(Notification || (Notification = {}));
18
20
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"../","sources":["model/Notification/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,IAAI,yBAAyB,EAAE,MAAM,iBAAiB,CAAA;AAC5E,OAAO,EAAE,MAAM,IAAI,kBAAkB,EAAE,MAAM,UAAU,CAAA;AACvD,OAAO,EAAE,aAAa,IAAI,yBAAyB,EAAE,MAAM,iBAAiB,CAAA;AAC5E,OAAO,EAAE,QAAQ,IAAI,oBAAoB,EAAE,MAAM,YAAY,CAAA;AAC7D,OAAO,EAAE,GAAG,IAAI,eAAe,EAAE,MAAM,OAAO,CAAA;AAC9C,OAAO,EAAE,aAAa,IAAI,yBAAyB,EAAE,MAAM,iBAAiB,CAAA;AAC5E,OAAO,EAAE,IAAI,IAAI,gBAAgB,EAAE,MAAM,QAAQ,CAAA;AAEjD,MAAM,KAAW,YAAY,CAQ5B;AARD,WAAiB,YAAY;IACd,mBAAM,GAAG,kBAAkB,CAAA;IAC3B,0BAAa,GAAG,yBAAyB,CAAA;IACzC,qBAAQ,GAAG,oBAAoB,CAAA;IAC/B,gBAAG,GAAG,eAAe,CAAA;IACrB,0BAAa,GAAG,yBAAyB,CAAA;IACzC,iBAAI,GAAG,gBAAgB,CAAA;IACvB,0BAAa,GAAG,yBAAyB,CAAA;AACxD,CAAC,EARgB,YAAY,KAAZ,YAAY,QAQ5B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"../","sources":["model/Notification/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,IAAI,yBAAyB,EAAE,MAAM,iBAAiB,CAAA;AAC5E,OAAO,EAAE,MAAM,IAAI,kBAAkB,EAAE,MAAM,UAAU,CAAA;AACvD,OAAO,EAAE,aAAa,IAAI,yBAAyB,EAAE,MAAM,iBAAiB,CAAA;AAC5E,OAAO,EAAE,QAAQ,IAAI,oBAAoB,EAAE,MAAM,YAAY,CAAA;AAC7D,OAAO,EAAE,GAAG,IAAI,eAAe,EAAE,MAAM,OAAO,CAAA;AAC9C,OAAO,EAAE,aAAa,IAAI,yBAAyB,EAAE,MAAM,iBAAiB,CAAA;AAC5E,OAAO,EAAE,IAAI,IAAI,gBAAgB,EAAE,MAAM,QAAQ,CAAA;AACjD,OAAO,EAAE,aAAa,IAAI,yBAAyB,EAAE,MAAM,iBAAiB,CAAA;AAE5E,MAAM,KAAW,YAAY,CAS5B;AATD,WAAiB,YAAY;IACd,mBAAM,GAAG,kBAAkB,CAAA;IAC3B,0BAAa,GAAG,yBAAyB,CAAA;IACzC,qBAAQ,GAAG,oBAAoB,CAAA;IAC/B,gBAAG,GAAG,eAAe,CAAA;IACrB,0BAAa,GAAG,yBAAyB,CAAA;IACzC,iBAAI,GAAG,gBAAgB,CAAA;IACvB,0BAAa,GAAG,yBAAyB,CAAA;IACzC,0BAAa,GAAG,yBAAyB,CAAA;AACxD,CAAC,EATgB,YAAY,KAAZ,YAAY,QAS5B"}
@@ -0,0 +1,22 @@
1
+ import { isly } from "isly"
2
+ import { CreatableType } from "./CreatableType"
3
+ import { TargetRequest } from "./TargetRequest"
4
+
5
+ export interface UpdateRequest {
6
+ title?: string
7
+ body?: string
8
+ type?: CreatableType
9
+ target?: TargetRequest[]
10
+ createDefault?: boolean
11
+ }
12
+
13
+ export namespace UpdateRequest {
14
+ export const type = isly.object<UpdateRequest>({
15
+ title: isly.string().optional(),
16
+ body: isly.string().optional(),
17
+ type: CreatableType.type.optional(),
18
+ target: TargetRequest.type.array().optional(),
19
+ createDefault: isly.boolean().optional(),
20
+ })
21
+ export const is = type.is
22
+ }
@@ -5,6 +5,7 @@ import { Response as NotificationResponse } from "./Response"
5
5
  import { Tag as NotificationTag } from "./Tag"
6
6
  import { TargetRequest as NotificationTargetRequest } from "./TargetRequest"
7
7
  import { Type as NotificationType } from "./Type"
8
+ import { UpdateRequest as NotificationUpdateRequest } from "./UpdateRequest"
8
9
 
9
10
  export namespace Notification {
10
11
  export import Format = NotificationFormat
@@ -14,4 +15,5 @@ export namespace Notification {
14
15
  export import TargetRequest = NotificationTargetRequest
15
16
  export import Type = NotificationType
16
17
  export import CreatableType = NotificationCreatableType
18
+ export import UpdateRequest = NotificationUpdateRequest
17
19
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pax2pay/client",
3
- "version": "0.10.29",
3
+ "version": "0.10.30",
4
4
  "description": "Client library for the Pax2Pay API",
5
5
  "author": "Pax2Pay Ltd.",
6
6
  "license": "MIT",