@or-sdk/hitl 0.30.5 → 0.30.6-beta.713.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.
@@ -57,6 +57,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
57
57
  exports.Migrations = void 0;
58
58
  var lodash_1 = __importDefault(require("lodash"));
59
59
  var HITLBase_1 = require("./HITLBase");
60
+ var urijs_1 = __importDefault(require("urijs"));
60
61
  var Migrations = (function (_super) {
61
62
  __extends(Migrations, _super);
62
63
  function Migrations() {
@@ -91,7 +92,21 @@ var Migrations = (function (_super) {
91
92
  });
92
93
  });
93
94
  };
95
+ Migrations.createTableDefaultRecords = function () {
96
+ return __awaiter(this, void 0, void 0, function () {
97
+ var baseUrl, route;
98
+ return __generator(this, function (_a) {
99
+ baseUrl = this.getBaseUrl({});
100
+ route = new urijs_1.default(baseUrl).segment(this.CREATE_DEFAULT_RECORDS_URL).href();
101
+ return [2, this.request({
102
+ route: route,
103
+ method: 'POST',
104
+ })];
105
+ });
106
+ });
107
+ };
94
108
  Migrations.MODULE_URL = 'migrations';
109
+ Migrations.CREATE_DEFAULT_RECORDS_URL = 'default-records';
95
110
  return Migrations;
96
111
  }(HITLBase_1.HITLBase));
97
112
  exports.Migrations = Migrations;
@@ -1 +1 @@
1
- {"version":3,"file":"Migrations.js","sourceRoot":"","sources":["../../../src/api/Migrations.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAAuB;AAOvB,uCAAsC;AAEtC;IAAgC,8BAAQ;IAAxC;;IA2BA,CAAC;IAxBqB,8BAAmB,GAAvC,UACE,OAAkC;QAAlC,wBAAA,EAAA,YAAkC;;;;gBAE5B,KAAK,GAAG,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;gBACjC,MAAM,GAAG,gBAAC,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,YAAY,CAAC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U,CAAC,OAAO,CAAC,CAAC;gBACjC,MAAM,GAAG,gBAAC,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,MAAM,EAAE,QAAQ,EAAE,YAAY,CAAC,CAAC,CAAC;gBAEjE,WAAO,IAAI,CAAC,OAAO,CAAC;wBAClB,KAAK,OAAA;wBACL,MAAM,EAAE,MAAM;wBACd,MAAM,QAAA;qBACP,CAAC,EAAC;;;KACJ;IAEmB,oCAAyB,GAA7C;;;;gBACQ,OAAO,GAAG,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;gBAC9B,KAAK,GAAG,IAAI,eAAG,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,0BAA0B,CAAC,CAAC,IAAI,EAAE,CAAC;gBAE/E,WAAO,IAAI,CAAC,OAAO,CAAC;wBAClB,KAAK,OAAA;wBACL,MAAM,EAAE,MAAM;qBACf,CAAC,EAAC;;;KACJ;IApCyB,qBAAU,GAAG,YAAY,CAAC;IACnC,qCAA0B,GAAG,iBAAiB,CAAC;IAoClE,iBAAC;CAAA,AAtCD,CAAgC,mBAAQ,GAsCvC;AAtCY,gCAAU"}
@@ -9,6 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  };
10
10
  import _ from 'lodash';
11
11
  import { HITLBase } from './HITLBase';
12
+ import URI from 'urijs';
12
13
  export class Migrations extends HITLBase {
13
14
  static getListOfMigrations(options = {}) {
14
15
  return __awaiter(this, void 0, void 0, function* () {
@@ -31,6 +32,17 @@ export class Migrations extends HITLBase {
31
32
  });
32
33
  });
33
34
  }
35
+ static createTableDefaultRecords() {
36
+ return __awaiter(this, void 0, void 0, function* () {
37
+ const baseUrl = this.getBaseUrl({});
38
+ const route = new URI(baseUrl).segment(this.CREATE_DEFAULT_RECORDS_URL).href();
39
+ return this.request({
40
+ route,
41
+ method: 'POST',
42
+ });
43
+ });
44
+ }
34
45
  }
35
46
  Migrations.MODULE_URL = 'migrations';
47
+ Migrations.CREATE_DEFAULT_RECORDS_URL = 'default-records';
36
48
  //# sourceMappingURL=Migrations.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Migrations.js","sourceRoot":"","sources":["../../../src/api/Migrations.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,CAAC,MAAM,QAAQ,CAAC;AAOvB,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,MAAM,OAAO,UAAW,SAAQ,QAAQ;IAG/B,MAAM,CAAO,mBAAmB,CACrC,UAAgC,EAAE;;YAElC,MAAM,KAAK,GAAG,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;YACvC,MAAM,MAAM,GAAG,CAAC,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC;YAE/C,OAAO,IAAI,CAAC,OAAO,CAAC;gBAClB,KAAK;gBACL,MAAM;aACP,CAAC,CAAC;QACL,CAAC;KAAA;IAEM,MAAM,CAAO,gBAAgB,CAClC,UAAgC,EAAE;;YAElC,MAAM,KAAK,GAAG,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;YACvC,MAAM,MAAM,GAAG,CAAC,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,MAAM,EAAE,QAAQ,EAAE,YAAY,CAAC,CAAC,CAAC;YAEjE,OAAO,IAAI,CAAC,OAAO,CAAC;gBAClB,KAAK;gBACL,MAAM,EAAE,MAAM;gBACd,MAAM;aACP,CAAC,CAAC;QACL,CAAC;KAAA;;AAzByB,qBAAU,GAAG,YAAY,CAAC"}
1
+ {"version":3,"file":"Migrations.js","sourceRoot":"","sources":["../../../src/api/Migrations.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,CAAC,MAAM,QAAQ,CAAC;AAQvB,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,GAAG,MAAM,OAAO,CAAC;AAExB,MAAM,OAAO,UAAW,SAAQ,QAAQ;IAI/B,MAAM,CAAO,mBAAmB,CACrC,UAAgC,EAAE;;YAElC,MAAM,KAAK,GAAG,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;YACvC,MAAM,MAAM,GAAG,CAAC,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC;YAE/C,OAAO,IAAI,CAAC,OAAO,CAAC;gBAClB,KAAK;gBACL,MAAM;aACP,CAAC,CAAC;QACL,CAAC;KAAA;IAEM,MAAM,CAAO,gBAAgB,CAClC,UAAgC,EAAE;;YAElC,MAAM,KAAK,GAAG,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;YACvC,MAAM,MAAM,GAAG,CAAC,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,MAAM,EAAE,QAAQ,EAAE,YAAY,CAAC,CAAC,CAAC;YAEjE,OAAO,IAAI,CAAC,OAAO,CAAC;gBAClB,KAAK;gBACL,MAAM,EAAE,MAAM;gBACd,MAAM;aACP,CAAC,CAAC;QACL,CAAC;KAAA;IAEM,MAAM,CAAO,yBAAyB;;YAC3C,MAAM,OAAO,GAAG,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;YACpC,MAAM,KAAK,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,0BAA0B,CAAC,CAAC,IAAI,EAAE,CAAC;YAE/E,OAAO,IAAI,CAAC,OAAO,CAAC;gBAClB,KAAK;gBACL,MAAM,EAAE,MAAM;aACf,CAAC,CAAC;QACL,CAAC;KAAA;;AApCyB,qBAAU,GAAG,YAAY,CAAC;AACnC,qCAA0B,GAAG,iBAAiB,CAAC"}
@@ -1,8 +1,10 @@
1
- import { GetMigrationsOptions, GetMigrationsResponse, RunMigrationsOptions, RunMigrationsResponse } from '../types/migrations';
1
+ import { GetMigrationsOptions, GetMigrationsResponse, RunMigrationsOptions, RunMigrationsResponse, CreateDefaultRecordsResponse } from '../types/migrations';
2
2
  import { HITLBase } from './HITLBase';
3
3
  export declare class Migrations extends HITLBase {
4
4
  protected static readonly MODULE_URL = "migrations";
5
+ protected static CREATE_DEFAULT_RECORDS_URL: string;
5
6
  static getListOfMigrations(options?: GetMigrationsOptions): Promise<GetMigrationsResponse>;
6
7
  static runAllMigrations(options?: RunMigrationsOptions): Promise<RunMigrationsResponse>;
8
+ static createTableDefaultRecords(): Promise<CreateDefaultRecordsResponse>;
7
9
  }
8
10
  //# sourceMappingURL=Migrations.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Migrations.d.ts","sourceRoot":"","sources":["../../../src/api/Migrations.ts"],"names":[],"mappings":"AACA,OAAO,EACL,oBAAoB,EACpB,qBAAqB,EACrB,oBAAoB,EACpB,qBAAqB,EACtB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,qBAAa,UAAW,SAAQ,QAAQ;IACtC,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,UAAU,gBAAgB;WAEhC,mBAAmB,CACrC,OAAO,GAAE,oBAAyB,GACjC,OAAO,CAAC,qBAAqB,CAAC;WAUb,gBAAgB,CAClC,OAAO,GAAE,oBAAyB,GACjC,OAAO,CAAC,qBAAqB,CAAC;CAUlC"}
1
+ {"version":3,"file":"Migrations.d.ts","sourceRoot":"","sources":["../../../src/api/Migrations.ts"],"names":[],"mappings":"AACA,OAAO,EACL,oBAAoB,EACpB,qBAAqB,EACrB,oBAAoB,EACpB,qBAAqB,EACrB,4BAA4B,EAC7B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAGtC,qBAAa,UAAW,SAAQ,QAAQ;IACtC,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,UAAU,gBAAgB;IACpD,SAAS,CAAC,MAAM,CAAC,0BAA0B,SAAqB;WAE5C,mBAAmB,CACrC,OAAO,GAAE,oBAAyB,GACjC,OAAO,CAAC,qBAAqB,CAAC;WAUb,gBAAgB,CAClC,OAAO,GAAE,oBAAyB,GACjC,OAAO,CAAC,qBAAqB,CAAC;WAWb,yBAAyB,IAAI,OAAO,CAAC,4BAA4B,CAAC;CASvF"}
@@ -4,5 +4,6 @@ export declare type GetMigrationsOptions = ApiVersionOptions & NoAccountId<Migra
4
4
  export declare type GetMigrationsResponse = Migrations.IGetMigrationsResponse;
5
5
  export declare type RunMigrationsOptions = ApiVersionOptions & NoAccountId<Migrations.IRunMigrationsQuery>;
6
6
  export declare type RunMigrationsResponse = Migrations.IMigrationResult;
7
+ export declare type CreateDefaultRecordsResponse = Migrations.ICreateDefaultRecordsResponse;
7
8
  export declare type Migration = Migrations.IMigration;
8
9
  //# sourceMappingURL=migrations.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"migrations.d.ts","sourceRoot":"","sources":["../../../src/types/migrations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE1D,oBAAY,oBAAoB,GAAG,iBAAiB,GAAG,WAAW,CAAC,UAAU,CAAC,mBAAmB,CAAC,CAAC;AACnG,oBAAY,qBAAqB,GAAG,UAAU,CAAC,sBAAsB,CAAC;AACtE,oBAAY,oBAAoB,GAAG,iBAAiB,GAAG,WAAW,CAAC,UAAU,CAAC,mBAAmB,CAAC,CAAC;AACnG,oBAAY,qBAAqB,GAAG,UAAU,CAAC,gBAAgB,CAAC;AAChE,oBAAY,SAAS,GAAG,UAAU,CAAC,UAAU,CAAC"}
1
+ {"version":3,"file":"migrations.d.ts","sourceRoot":"","sources":["../../../src/types/migrations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE1D,oBAAY,oBAAoB,GAAG,iBAAiB,GAAG,WAAW,CAAC,UAAU,CAAC,mBAAmB,CAAC,CAAC;AACnG,oBAAY,qBAAqB,GAAG,UAAU,CAAC,sBAAsB,CAAC;AACtE,oBAAY,oBAAoB,GAAG,iBAAiB,GAAG,WAAW,CAAC,UAAU,CAAC,mBAAmB,CAAC,CAAC;AACnG,oBAAY,qBAAqB,GAAG,UAAU,CAAC,gBAAgB,CAAC;AAChE,oBAAY,4BAA4B,GAAG,UAAU,CAAC,6BAA6B,CAAC;AACpF,oBAAY,SAAS,GAAG,UAAU,CAAC,UAAU,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@or-sdk/hitl",
3
- "version": "0.30.5",
3
+ "version": "0.30.6-beta.713.0",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "types": "dist/types/index.d.ts",
@@ -17,7 +17,7 @@
17
17
  "dev": "pnpm build:watch:esm"
18
18
  },
19
19
  "dependencies": {
20
- "@onereach/types-hitl-api": "^0.0.32-rc.16",
20
+ "@onereach/types-hitl-api": "^0.0.32-rc.17",
21
21
  "@or-sdk/base": "^0.26.7",
22
22
  "@types/lodash": "^4.14.186",
23
23
  "@types/urijs": "^1.19.18",
@@ -29,6 +29,5 @@
29
29
  },
30
30
  "publishConfig": {
31
31
  "access": "public"
32
- },
33
- "gitHead": "78297fa9aceab1187877744116f8c29db1cdf545"
32
+ }
34
33
  }
@@ -4,11 +4,14 @@ import {
4
4
  GetMigrationsResponse,
5
5
  RunMigrationsOptions,
6
6
  RunMigrationsResponse,
7
+ CreateDefaultRecordsResponse,
7
8
  } from '../types/migrations';
8
9
  import { HITLBase } from './HITLBase';
10
+ import URI from 'urijs';
9
11
 
10
12
  export class Migrations extends HITLBase {
11
13
  protected static readonly MODULE_URL = 'migrations';
14
+ protected static CREATE_DEFAULT_RECORDS_URL = 'default-records';
12
15
 
13
16
  public static async getListOfMigrations(
14
17
  options: GetMigrationsOptions = {}
@@ -34,4 +37,14 @@ export class Migrations extends HITLBase {
34
37
  params,
35
38
  });
36
39
  }
40
+
41
+ public static async createTableDefaultRecords(): Promise<CreateDefaultRecordsResponse> {
42
+ const baseUrl = this.getBaseUrl({});
43
+ const route = new URI(baseUrl).segment(this.CREATE_DEFAULT_RECORDS_URL).href();
44
+
45
+ return this.request({
46
+ route,
47
+ method: 'POST',
48
+ });
49
+ }
37
50
  }
@@ -5,4 +5,5 @@ export type GetMigrationsOptions = ApiVersionOptions & NoAccountId<Migrations.IG
5
5
  export type GetMigrationsResponse = Migrations.IGetMigrationsResponse;
6
6
  export type RunMigrationsOptions = ApiVersionOptions & NoAccountId<Migrations.IRunMigrationsQuery>;
7
7
  export type RunMigrationsResponse = Migrations.IMigrationResult;
8
+ export type CreateDefaultRecordsResponse = Migrations.ICreateDefaultRecordsResponse;
8
9
  export type Migration = Migrations.IMigration;