shred-api-client 1.11.3 → 1.12.1-rc.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.
@@ -6,8 +6,6 @@ declare class UserAPI implements UserAPISchema {
6
6
  private clientHTTP;
7
7
  constructor(env: Environment);
8
8
  deleteAccount(ctx: Context): Promise<boolean>;
9
- createIntegrationToken(ctx: Context): Promise<string>;
10
- getIntegrationToken(ctx: Context): Promise<string | null>;
11
9
  sendValidationCode(email: string): Promise<boolean>;
12
10
  changePassword(email: string, pass: string, passConfirm: string, code: number): Promise<boolean>;
13
11
  changeEmail(ctx: Context, email: string, code: number): Promise<boolean>;
@@ -15,16 +15,6 @@ class UserAPI {
15
15
  const data = await this.clientHTTP.makeRequest(this.env, endpointData.uri, endpointData.method, null, ctx);
16
16
  return data.success;
17
17
  }
18
- async createIntegrationToken(ctx) {
19
- const endpointData = User_schema_1.UserEndpoints.CreateToken;
20
- const data = await this.clientHTTP.makeRequest(this.env, `${endpointData.uri}`, endpointData.method, null, ctx);
21
- return data.token;
22
- }
23
- async getIntegrationToken(ctx) {
24
- const endpointData = User_schema_1.UserEndpoints.GetIntegrationToken;
25
- const data = await this.clientHTTP.makeRequest(this.env, `${endpointData.uri}`, endpointData.method, null, ctx);
26
- return data.token;
27
- }
28
18
  async sendValidationCode(email) {
29
19
  const endpointData = User_schema_1.UserEndpoints.SendValidationCode;
30
20
  const data = await this.clientHTTP.makeRequest(this.env, `${endpointData.uri}?email=${email}`, endpointData.method);
package/dist/index.d.ts CHANGED
@@ -1,7 +1,5 @@
1
- import { ShredAPI } from "./model/Api";
2
1
  import { Role, System } from "./model/User.schema";
3
- import { Status as ProjectStatus } from "./model/Project.schema";
2
+ import { Status as ProjectStatus, Styles, CaptionStyle } from "./model/Project.schema";
4
3
  import Exceptions from "./model/exceptions/";
5
- export { Role, System, Exceptions, ProjectStatus };
6
- export default ShredAPI;
4
+ export { Role, System, Exceptions, ProjectStatus, Styles, CaptionStyle };
7
5
  export * from "./namespace";
package/dist/index.js CHANGED
@@ -17,14 +17,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
17
17
  return (mod && mod.__esModule) ? mod : { "default": mod };
18
18
  };
19
19
  Object.defineProperty(exports, "__esModule", { value: true });
20
- exports.ProjectStatus = exports.Exceptions = exports.System = exports.Role = void 0;
21
- const Api_1 = require("./model/Api");
20
+ exports.CaptionStyle = exports.Styles = exports.ProjectStatus = exports.Exceptions = exports.System = exports.Role = void 0;
22
21
  const User_schema_1 = require("./model/User.schema");
23
22
  Object.defineProperty(exports, "Role", { enumerable: true, get: function () { return User_schema_1.Role; } });
24
23
  Object.defineProperty(exports, "System", { enumerable: true, get: function () { return User_schema_1.System; } });
25
24
  const Project_schema_1 = require("./model/Project.schema");
26
25
  Object.defineProperty(exports, "ProjectStatus", { enumerable: true, get: function () { return Project_schema_1.Status; } });
26
+ Object.defineProperty(exports, "Styles", { enumerable: true, get: function () { return Project_schema_1.Styles; } });
27
+ Object.defineProperty(exports, "CaptionStyle", { enumerable: true, get: function () { return Project_schema_1.CaptionStyle; } });
27
28
  const exceptions_1 = __importDefault(require("./model/exceptions/"));
28
29
  exports.Exceptions = exceptions_1.default;
29
- exports.default = Api_1.ShredAPI;
30
30
  __exportStar(require("./namespace"), exports);
@@ -79,12 +79,14 @@ export declare enum Status {
79
79
  CANCELLED = 6,
80
80
  SCHEDULED = 7
81
81
  }
82
- declare enum CaptionStyle {
83
- ONE_LINE = 1,
84
- ONE_LINE_EMOJIS = 2,
85
- TWO_LINES_EMOJIS = 3,
86
- HOME_HIGHLIGHT = 4
82
+ export declare enum CaptionStyle {
83
+ ONE_LINE = "1",
84
+ ONE_LINE_EMOJIS = "2",
85
+ TWO_LINES = "5",
86
+ TWO_LINES_EMOJIS = "3",
87
+ HOME_HIGHLIGHT = "4"
87
88
  }
89
+ export declare const Styles: Record<CaptionStyle, string>;
88
90
  type DenyFeedback = {
89
91
  timestamp: number;
90
92
  feedback: string;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ProjectEndpoints = exports.Status = void 0;
3
+ exports.ProjectEndpoints = exports.Styles = exports.CaptionStyle = exports.Status = void 0;
4
4
  const ProjectEndpoints = {
5
5
  List: {
6
6
  uri: "/projects/list",
@@ -57,8 +57,16 @@ var Status;
57
57
  })(Status || (exports.Status = Status = {}));
58
58
  var CaptionStyle;
59
59
  (function (CaptionStyle) {
60
- CaptionStyle[CaptionStyle["ONE_LINE"] = 1] = "ONE_LINE";
61
- CaptionStyle[CaptionStyle["ONE_LINE_EMOJIS"] = 2] = "ONE_LINE_EMOJIS";
62
- CaptionStyle[CaptionStyle["TWO_LINES_EMOJIS"] = 3] = "TWO_LINES_EMOJIS";
63
- CaptionStyle[CaptionStyle["HOME_HIGHLIGHT"] = 4] = "HOME_HIGHLIGHT";
64
- })(CaptionStyle || (CaptionStyle = {}));
60
+ CaptionStyle["ONE_LINE"] = "1";
61
+ CaptionStyle["ONE_LINE_EMOJIS"] = "2";
62
+ CaptionStyle["TWO_LINES"] = "5";
63
+ CaptionStyle["TWO_LINES_EMOJIS"] = "3";
64
+ CaptionStyle["HOME_HIGHLIGHT"] = "4";
65
+ })(CaptionStyle || (exports.CaptionStyle = CaptionStyle = {}));
66
+ exports.Styles = {
67
+ [CaptionStyle.ONE_LINE]: "One Line",
68
+ [CaptionStyle.ONE_LINE_EMOJIS]: "One Line + Emojis",
69
+ [CaptionStyle.TWO_LINES]: "Two Lines",
70
+ [CaptionStyle.TWO_LINES_EMOJIS]: "Two Lines + Emojis",
71
+ [CaptionStyle.HOME_HIGHLIGHT]: "Home Highlight",
72
+ };
@@ -12,8 +12,6 @@ interface UserAPISchema {
12
12
  setup: (context: Context) => Promise<boolean>;
13
13
  getBindedUsers: (ctx: Context) => Promise<User[]>;
14
14
  deleteAccount: (ctx: Context) => Promise<boolean>;
15
- getIntegrationToken: (ctx: Context) => Promise<string | null>;
16
- createIntegrationToken: (ctx: Context) => Promise<string>;
17
15
  createUser: (email: string, name: string, password: string, passwordConfirmation: string, profession: string | null, invitationCode: string | null) => Promise<User>;
18
16
  }
19
17
  declare const UserEndpoints: {
@@ -41,14 +39,6 @@ declare const UserEndpoints: {
41
39
  uri: string;
42
40
  method: string;
43
41
  };
44
- GetIntegrationToken: {
45
- uri: string;
46
- method: string;
47
- };
48
- CreateToken: {
49
- uri: string;
50
- method: string;
51
- };
52
42
  ConfirmCode: {
53
43
  uri: string;
54
44
  method: string;
@@ -26,14 +26,6 @@ const UserEndpoints = {
26
26
  uri: "/accounts/public/email/avaliable",
27
27
  method: "GET",
28
28
  },
29
- GetIntegrationToken: {
30
- uri: "/accounts/user/getToken/",
31
- method: "GET",
32
- },
33
- CreateToken: {
34
- uri: "/accounts/user/createToken/",
35
- method: "POST",
36
- },
37
29
  ConfirmCode: {
38
30
  uri: "/accounts/public/email/validate",
39
31
  method: "POST",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shred-api-client",
3
- "version": "1.11.3",
3
+ "version": "1.12.1-rc.2",
4
4
  "description": "API Client for Shred",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",