btrz-api-client 8.1.0 → 8.2.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.
@@ -65,6 +65,21 @@ function notifyTicketFactory(_ref) {
65
65
  headers: authorizationHeaders({ token: token, jwtToken: jwtToken, internalAuthTokenProvider: internalAuthTokenProvider, headers: headers })
66
66
  });
67
67
  }
68
+ },
69
+ manifest: {
70
+ create: function create(_ref5) {
71
+ var token = _ref5.token,
72
+ jwtToken = _ref5.jwtToken,
73
+ data = _ref5.data,
74
+ headers = _ref5.headers;
75
+
76
+ return client({
77
+ url: "/notify-manifest",
78
+ method: "post",
79
+ data: data,
80
+ headers: authorizationHeaders({ token: token, jwtToken: jwtToken, internalAuthTokenProvider: internalAuthTokenProvider, headers: headers })
81
+ });
82
+ }
68
83
  }
69
84
  };
70
85
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "btrz-api-client",
3
- "version": "8.1.0",
3
+ "version": "8.2.0",
4
4
  "description": "Api client for Betterez endpoints",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -43,6 +43,16 @@ function notifyTicketFactory({
43
43
  headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers})
44
44
  });
45
45
  }
46
+ },
47
+ manifest: {
48
+ create({token, jwtToken, data, headers}) {
49
+ return client({
50
+ url: "/notify-manifest",
51
+ method: "post",
52
+ data,
53
+ headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers})
54
+ });
55
+ }
46
56
  }
47
57
  };
48
58
  }
@@ -75,3 +75,28 @@ describe("notifications/notify-child-user", () => {
75
75
  });
76
76
  });
77
77
  });
78
+
79
+ describe("notifications/notify-manifest", () => {
80
+ const token = "my-api-key";
81
+ const jwtToken = "my-jwt";
82
+
83
+ afterEach(() => {
84
+ axiosMock.reset();
85
+ });
86
+
87
+ it("should post a notification for manifest", () => {
88
+ axiosMock.onPost("/notify-manifest").reply(({headers}) => {
89
+ if (headers["x-api-key"] === token && headers.authorization === `Bearer ${jwtToken}`) {
90
+ return [200];
91
+ }
92
+ return [403];
93
+ });
94
+
95
+ return api.notifications.notify.manifest.create({
96
+ token,
97
+ jwtToken,
98
+ data: {},
99
+ headers: {}
100
+ });
101
+ });
102
+ });
package/types/client.d.ts CHANGED
@@ -4452,6 +4452,14 @@ export function createApiClient(options: {
4452
4452
  headers: any;
4453
4453
  }): any;
4454
4454
  };
4455
+ manifest: {
4456
+ create({ token, jwtToken, data, headers }: {
4457
+ token: any;
4458
+ jwtToken: any;
4459
+ data: any;
4460
+ headers: any;
4461
+ }): any;
4462
+ };
4455
4463
  };
4456
4464
  ordersRulesValidations: {
4457
4465
  create: ({ token, jwtToken, query, orderRulesValidation, headers }: {
@@ -32,4 +32,12 @@ declare function notifyTicketFactory({ client, internalAuthTokenProvider }: {
32
32
  headers: any;
33
33
  }): any;
34
34
  };
35
+ manifest: {
36
+ create({ token, jwtToken, data, headers }: {
37
+ token: any;
38
+ jwtToken: any;
39
+ data: any;
40
+ headers: any;
41
+ }): any;
42
+ };
35
43
  };
@@ -4406,6 +4406,14 @@ declare const _exports: {
4406
4406
  headers: any;
4407
4407
  }): any;
4408
4408
  };
4409
+ manifest: {
4410
+ create({ token, jwtToken, data, headers }: {
4411
+ token: any;
4412
+ jwtToken: any;
4413
+ data: any;
4414
+ headers: any;
4415
+ }): any;
4416
+ };
4409
4417
  };
4410
4418
  ordersRulesValidations: {
4411
4419
  create: ({ token, jwtToken, query, orderRulesValidation, headers }: {