@or-sdk/hitl 0.34.10-beta.2011.0 → 0.34.10-beta.2063.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/cjs/api/Migrations.js +5 -35
- package/dist/cjs/api/Migrations.js.map +1 -1
- package/dist/cjs/types/migrations.js +0 -3
- package/dist/cjs/types/migrations.js.map +1 -1
- package/dist/esm/api/Migrations.js +4 -28
- package/dist/esm/api/Migrations.js.map +1 -1
- package/dist/esm/types/migrations.js +1 -2
- package/dist/esm/types/migrations.js.map +1 -1
- package/dist/types/api/Migrations.d.ts +3 -5
- package/dist/types/api/Migrations.d.ts.map +1 -1
- package/dist/types/types/migrations.d.ts +2 -7
- package/dist/types/types/migrations.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/api/Migrations.ts +4 -32
- package/src/types/migrations.ts +2 -7
|
@@ -117,39 +117,12 @@ var Migrations = (function (_super) {
|
|
|
117
117
|
});
|
|
118
118
|
});
|
|
119
119
|
};
|
|
120
|
-
Migrations.getMigrationsInfo = function () {
|
|
121
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
122
|
-
var baseUrl, route;
|
|
123
|
-
return __generator(this, function (_a) {
|
|
124
|
-
baseUrl = this.getBaseUrl({});
|
|
125
|
-
route = new urijs_1.default(baseUrl).segment(this.MIGRATIONS_INFO_URL).href();
|
|
126
|
-
return [2, this.request({
|
|
127
|
-
route: route,
|
|
128
|
-
})];
|
|
129
|
-
});
|
|
130
|
-
});
|
|
131
|
-
};
|
|
132
|
-
Migrations.getTableDefaultRecords = function (options) {
|
|
133
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
134
|
-
var baseUrl, route, params;
|
|
135
|
-
return __generator(this, function (_a) {
|
|
136
|
-
baseUrl = this.getBaseUrl({});
|
|
137
|
-
route = new urijs_1.default(baseUrl).segment(this.DEFAULT_RECORDS_URL).href();
|
|
138
|
-
params = lodash_1.default.pick(options, ['tableName']);
|
|
139
|
-
return [2, this.request({
|
|
140
|
-
route: route,
|
|
141
|
-
method: 'GET',
|
|
142
|
-
params: params,
|
|
143
|
-
})];
|
|
144
|
-
});
|
|
145
|
-
});
|
|
146
|
-
};
|
|
147
120
|
Migrations.createTableDefaultRecords = function () {
|
|
148
121
|
return __awaiter(this, void 0, void 0, function () {
|
|
149
122
|
var baseUrl, route;
|
|
150
123
|
return __generator(this, function (_a) {
|
|
151
124
|
baseUrl = this.getBaseUrl({});
|
|
152
|
-
route = new urijs_1.default(baseUrl).segment(this.
|
|
125
|
+
route = new urijs_1.default(baseUrl).segment(this.CREATE_DEFAULT_RECORDS_URL).href();
|
|
153
126
|
return [2, this.request({
|
|
154
127
|
route: route,
|
|
155
128
|
method: 'POST',
|
|
@@ -157,23 +130,20 @@ var Migrations = (function (_super) {
|
|
|
157
130
|
});
|
|
158
131
|
});
|
|
159
132
|
};
|
|
160
|
-
Migrations.
|
|
133
|
+
Migrations.getMigrationsInfo = function () {
|
|
161
134
|
return __awaiter(this, void 0, void 0, function () {
|
|
162
|
-
var baseUrl, route
|
|
135
|
+
var baseUrl, route;
|
|
163
136
|
return __generator(this, function (_a) {
|
|
164
137
|
baseUrl = this.getBaseUrl({});
|
|
165
|
-
route = new urijs_1.default(baseUrl).segment(this.
|
|
166
|
-
params = lodash_1.default.pick(options, ['tableName']);
|
|
138
|
+
route = new urijs_1.default(baseUrl).segment(this.MIGRATIONS_INFO_URL).href();
|
|
167
139
|
return [2, this.request({
|
|
168
140
|
route: route,
|
|
169
|
-
method: 'PUT',
|
|
170
|
-
params: params,
|
|
171
141
|
})];
|
|
172
142
|
});
|
|
173
143
|
});
|
|
174
144
|
};
|
|
175
145
|
Migrations.MODULE_URL = 'migrations';
|
|
176
|
-
Migrations.
|
|
146
|
+
Migrations.CREATE_DEFAULT_RECORDS_URL = 'default-records';
|
|
177
147
|
Migrations.MIGRATIONS_INFO_URL = 'info';
|
|
178
148
|
Migrations.MIGRATIONS_LOCK_URL = 'lock';
|
|
179
149
|
Migrations.MIGRATIONS_STATUS_URL = 'status';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Migrations.js","sourceRoot":"","sources":["../../../src/api/Migrations.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAAuB;
|
|
1
|
+
{"version":3,"file":"Migrations.js","sourceRoot":"","sources":["../../../src/api/Migrations.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAAuB;AAUvB,uCAAsC;AACtC,gDAAwB;AAExB;IAAgC,8BAAQ;IAAxC;;IAqEA,CAAC;IA9DqB,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,CAAC,CAAC;gBAE/C,WAAO,IAAI,CAAC,OAAO,CAAC;wBAClB,KAAK,OAAA;wBACL,MAAM,QAAA;qBACP,CAAC,EAAC;;;KACJ;IAEmB,2BAAgB,GAApC,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,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,iCAAsB,GAA1C;;;;gBACQ,OAAO,GAAG,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;gBAC9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mB,GAAG,MAAM,CAAC;IAC7B,gCAAqB,GAAG,QAAQ,CAAC;IAgEpD,iBAAC;CAAA,AArED,CAAgC,mBAAQ,GAqEvC;AArEY,gCAAU"}
|
|
@@ -1,6 +1,3 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DEFAULT_DATA_TABLE_NAME = void 0;
|
|
4
|
-
var types_hitl_api_1 = require("@onereach/types-hitl-api");
|
|
5
|
-
Object.defineProperty(exports, "DEFAULT_DATA_TABLE_NAME", { enumerable: true, get: function () { return types_hitl_api_1.DEFAULT_DATA_TABLE_NAME; } });
|
|
6
3
|
//# sourceMappingURL=migrations.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migrations.js","sourceRoot":"","sources":["../../../src/types/migrations.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"migrations.js","sourceRoot":"","sources":["../../../src/types/migrations.ts"],"names":[],"mappings":""}
|
|
@@ -51,52 +51,28 @@ export class Migrations extends HITLBase {
|
|
|
51
51
|
});
|
|
52
52
|
});
|
|
53
53
|
}
|
|
54
|
-
static getMigrationsInfo() {
|
|
55
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
56
|
-
const baseUrl = this.getBaseUrl({});
|
|
57
|
-
const route = new URI(baseUrl).segment(this.MIGRATIONS_INFO_URL).href();
|
|
58
|
-
return this.request({
|
|
59
|
-
route,
|
|
60
|
-
});
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
static getTableDefaultRecords(options) {
|
|
64
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
65
|
-
const baseUrl = this.getBaseUrl({});
|
|
66
|
-
const route = new URI(baseUrl).segment(this.DEFAULT_RECORDS_URL).href();
|
|
67
|
-
const params = _.pick(options, ['tableName']);
|
|
68
|
-
return this.request({
|
|
69
|
-
route,
|
|
70
|
-
method: 'GET',
|
|
71
|
-
params,
|
|
72
|
-
});
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
54
|
static createTableDefaultRecords() {
|
|
76
55
|
return __awaiter(this, void 0, void 0, function* () {
|
|
77
56
|
const baseUrl = this.getBaseUrl({});
|
|
78
|
-
const route = new URI(baseUrl).segment(this.
|
|
57
|
+
const route = new URI(baseUrl).segment(this.CREATE_DEFAULT_RECORDS_URL).href();
|
|
79
58
|
return this.request({
|
|
80
59
|
route,
|
|
81
60
|
method: 'POST',
|
|
82
61
|
});
|
|
83
62
|
});
|
|
84
63
|
}
|
|
85
|
-
static
|
|
64
|
+
static getMigrationsInfo() {
|
|
86
65
|
return __awaiter(this, void 0, void 0, function* () {
|
|
87
66
|
const baseUrl = this.getBaseUrl({});
|
|
88
|
-
const route = new URI(baseUrl).segment(this.
|
|
89
|
-
const params = _.pick(options, ['tableName']);
|
|
67
|
+
const route = new URI(baseUrl).segment(this.MIGRATIONS_INFO_URL).href();
|
|
90
68
|
return this.request({
|
|
91
69
|
route,
|
|
92
|
-
method: 'PUT',
|
|
93
|
-
params,
|
|
94
70
|
});
|
|
95
71
|
});
|
|
96
72
|
}
|
|
97
73
|
}
|
|
98
74
|
Migrations.MODULE_URL = 'migrations';
|
|
99
|
-
Migrations.
|
|
75
|
+
Migrations.CREATE_DEFAULT_RECORDS_URL = 'default-records';
|
|
100
76
|
Migrations.MIGRATIONS_INFO_URL = 'info';
|
|
101
77
|
Migrations.MIGRATIONS_LOCK_URL = 'lock';
|
|
102
78
|
Migrations.MIGRATIONS_STATUS_URL = 'status';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Migrations.js","sourceRoot":"","sources":["../../../src/api/Migrations.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,CAAC,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"Migrations.js","sourceRoot":"","sources":["../../../src/api/Migrations.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,CAAC,MAAM,QAAQ,CAAC;AAUvB,OAAO,E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I,CAAC,mBAAmB,CAAC,CAAC,IAAI,EAAE,CAAC;YAExE,OAAO,IAAI,CAAC,OAAO,CAAC;gBAClB,KAAK;gBACL,MAAM,EAAE,QAAQ;aACjB,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;IAEM,MAAM,CAAO,iBAAiB;;YACnC,MAAM,OAAO,GAAG,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;YACpC,MAAM,KAAK,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC,IAAI,EAAE,CAAC;YAExE,OAAO,IAAI,CAAC,OAAO,CAAC;gBAClB,KAAK;aACN,CAAC,CAAC;QACL,CAAC;KAAA;;AAnEyB,qBAAU,GAAG,YAAY,CAAC;AACnC,qCAA0B,GAAG,iBAAiB,CAAC;AAC/C,8BAAmB,GAAG,MAAM,CAAC;AAC7B,8BAAmB,GAAG,MAAM,CAAC;AAC7B,gCAAqB,GAAG,QAAQ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migrations.js","sourceRoot":"","sources":["../../../src/types/migrations.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"migrations.js","sourceRoot":"","sources":["../../../src/types/migrations.ts"],"names":[],"mappings":""}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { GetMigrationsOptions, GetMigrationsResponse, RunMigrationsOptions, RunMigrationsResponse, CreateDefaultRecordsResponse, GetMigrationsInfoResponse, GetRunMigrationsStatusResponse
|
|
1
|
+
import { GetMigrationsOptions, GetMigrationsResponse, RunMigrationsOptions, RunMigrationsResponse, CreateDefaultRecordsResponse, GetMigrationsInfoResponse, GetRunMigrationsStatusResponse } 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
|
|
5
|
+
protected static CREATE_DEFAULT_RECORDS_URL: string;
|
|
6
6
|
protected static MIGRATIONS_INFO_URL: string;
|
|
7
7
|
protected static MIGRATIONS_LOCK_URL: string;
|
|
8
8
|
protected static MIGRATIONS_STATUS_URL: string;
|
|
@@ -10,9 +10,7 @@ export declare class Migrations extends HITLBase {
|
|
|
10
10
|
static runAllMigrations(options?: RunMigrationsOptions): Promise<RunMigrationsResponse>;
|
|
11
11
|
static getRunMigrationsStatus(): Promise<GetRunMigrationsStatusResponse>;
|
|
12
12
|
static deleteMigrationsTableLock(): Promise<unknown>;
|
|
13
|
-
static getMigrationsInfo(): Promise<GetMigrationsInfoResponse>;
|
|
14
|
-
static getTableDefaultRecords(options: GetDefaultRecordsOptions): Promise<GetDefaultRecordsResponse>;
|
|
15
13
|
static createTableDefaultRecords(): Promise<CreateDefaultRecordsResponse>;
|
|
16
|
-
static
|
|
14
|
+
static getMigrationsInfo(): Promise<GetMigrationsInfoResponse>;
|
|
17
15
|
}
|
|
18
16
|
//# 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,EACrB,4BAA4B,EAC5B,yBAAyB,EACzB,8BAA8B,
|
|
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,EAC5B,yBAAyB,EACzB,8BAA8B,EAC/B,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;IAChE,SAAS,CAAC,MAAM,CAAC,mBAAmB,SAAU;IAC9C,SAAS,CAAC,MAAM,CAAC,mBAAmB,SAAU;IAC9C,SAAS,CAAC,MAAM,CAAC,qBAAqB,SAAY;WAE9B,mBAAmB,CACrC,OAAO,GAAE,oBAAyB,GACjC,OAAO,CAAC,qBAAqB,CAAC;WAUb,gBAAgB,CAClC,OAAO,GAAE,oBAAyB,GACjC,OAAO,CAAC,qBAAqB,CAAC;WAWb,sBAAsB,IAAI,OAAO,CAAC,8BAA8B,CAAC;WASjE,yBAAyB;WAUzB,yBAAyB,IAAI,OAAO,CAAC,4BAA4B,CAAC;WAUlE,iBAAiB,IAAI,OAAO,CAAC,yBAAyB,CAAC;CAQ5E"}
|
|
@@ -1,16 +1,11 @@
|
|
|
1
|
-
import { Migrations
|
|
1
|
+
import { Migrations } from '@onereach/types-hitl-api';
|
|
2
2
|
import { ApiVersionOptions, NoAccountId } from './common';
|
|
3
3
|
export type GetMigrationsOptions = ApiVersionOptions & NoAccountId<Migrations.IGetMigrationsQuery>;
|
|
4
4
|
export type GetMigrationsResponse = Migrations.IGetMigrationsResponse;
|
|
5
5
|
export type RunMigrationsOptions = ApiVersionOptions & NoAccountId<Migrations.IRunMigrationsQuery>;
|
|
6
6
|
export type RunMigrationsResponse = Migrations.IMigrationResult;
|
|
7
7
|
export type GetRunMigrationsStatusResponse = Migrations.IGetRunMigrationsStatusResponse;
|
|
8
|
+
export type CreateDefaultRecordsResponse = Migrations.ICreateDefaultRecordsResponse;
|
|
8
9
|
export type Migration = Migrations.IMigration;
|
|
9
10
|
export type GetMigrationsInfoResponse = Migrations.IGetMigrationsInfoResponse;
|
|
10
|
-
export type GetDefaultRecordsOptions = ApiVersionOptions & Migrations.IGetDefaultRecordsQuery;
|
|
11
|
-
export type GetDefaultRecordsResponse = Migrations.IGetDefaultRecordsResponse;
|
|
12
|
-
export type CreateDefaultRecordsResponse = Migrations.ICreateDefaultRecordsResponse;
|
|
13
|
-
export type SyncDefaultRecordsOptions = ApiVersionOptions & NoAccountId<Migrations.ISyncDefaultRecordsQuery>;
|
|
14
|
-
export type SyncDefaultRecordsResponse = Migrations.ISyncDefaultRecordsResponse;
|
|
15
|
-
export { DEFAULT_DATA_TABLE_NAME };
|
|
16
11
|
//# 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,
|
|
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,MAAM,MAAM,oBAAoB,GAAG,iBAAiB,GAAG,WAAW,CAAC,UAAU,CAAC,mBAAmB,CAAC,CAAC;AACnG,MAAM,MAAM,qBAAqB,GAAG,UAAU,CAAC,sBAAsB,CAAC;AACtE,MAAM,MAAM,oBAAoB,GAAG,iBAAiB,GAAG,WAAW,CAAC,UAAU,CAAC,mBAAmB,CAAC,CAAC;AACnG,MAAM,MAAM,qBAAqB,GAAG,UAAU,CAAC,gBAAgB,CAAC;AAChE,MAAM,MAAM,8BAA8B,GAAG,UAAU,CAAC,+BAA+B,CAAC;AACxF,MAAM,MAAM,4BAA4B,GAAG,UAAU,CAAC,6BAA6B,CAAC;AACpF,MAAM,MAAM,SAAS,GAAG,UAAU,CAAC,UAAU,CAAC;AAC9C,MAAM,MAAM,yBAAyB,GAAG,UAAU,CAAC,0BAA0B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@or-sdk/hitl",
|
|
3
|
-
"version": "0.34.10-beta.
|
|
3
|
+
"version": "0.34.10-beta.2063.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.
|
|
20
|
+
"@onereach/types-hitl-api": "0.0.53-rc.3",
|
|
21
21
|
"@or-sdk/base": "^0.29.0",
|
|
22
22
|
"@types/lodash": "^4.14.191",
|
|
23
23
|
"@types/urijs": "^1.19.18",
|
package/src/api/Migrations.ts
CHANGED
|
@@ -7,17 +7,13 @@ import {
|
|
|
7
7
|
CreateDefaultRecordsResponse,
|
|
8
8
|
GetMigrationsInfoResponse,
|
|
9
9
|
GetRunMigrationsStatusResponse,
|
|
10
|
-
GetDefaultRecordsOptions,
|
|
11
|
-
GetDefaultRecordsResponse,
|
|
12
|
-
SyncDefaultRecordsOptions,
|
|
13
|
-
SyncDefaultRecordsResponse,
|
|
14
10
|
} from '../types/migrations';
|
|
15
11
|
import { HITLBase } from './HITLBase';
|
|
16
12
|
import URI from 'urijs';
|
|
17
13
|
|
|
18
14
|
export class Migrations extends HITLBase {
|
|
19
15
|
protected static readonly MODULE_URL = 'migrations';
|
|
20
|
-
protected static
|
|
16
|
+
protected static CREATE_DEFAULT_RECORDS_URL = 'default-records';
|
|
21
17
|
protected static MIGRATIONS_INFO_URL = 'info';
|
|
22
18
|
protected static MIGRATIONS_LOCK_URL = 'lock';
|
|
23
19
|
protected static MIGRATIONS_STATUS_URL = 'status';
|
|
@@ -66,30 +62,9 @@ export class Migrations extends HITLBase {
|
|
|
66
62
|
});
|
|
67
63
|
}
|
|
68
64
|
|
|
69
|
-
public static async getMigrationsInfo(): Promise<GetMigrationsInfoResponse> {
|
|
70
|
-
const baseUrl = this.getBaseUrl({});
|
|
71
|
-
const route = new URI(baseUrl).segment(this.MIGRATIONS_INFO_URL).href();
|
|
72
|
-
|
|
73
|
-
return this.request({
|
|
74
|
-
route,
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
public static async getTableDefaultRecords(options: GetDefaultRecordsOptions): Promise<GetDefaultRecordsResponse> {
|
|
79
|
-
const baseUrl = this.getBaseUrl({});
|
|
80
|
-
const route = new URI(baseUrl).segment(this.DEFAULT_RECORDS_URL).href();
|
|
81
|
-
const params = _.pick(options, ['tableName']);
|
|
82
|
-
|
|
83
|
-
return this.request({
|
|
84
|
-
route,
|
|
85
|
-
method: 'GET',
|
|
86
|
-
params,
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
|
-
|
|
90
65
|
public static async createTableDefaultRecords(): Promise<CreateDefaultRecordsResponse> {
|
|
91
66
|
const baseUrl = this.getBaseUrl({});
|
|
92
|
-
const route = new URI(baseUrl).segment(this.
|
|
67
|
+
const route = new URI(baseUrl).segment(this.CREATE_DEFAULT_RECORDS_URL).href();
|
|
93
68
|
|
|
94
69
|
return this.request({
|
|
95
70
|
route,
|
|
@@ -97,15 +72,12 @@ export class Migrations extends HITLBase {
|
|
|
97
72
|
});
|
|
98
73
|
}
|
|
99
74
|
|
|
100
|
-
public static async
|
|
75
|
+
public static async getMigrationsInfo(): Promise<GetMigrationsInfoResponse> {
|
|
101
76
|
const baseUrl = this.getBaseUrl({});
|
|
102
|
-
const route = new URI(baseUrl).segment(this.
|
|
103
|
-
const params = _.pick(options, ['tableName']);
|
|
77
|
+
const route = new URI(baseUrl).segment(this.MIGRATIONS_INFO_URL).href();
|
|
104
78
|
|
|
105
79
|
return this.request({
|
|
106
80
|
route,
|
|
107
|
-
method: 'PUT',
|
|
108
|
-
params,
|
|
109
81
|
});
|
|
110
82
|
}
|
|
111
83
|
}
|
package/src/types/migrations.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Migrations
|
|
1
|
+
import { Migrations } from '@onereach/types-hitl-api';
|
|
2
2
|
import { ApiVersionOptions, NoAccountId } from './common';
|
|
3
3
|
|
|
4
4
|
export type GetMigrationsOptions = ApiVersionOptions & NoAccountId<Migrations.IGetMigrationsQuery>;
|
|
@@ -6,12 +6,7 @@ export type GetMigrationsResponse = Migrations.IGetMigrationsResponse;
|
|
|
6
6
|
export type RunMigrationsOptions = ApiVersionOptions & NoAccountId<Migrations.IRunMigrationsQuery>;
|
|
7
7
|
export type RunMigrationsResponse = Migrations.IMigrationResult;
|
|
8
8
|
export type GetRunMigrationsStatusResponse = Migrations.IGetRunMigrationsStatusResponse;
|
|
9
|
+
export type CreateDefaultRecordsResponse = Migrations.ICreateDefaultRecordsResponse;
|
|
9
10
|
export type Migration = Migrations.IMigration;
|
|
10
11
|
export type GetMigrationsInfoResponse = Migrations.IGetMigrationsInfoResponse;
|
|
11
|
-
export type GetDefaultRecordsOptions = ApiVersionOptions & Migrations.IGetDefaultRecordsQuery;
|
|
12
|
-
export type GetDefaultRecordsResponse = Migrations.IGetDefaultRecordsResponse;
|
|
13
|
-
export type CreateDefaultRecordsResponse = Migrations.ICreateDefaultRecordsResponse;
|
|
14
|
-
export type SyncDefaultRecordsOptions = ApiVersionOptions & NoAccountId<Migrations.ISyncDefaultRecordsQuery>;
|
|
15
|
-
export type SyncDefaultRecordsResponse = Migrations.ISyncDefaultRecordsResponse;
|
|
16
12
|
|
|
17
|
-
export { DEFAULT_DATA_TABLE_NAME };
|