@or-sdk/store 1.4.0-beta.1884.0 → 1.4.0-beta.1912.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/Store.js +33 -35
- package/dist/cjs/Store.js.map +1 -1
- package/dist/cjs/constants.js +17 -2
- package/dist/cjs/constants.js.map +1 -1
- package/dist/esm/Store.js +33 -36
- package/dist/esm/Store.js.map +1 -1
- package/dist/esm/constants.js +16 -1
- package/dist/esm/constants.js.map +1 -1
- package/dist/types/Store.d.ts +26 -27
- package/dist/types/Store.d.ts.map +1 -1
- package/dist/types/constants.d.ts +16 -1
- package/dist/types/constants.d.ts.map +1 -1
- package/dist/types/index.d.ts +0 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/types.d.ts +99 -5
- package/dist/types/types.d.ts.map +1 -1
- package/package.json +2 -3
- package/src/Store.ts +103 -102
- package/src/constants.ts +19 -1
- package/src/index.ts +0 -6
- package/src/types.ts +152 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Store.d.ts","sourceRoot":"","sources":["../../src/Store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"Store.d.ts","sourceRoot":"","sources":["../../src/Store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAQpC,OAAO,EACL,WAAW,EACX,SAAS,EACT,kBAAkB,EAClB,iBAAiB,EACjB,cAAc,EACd,sBAAsB,EACtB,0BAA0B,EAC1B,aAAa,EACb,gBAAgB,EAChB,YAAY,EACZ,YAAY,EACZ,cAAc,EACd,kBAAkB,EAClB,qBAAqB,EACrB,4BAA4B,EAE7B,MAAM,SAAS,CAAC;AAKjB,qBAAa,KAAM,SAAQ,IAAI;IAC7B,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAc;gBAa9B,MAAM,EAAE,WAAW;IAm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CAAC,cAAc,EAAE,QAAQ,CAAM;IAgBpC,6BAA6B,CACxC,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,SAAS,EAC1B,EAAE,MAAM,EAAE,aAAa,EAAE,GAAE,sBAA2B,GACrD,OAAO,CAAC,MAAM,CAAC;IAeZ,oBAAoB,CACxB,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,SAAS,EAC1B,EAAE,MAAM,EAAE,aAAa,EAAE,GAAE,sBAA2B;IAgBlD,cAAc,CAAC,MAAM,EAAE,SAAS,EAAE,EAAE,MAAM,EAAE,aAAa,EAAE,GAAE,sBAA2B;IAgBxF,kBAAkB,CAAC,MAAM,EAAE,SAAS,EAAE,EAAE,MAAM,EAAE,aAAa,EAAE,GAAE,sBAA2B;CASnG"}
|
|
@@ -1,8 +1,23 @@
|
|
|
1
1
|
export declare const SERVICE_KEY = "store-api";
|
|
2
2
|
export declare const STORE_SERVICE_KEY = "store-api";
|
|
3
3
|
export declare const STORE_API_URL_KEY = "STORE_API_URL";
|
|
4
|
+
export declare const RELEASE_STATUS: {
|
|
5
|
+
readonly BETA: "BETA";
|
|
6
|
+
readonly RELEASED: "RELEASED";
|
|
7
|
+
readonly DEPRECATED: "DEPRECATED";
|
|
8
|
+
};
|
|
9
|
+
export declare const PACKAGE_TYPE: {
|
|
10
|
+
readonly STEP: "STEP";
|
|
11
|
+
readonly STEP_INPUT: "STEP_INPUT";
|
|
12
|
+
readonly TICKET_INPUT: "TICKET_INPUT";
|
|
13
|
+
readonly CONTENT_INPUT: "CONTENT_INPUT";
|
|
14
|
+
};
|
|
15
|
+
export declare const REPOSITORY_TYPE: {
|
|
16
|
+
readonly ACCOUNT: "account";
|
|
17
|
+
readonly PDE: "pde";
|
|
18
|
+
};
|
|
4
19
|
export declare const INDEX_TYPE: {
|
|
5
20
|
readonly PACKAGES: "packages";
|
|
6
|
-
readonly
|
|
21
|
+
readonly SANDBOX: "sandbox";
|
|
7
22
|
};
|
|
8
23
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,cAAc,CAAC;AACvC,eAAO,MAAM,iBAAiB,cAAc,CAAC;AAC7C,eAAO,MAAM,iBAAiB,kBAAkB,CAAC;AAEjD,eAAO,MAAM,UAAU;;;CAGb,CAAC"}
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,cAAc,CAAC;AACvC,eAAO,MAAM,iBAAiB,cAAc,CAAC;AAC7C,eAAO,MAAM,iBAAiB,kBAAkB,CAAC;AAEjD,eAAO,MAAM,cAAc;;;;CAIjB,CAAC;AAEX,eAAO,MAAM,YAAY;;;;;CAKf,CAAC;AAEX,eAAO,MAAM,eAAe;;;CAGlB,CAAC;AAEX,eAAO,MAAM,UAAU;;;CAGb,CAAC"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export { Store } from './Store';
|
|
2
2
|
export * from './types';
|
|
3
3
|
export * from './constants';
|
|
4
|
-
export type { PackageSchemaTypeEnum, PackageStatusDetailsLevelEnum, PackageStatusDetailsStatusEnum, PackageTypeEnum, } from '@or-sdk/library-types-v1';
|
|
5
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC"}
|
package/dist/types/types.d.ts
CHANGED
|
@@ -1,20 +1,114 @@
|
|
|
1
1
|
import { Token, CustomHeaders } from '@or-sdk/base';
|
|
2
|
-
import {
|
|
2
|
+
import { RELEASE_STATUS, PACKAGE_TYPE, REPOSITORY_TYPE } from './constants';
|
|
3
|
+
export declare type ReleaseStatus = ObjectValues<typeof RELEASE_STATUS>;
|
|
4
|
+
export declare type PackageType = ObjectValues<typeof PACKAGE_TYPE>;
|
|
5
|
+
export declare type RepositoryType = ObjectValues<typeof REPOSITORY_TYPE>;
|
|
3
6
|
export declare type StoreConfig = {
|
|
4
7
|
token: Token;
|
|
5
8
|
discoveryUrl?: string;
|
|
6
9
|
storeUrl?: string;
|
|
7
10
|
storeApiUrl?: string;
|
|
8
|
-
packageType:
|
|
11
|
+
packageType: PackageType;
|
|
12
|
+
};
|
|
13
|
+
export declare type ObjectValues<T> = T[keyof T];
|
|
14
|
+
export declare type JSONObject = {
|
|
15
|
+
[key: string]: JSONValue;
|
|
16
|
+
};
|
|
17
|
+
export declare type JSONArray = JSONValue[];
|
|
18
|
+
export declare type JSONValue = string | number | boolean | null | JSONObject | JSONArray;
|
|
19
|
+
export declare type GetParams = {
|
|
20
|
+
id: string;
|
|
21
|
+
version: string;
|
|
22
|
+
};
|
|
23
|
+
export declare type UniversalGetParams = GetParams & {
|
|
24
|
+
isSandbox?: boolean;
|
|
25
|
+
};
|
|
26
|
+
export declare type GetListParams = {
|
|
27
|
+
size?: number;
|
|
28
|
+
scope?: {
|
|
29
|
+
botId?: string;
|
|
30
|
+
flowId?: string;
|
|
31
|
+
category?: string;
|
|
32
|
+
};
|
|
33
|
+
query?: string;
|
|
34
|
+
filter?: string[];
|
|
35
|
+
cursor?: any;
|
|
9
36
|
};
|
|
10
37
|
export declare type OptionalParams = {
|
|
11
|
-
type?:
|
|
38
|
+
type?: string;
|
|
12
39
|
signal?: AbortSignal;
|
|
13
40
|
};
|
|
14
41
|
export declare type CrossEnvOptionalParams = OptionalParams & {
|
|
15
42
|
customHeaders?: CustomHeaders;
|
|
16
43
|
};
|
|
17
|
-
export declare type
|
|
18
|
-
|
|
44
|
+
export declare type VersionOptions = {
|
|
45
|
+
includeDeprecated: boolean;
|
|
46
|
+
includeReleaseNotes: boolean;
|
|
47
|
+
includeMember: boolean;
|
|
48
|
+
};
|
|
49
|
+
export declare type LegacyStepTemplate = {
|
|
50
|
+
id: string;
|
|
51
|
+
version: string;
|
|
52
|
+
label: string;
|
|
53
|
+
description: string;
|
|
54
|
+
categories: string[];
|
|
55
|
+
data: JSONValue;
|
|
56
|
+
};
|
|
57
|
+
export declare type DeprecateLegacyStepsParams = {
|
|
58
|
+
include: string[];
|
|
59
|
+
};
|
|
60
|
+
export declare type ScopePartial = {
|
|
61
|
+
scope: RepositoryType;
|
|
62
|
+
repository?: never;
|
|
63
|
+
};
|
|
64
|
+
export declare type RepositoryPartial = {
|
|
65
|
+
scope?: never;
|
|
66
|
+
repository: RepositoryType;
|
|
67
|
+
};
|
|
68
|
+
export declare type Repository = NonNullable<RepositoryPartial | ScopePartial>;
|
|
69
|
+
export declare type ReleaseParams = Repository & {
|
|
70
|
+
status: ReleaseStatus;
|
|
71
|
+
releaseNotes?: string;
|
|
72
|
+
member?: {
|
|
73
|
+
accountId: string;
|
|
74
|
+
}[];
|
|
75
|
+
};
|
|
76
|
+
export declare type SearchFilters = {
|
|
77
|
+
id?: string[];
|
|
78
|
+
category?: string;
|
|
79
|
+
};
|
|
80
|
+
export declare type CursorV1 = {
|
|
81
|
+
from: number;
|
|
82
|
+
};
|
|
83
|
+
export declare type PaginationParams = {
|
|
84
|
+
cursor?: CursorV1;
|
|
85
|
+
size?: number;
|
|
86
|
+
};
|
|
87
|
+
export declare type SearchParams = PaginationParams & {
|
|
88
|
+
query?: string;
|
|
89
|
+
filter?: SearchFilters;
|
|
90
|
+
scope?: SearchFilters;
|
|
91
|
+
};
|
|
92
|
+
export declare type CategoryData = {
|
|
93
|
+
name: string;
|
|
94
|
+
};
|
|
95
|
+
export declare type UploadCredentialsData = {
|
|
96
|
+
fileName: string;
|
|
97
|
+
name: string;
|
|
98
|
+
description: string;
|
|
99
|
+
categories: string[];
|
|
100
|
+
packageMeta: JSONValue;
|
|
101
|
+
};
|
|
102
|
+
export declare type SandboxUploadCredentialsData = UploadCredentialsData & {
|
|
103
|
+
fileNames: string[];
|
|
104
|
+
};
|
|
105
|
+
export declare type UploadCredentialsFields = {
|
|
106
|
+
Policy: string;
|
|
107
|
+
'X-Amz-Signature': string;
|
|
108
|
+
[key: string]: string;
|
|
109
|
+
};
|
|
110
|
+
export declare type UploadCredentials = {
|
|
111
|
+
url: string;
|
|
112
|
+
fields: UploadCredentialsFields;
|
|
19
113
|
};
|
|
20
114
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EACL,cAAc,EACd,YAAY,EACZ,eAAe,EAChB,MAAM,aAAa,CAAC;AAErB,oBAAY,aAAa,GAAG,YAAY,CAAC,OAAO,cAAc,CAAC,CAAC;AAChE,oBAAY,WAAW,GAAG,YAAY,CAAC,OAAO,YAAY,CAAC,CAAC;AAC5D,oBAAY,cAAc,GAAG,YAAY,CAAC,OAAO,eAAe,CAAC,CAAC;AAElE,oBAAY,WAAW,GAAG;IAIxB,KAAK,EAAE,KAAK,CAAC;IAKb,YAAY,CAAC,EAAE,MAAM,CAAC;IAKtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAKlB,WAAW,CAAC,EAAE,MAAM,CAAC;IAKrB,WAAW,E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CACd,CAAC;AAEF,oBAAY,qBAAqB,GAAG;IAClC,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,WAAW,EAAE,SAAS,CAAC;CACxB,CAAC;AAEF,oBAAY,4BAA4B,GAAG,qBAAqB,GAAG;IACjE,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB,CAAC;AAEF,oBAAY,uBAAuB,GAAG;IAMpC,MAAM,EAAE,MAAM,CAAC;IAMf,iBAAiB,EAAE,MAAM,CAAC;IAO1B,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;CACvB,CAAC;AAEF,oBAAY,iBAAiB,GAAG;IAC9B,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,uBAAuB,CAAC;CACjC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@or-sdk/store",
|
|
3
|
-
"version": "1.4.0-beta.
|
|
3
|
+
"version": "1.4.0-beta.1912.0",
|
|
4
4
|
"main": "dist/cjs/index.js",
|
|
5
5
|
"module": "dist/esm/index.js",
|
|
6
6
|
"types": "dist/types/index.d.ts",
|
|
@@ -17,8 +17,7 @@
|
|
|
17
17
|
"dev": "pnpm build:watch:esm"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@or-sdk/base": "^0.29.0"
|
|
21
|
-
"@or-sdk/library-types-v1": "6.0.3-moretypesadd-20231002112300"
|
|
20
|
+
"@or-sdk/base": "^0.29.0"
|
|
22
21
|
},
|
|
23
22
|
"devDependencies": {
|
|
24
23
|
"concurrently": "^6.4.0",
|
package/src/Store.ts
CHANGED
|
@@ -1,42 +1,35 @@
|
|
|
1
1
|
import { Base } from '@or-sdk/base';
|
|
2
2
|
import {
|
|
3
3
|
SERVICE_KEY,
|
|
4
|
+
RELEASE_STATUS,
|
|
4
5
|
INDEX_TYPE,
|
|
6
|
+
PACKAGE_TYPE,
|
|
5
7
|
} from './constants';
|
|
6
8
|
|
|
7
|
-
import
|
|
9
|
+
import {
|
|
8
10
|
StoreConfig,
|
|
11
|
+
GetParams,
|
|
12
|
+
UniversalGetParams,
|
|
13
|
+
UploadCredentials,
|
|
9
14
|
OptionalParams,
|
|
10
15
|
CrossEnvOptionalParams,
|
|
11
|
-
|
|
16
|
+
DeprecateLegacyStepsParams,
|
|
17
|
+
ReleaseParams,
|
|
18
|
+
PaginationParams,
|
|
19
|
+
SearchParams,
|
|
20
|
+
CategoryData,
|
|
21
|
+
VersionOptions,
|
|
22
|
+
LegacyStepTemplate,
|
|
23
|
+
UploadCredentialsData,
|
|
24
|
+
SandboxUploadCredentialsData,
|
|
25
|
+
PackageType,
|
|
12
26
|
} from './types';
|
|
13
27
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
CreateCategoryBodyDTO,
|
|
18
|
-
CreatePackageByVersionBodyDTO,
|
|
19
|
-
CreatePackageByVersionResponseDTO,
|
|
20
|
-
CreatePackageReleaseBodyDTO,
|
|
21
|
-
CreateReleaseParamsDTO,
|
|
22
|
-
GetPackageArchiveSignedUrlDTO,
|
|
23
|
-
GetPackageByIdQueryUnionDTO,
|
|
24
|
-
GetPackageByIdResponseDTO,
|
|
25
|
-
GetPackageResponseDTO,
|
|
26
|
-
GetPackagesQueryDTO,
|
|
27
|
-
GetPackagesResponseDTO,
|
|
28
|
-
PackageParamNpmScopeDTO,
|
|
29
|
-
PackageParamUniversalDTO,
|
|
30
|
-
PutLegacyVersionResponseDTO,
|
|
31
|
-
SyncLegacyResponseDTO,
|
|
32
|
-
PutLegacyPackageBodyDTO,
|
|
33
|
-
DeprecateLegacyStepsBodyDTO,
|
|
34
|
-
PackageTypeEnum,
|
|
35
|
-
PackageStatusDetailsStatusEnum,
|
|
36
|
-
} from '@or-sdk/library-types-v1';
|
|
37
|
-
|
|
28
|
+
/**
|
|
29
|
+
* @deprecated Use @or-sdk/library instead
|
|
30
|
+
*/
|
|
38
31
|
export class Store extends Base {
|
|
39
|
-
private readonly packageType:
|
|
32
|
+
private readonly packageType: PackageType;
|
|
40
33
|
|
|
41
34
|
/**
|
|
42
35
|
* ```typescript
|
|
@@ -60,6 +53,8 @@ export class Store extends Base {
|
|
|
60
53
|
useDefaultSerializer: false,
|
|
61
54
|
});
|
|
62
55
|
|
|
56
|
+
console.warn('use @or-sdk/library instead of @or-sdk/store');
|
|
57
|
+
|
|
63
58
|
this.packageType = packageType;
|
|
64
59
|
}
|
|
65
60
|
|
|
@@ -67,9 +62,9 @@ export class Store extends Base {
|
|
|
67
62
|
* List all packages
|
|
68
63
|
*/
|
|
69
64
|
async getPackages(
|
|
70
|
-
params:
|
|
65
|
+
params: SearchParams,
|
|
71
66
|
{ type, signal }: OptionalParams = {}
|
|
72
|
-
)
|
|
67
|
+
) {
|
|
73
68
|
const packageType = type ?? this.packageType;
|
|
74
69
|
|
|
75
70
|
return this.callApiV2({
|
|
@@ -80,16 +75,16 @@ export class Store extends Base {
|
|
|
80
75
|
}
|
|
81
76
|
|
|
82
77
|
/**
|
|
83
|
-
* List all packages from the
|
|
78
|
+
* List all packages from the sandbox
|
|
84
79
|
*/
|
|
85
|
-
async
|
|
86
|
-
params:
|
|
80
|
+
async getSandbox(
|
|
81
|
+
params: SearchParams,
|
|
87
82
|
{ type, signal }: OptionalParams = {}
|
|
88
|
-
)
|
|
83
|
+
) {
|
|
89
84
|
const packageType = type ?? this.packageType;
|
|
90
85
|
|
|
91
86
|
return this.callApiV2({
|
|
92
|
-
route: `/api/v1/
|
|
87
|
+
route: `/api/v1/sandbox/${packageType}`,
|
|
93
88
|
signal,
|
|
94
89
|
params,
|
|
95
90
|
});
|
|
@@ -99,9 +94,9 @@ export class Store extends Base {
|
|
|
99
94
|
* List all categories
|
|
100
95
|
*/
|
|
101
96
|
async getCategories(
|
|
102
|
-
params
|
|
97
|
+
params: PaginationParams,
|
|
103
98
|
{ type, signal }: OptionalParams = {}
|
|
104
|
-
)
|
|
99
|
+
) {
|
|
105
100
|
const packageType = type || this.packageType;
|
|
106
101
|
|
|
107
102
|
return this.callApiV2({
|
|
@@ -115,9 +110,9 @@ export class Store extends Base {
|
|
|
115
110
|
* Upsert given category
|
|
116
111
|
*/
|
|
117
112
|
async putCategory(
|
|
118
|
-
data:
|
|
113
|
+
data: CategoryData,
|
|
119
114
|
{ type, signal, customHeaders }: CrossEnvOptionalParams = {}
|
|
120
|
-
)
|
|
115
|
+
) {
|
|
121
116
|
const packageType = type ?? this.packageType;
|
|
122
117
|
|
|
123
118
|
return this.callApiV2({
|
|
@@ -133,9 +128,9 @@ export class Store extends Base {
|
|
|
133
128
|
* Get category by ID
|
|
134
129
|
*/
|
|
135
130
|
async getCategoryById(
|
|
136
|
-
{ id }: Pick<
|
|
131
|
+
{ id }: Pick<GetParams, 'id'>,
|
|
137
132
|
{ type, signal }: OptionalParams = {}
|
|
138
|
-
)
|
|
133
|
+
) {
|
|
139
134
|
const packageType = type ?? this.packageType;
|
|
140
135
|
|
|
141
136
|
return this.callApiV2({
|
|
@@ -151,9 +146,9 @@ export class Store extends Base {
|
|
|
151
146
|
* ```
|
|
152
147
|
*/
|
|
153
148
|
public async getUploadCredentials(
|
|
154
|
-
data:
|
|
149
|
+
data: GetParams & UploadCredentialsData,
|
|
155
150
|
{ type, signal, customHeaders }: CrossEnvOptionalParams = {}
|
|
156
|
-
): Promise<
|
|
151
|
+
): Promise<UploadCredentials> {
|
|
157
152
|
const packageType = type ?? this.packageType;
|
|
158
153
|
const { id, version } = data;
|
|
159
154
|
|
|
@@ -167,18 +162,18 @@ export class Store extends Base {
|
|
|
167
162
|
}
|
|
168
163
|
|
|
169
164
|
/**
|
|
170
|
-
* Get credentials for uploading the package to the
|
|
165
|
+
* Get credentials for uploading the package to the sandbox (playground)
|
|
171
166
|
*/
|
|
172
|
-
async
|
|
173
|
-
data:
|
|
167
|
+
async getUploadCredentialsSandbox(
|
|
168
|
+
data: GetParams & SandboxUploadCredentialsData,
|
|
174
169
|
{ type, signal }: OptionalParams = {}
|
|
175
|
-
)
|
|
170
|
+
) {
|
|
176
171
|
const packageType = type ?? this.packageType;
|
|
177
172
|
const { id, version } = data;
|
|
178
173
|
|
|
179
174
|
return this.callApiV2({
|
|
180
175
|
method: 'POST',
|
|
181
|
-
route: `/api/v1/
|
|
176
|
+
route: `/api/v1/sandbox/${packageType}/id/${id}/version/${version}`,
|
|
182
177
|
data,
|
|
183
178
|
signal,
|
|
184
179
|
});
|
|
@@ -188,12 +183,18 @@ export class Store extends Base {
|
|
|
188
183
|
* List all versions of given package
|
|
189
184
|
*/
|
|
190
185
|
async getVersions(
|
|
191
|
-
{ id,
|
|
192
|
-
|
|
186
|
+
{ id, isSandbox, includeDeprecated, includeReleaseNotes, includeMember }:
|
|
187
|
+
Omit<UniversalGetParams, 'version'> & VersionOptions,
|
|
193
188
|
{ type, signal }: OptionalParams = {}
|
|
194
|
-
)
|
|
189
|
+
) {
|
|
195
190
|
const packageType = type ?? this.packageType;
|
|
196
|
-
const index =
|
|
191
|
+
const index = isSandbox ? INDEX_TYPE.SANDBOX : INDEX_TYPE.PACKAGES;
|
|
192
|
+
|
|
193
|
+
const params = {
|
|
194
|
+
includeDeprecated,
|
|
195
|
+
includeReleaseNotes,
|
|
196
|
+
includeMember,
|
|
197
|
+
};
|
|
197
198
|
|
|
198
199
|
return this.callApiV2({
|
|
199
200
|
route: `/api/v1/${index}/${packageType}/id/${id}`,
|
|
@@ -203,17 +204,17 @@ export class Store extends Base {
|
|
|
203
204
|
}
|
|
204
205
|
|
|
205
206
|
/**
|
|
206
|
-
* Delete given package version from playground
|
|
207
|
+
* Delete given package version from sandbox (playground)
|
|
207
208
|
*/
|
|
208
|
-
async
|
|
209
|
-
{ id, version }:
|
|
209
|
+
async deletePackageVersionFromSandbox(
|
|
210
|
+
{ id, version }: GetParams,
|
|
210
211
|
{ type, signal }: OptionalParams = {}
|
|
211
212
|
) {
|
|
212
213
|
const packageType = type ?? this.packageType;
|
|
213
214
|
|
|
214
215
|
return this.callApiV2({
|
|
215
216
|
method: 'DELETE',
|
|
216
|
-
route: `/api/v1/
|
|
217
|
+
route: `/api/v1/sandbox/${packageType}/id/${id}/version/${version}`,
|
|
217
218
|
signal,
|
|
218
219
|
});
|
|
219
220
|
}
|
|
@@ -222,9 +223,9 @@ export class Store extends Base {
|
|
|
222
223
|
* Get the latest version of the package meta by ID
|
|
223
224
|
*/
|
|
224
225
|
async getPackageMetaLatestVersionById(
|
|
225
|
-
{ id }: Pick<
|
|
226
|
+
{ id }: Pick<GetParams, 'id'>,
|
|
226
227
|
{ type, signal }: OptionalParams = {}
|
|
227
|
-
)
|
|
228
|
+
) {
|
|
228
229
|
const packageType = type ?? this.packageType;
|
|
229
230
|
|
|
230
231
|
return this.callApiV2({
|
|
@@ -236,15 +237,15 @@ export class Store extends Base {
|
|
|
236
237
|
/**
|
|
237
238
|
* Get download package archive url
|
|
238
239
|
* ```typescript
|
|
239
|
-
* const result = await storeApi.getMetaByVersion({ id: 'id', version: 'version',
|
|
240
|
+
* const result = await storeApi.getMetaByVersion({ id: 'id', version: 'version', isSandbox: false });
|
|
240
241
|
* ```
|
|
241
242
|
*/
|
|
242
243
|
async getMetaByVersion(
|
|
243
|
-
{ id, version,
|
|
244
|
+
{ id, version, isSandbox }: UniversalGetParams,
|
|
244
245
|
{ signal, customHeaders, type }: CrossEnvOptionalParams = {}
|
|
245
246
|
) {
|
|
246
247
|
const packageType = type ?? this.packageType;
|
|
247
|
-
const index =
|
|
248
|
+
const index = isSandbox ? INDEX_TYPE.SANDBOX : INDEX_TYPE.PACKAGES;
|
|
248
249
|
|
|
249
250
|
return this.callApiV2({
|
|
250
251
|
method: 'GET',
|
|
@@ -258,9 +259,9 @@ export class Store extends Base {
|
|
|
258
259
|
* List favorites
|
|
259
260
|
*/
|
|
260
261
|
async getFavorites(
|
|
261
|
-
params:
|
|
262
|
+
params: Omit<SearchParams, 'scope'>,
|
|
262
263
|
{ type, signal }: OptionalParams = {}
|
|
263
|
-
)
|
|
264
|
+
) {
|
|
264
265
|
const packageType = type ?? this.packageType;
|
|
265
266
|
|
|
266
267
|
return this.callApiV2({
|
|
@@ -274,14 +275,14 @@ export class Store extends Base {
|
|
|
274
275
|
* Submit legacy Step Template to Store API
|
|
275
276
|
*/
|
|
276
277
|
async submitLegacyStepJson(
|
|
277
|
-
legacyStepTemplate:
|
|
278
|
+
legacyStepTemplate: LegacyStepTemplate,
|
|
278
279
|
{ signal }: Pick<OptionalParams, 'signal'> = {}
|
|
279
|
-
)
|
|
280
|
-
const packageType =
|
|
280
|
+
) {
|
|
281
|
+
const packageType = PACKAGE_TYPE.STEP;
|
|
281
282
|
const { id, version = '0.0.1' } = legacyStepTemplate;
|
|
282
283
|
const data = {
|
|
283
284
|
data: legacyStepTemplate,
|
|
284
|
-
name: legacyStepTemplate.
|
|
285
|
+
name: legacyStepTemplate.label,
|
|
285
286
|
description: legacyStepTemplate.description,
|
|
286
287
|
categories: legacyStepTemplate.categories,
|
|
287
288
|
};
|
|
@@ -298,10 +299,10 @@ export class Store extends Base {
|
|
|
298
299
|
* Get legacy Step Template from Store API
|
|
299
300
|
*/
|
|
300
301
|
async getLegacyStepJson(
|
|
301
|
-
{ id, version }:
|
|
302
|
+
{ id, version }: GetParams,
|
|
302
303
|
{ signal }: Pick<OptionalParams, 'signal'> = {}
|
|
303
|
-
)
|
|
304
|
-
const packageType =
|
|
304
|
+
) {
|
|
305
|
+
const packageType = PACKAGE_TYPE.STEP;
|
|
305
306
|
|
|
306
307
|
return this.callApiV2({
|
|
307
308
|
route: `/api/v1/packages/${packageType}/id/${id}/version/${version}/json`,
|
|
@@ -310,12 +311,12 @@ export class Store extends Base {
|
|
|
310
311
|
}
|
|
311
312
|
|
|
312
313
|
/**
|
|
313
|
-
* Sync legacy Step Templates from
|
|
314
|
+
* Sync legacy Step Templates from Sandbox Account
|
|
314
315
|
*/
|
|
315
316
|
async syncLegacyStepFromLibrary(
|
|
316
|
-
{ id }: Pick<
|
|
317
|
+
{ id }: Pick<GetParams, 'id'>,
|
|
317
318
|
{ signal }: Pick<OptionalParams, 'signal'> = {}
|
|
318
|
-
)
|
|
319
|
+
) {
|
|
319
320
|
const packageType = 'STEP';
|
|
320
321
|
|
|
321
322
|
return this.callApiV2({
|
|
@@ -329,18 +330,24 @@ export class Store extends Base {
|
|
|
329
330
|
* Set release status
|
|
330
331
|
*/
|
|
331
332
|
async setReleaseStatus(
|
|
332
|
-
data:
|
|
333
|
+
data: GetParams & ReleaseParams,
|
|
333
334
|
{ type, signal }: OptionalParams = {}
|
|
334
|
-
)
|
|
335
|
+
) {
|
|
335
336
|
const packageType = type ?? this.packageType;
|
|
336
|
-
const { id, version } = data;
|
|
337
|
-
|
|
337
|
+
const { id, version, scope } = data;
|
|
338
|
+
let { repository } = data;
|
|
339
|
+
|
|
340
|
+
if (scope && !repository) { // scope is deprecated
|
|
341
|
+
console.warn('Using "scope" is deprecated. Use "repository" instead'); // eslint-disable-line no-undef
|
|
342
|
+
repository = scope;
|
|
343
|
+
}
|
|
338
344
|
|
|
339
|
-
delete data.
|
|
345
|
+
delete data.scope;
|
|
346
|
+
delete data.repository;
|
|
340
347
|
|
|
341
348
|
return this.callApiV2({
|
|
342
349
|
method: 'POST',
|
|
343
|
-
route: `/api/v1/packages/${packageType}/id/${id}/version/${version}/status/release/${
|
|
350
|
+
route: `/api/v1/packages/${packageType}/id/${id}/version/${version}/status/release/${repository}`,
|
|
344
351
|
data,
|
|
345
352
|
signal,
|
|
346
353
|
});
|
|
@@ -350,10 +357,10 @@ export class Store extends Base {
|
|
|
350
357
|
* Set release status to BETA
|
|
351
358
|
*/
|
|
352
359
|
async setReleaseStatusToBeta(
|
|
353
|
-
data:
|
|
360
|
+
data: GetParams & ReleaseParams,
|
|
354
361
|
{ type, signal }: OptionalParams = {}
|
|
355
|
-
)
|
|
356
|
-
const status =
|
|
362
|
+
) {
|
|
363
|
+
const status = RELEASE_STATUS.BETA;
|
|
357
364
|
|
|
358
365
|
return this.setReleaseStatus({
|
|
359
366
|
...data,
|
|
@@ -368,10 +375,10 @@ export class Store extends Base {
|
|
|
368
375
|
* Set release status to RELEASED
|
|
369
376
|
*/
|
|
370
377
|
async setReleaseStatusToReleased(
|
|
371
|
-
data:
|
|
378
|
+
data: GetParams & ReleaseParams,
|
|
372
379
|
{ type, signal }: OptionalParams = {}
|
|
373
|
-
)
|
|
374
|
-
const status =
|
|
380
|
+
) {
|
|
381
|
+
const status = RELEASE_STATUS.RELEASED;
|
|
375
382
|
|
|
376
383
|
return this.setReleaseStatus({
|
|
377
384
|
...data,
|
|
@@ -386,10 +393,10 @@ export class Store extends Base {
|
|
|
386
393
|
* Set release status to DEPRECATED
|
|
387
394
|
*/
|
|
388
395
|
async setReleaseStatusToDeprecated(
|
|
389
|
-
data:
|
|
396
|
+
data: GetParams & ReleaseParams,
|
|
390
397
|
{ type, signal }: OptionalParams = {}
|
|
391
|
-
)
|
|
392
|
-
const status =
|
|
398
|
+
) {
|
|
399
|
+
const status = RELEASE_STATUS.DEPRECATED;
|
|
393
400
|
|
|
394
401
|
return this.setReleaseStatus({
|
|
395
402
|
...data,
|
|
@@ -404,9 +411,9 @@ export class Store extends Base {
|
|
|
404
411
|
* Deprecate legacy Step Template
|
|
405
412
|
*/
|
|
406
413
|
async deprecateLegacyStep(
|
|
407
|
-
data:
|
|
414
|
+
data: GetParams & ReleaseParams,
|
|
408
415
|
{ signal }: Pick<OptionalParams, 'signal'> = {}
|
|
409
|
-
)
|
|
416
|
+
) {
|
|
410
417
|
const type = 'STEP';
|
|
411
418
|
|
|
412
419
|
return this.setReleaseStatusToDeprecated(data, {
|
|
@@ -419,7 +426,7 @@ export class Store extends Base {
|
|
|
419
426
|
* Deprecate multiple legacy Step Templates
|
|
420
427
|
*/
|
|
421
428
|
async deprecateLegacySteps(
|
|
422
|
-
data:
|
|
429
|
+
data: DeprecateLegacyStepsParams,
|
|
423
430
|
{ signal }: Pick<OptionalParams, 'signal'> = {}
|
|
424
431
|
) {
|
|
425
432
|
return this.callApiV2({
|
|
@@ -437,9 +444,9 @@ export class Store extends Base {
|
|
|
437
444
|
* ```
|
|
438
445
|
*/
|
|
439
446
|
public async getDownloadArchiveCredentials(
|
|
440
|
-
{ id, version }:
|
|
447
|
+
{ id, version }: GetParams,
|
|
441
448
|
{ signal, customHeaders }: CrossEnvOptionalParams = {}
|
|
442
|
-
): Promise<
|
|
449
|
+
): Promise<string> {
|
|
443
450
|
return this.callApiV2({
|
|
444
451
|
method: 'GET',
|
|
445
452
|
route: `/api/v1/packages/${this.packageType}/id/${id}/version/${version}/archive`,
|
|
@@ -455,9 +462,9 @@ export class Store extends Base {
|
|
|
455
462
|
* ```
|
|
456
463
|
*/
|
|
457
464
|
async syncInputFromLibrary(
|
|
458
|
-
{ id, version }:
|
|
465
|
+
{ id, version }: GetParams,
|
|
459
466
|
{ signal, customHeaders }: CrossEnvOptionalParams = {}
|
|
460
|
-
)
|
|
467
|
+
) {
|
|
461
468
|
return this.callApiV2({
|
|
462
469
|
method: 'PUT',
|
|
463
470
|
route: `/api/v1/service/sync/${this.packageType}/id/${id}/version/${version}`,
|
|
@@ -472,10 +479,7 @@ export class Store extends Base {
|
|
|
472
479
|
* const result = await storeApi.getNewPackages({size}, {customHeaders: {Auth: 'token'}});)
|
|
473
480
|
* ```
|
|
474
481
|
*/
|
|
475
|
-
async getNewPackages(
|
|
476
|
-
params: GetPackagesQueryDTO,
|
|
477
|
-
{ signal, customHeaders }: CrossEnvOptionalParams = {}
|
|
478
|
-
): Promise<GetPackagesResponseDTO> {
|
|
482
|
+
async getNewPackages(params: GetParams, { signal, customHeaders }: CrossEnvOptionalParams = {}) {
|
|
479
483
|
return this.callApi({
|
|
480
484
|
method: 'GET',
|
|
481
485
|
route: `/api/v1/packages/${this.packageType}/new`,
|
|
@@ -491,10 +495,7 @@ export class Store extends Base {
|
|
|
491
495
|
* const result = await storeApi.getNewPackages({size}, {customHeaders: {Auth: 'token'}});)
|
|
492
496
|
* ```
|
|
493
497
|
*/
|
|
494
|
-
async getPopularPackages(
|
|
495
|
-
params: GetPackagesQueryDTO,
|
|
496
|
-
{ signal, customHeaders }: CrossEnvOptionalParams = {}
|
|
497
|
-
): Promise<GetPackagesResponseDTO> {
|
|
498
|
+
async getPopularPackages(params: GetParams, { signal, customHeaders }: CrossEnvOptionalParams = {}) {
|
|
498
499
|
return this.callApi({
|
|
499
500
|
method: 'GET',
|
|
500
501
|
route: `/api/v1/packages/${this.packageType}/popular`,
|