@iconicompany/imarketplacetypes 1.0.6 → 1.0.8

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.
@@ -7,6 +7,7 @@ on:
7
7
 
8
8
 
9
9
  permissions:
10
+ id-token: write # Required for OIDC https://docs.npmjs.com/trusted-publishers
10
11
  contents: write # нужно для пуша
11
12
 
12
13
  jobs:
@@ -14,29 +15,22 @@ jobs:
14
15
  runs-on: ubuntu-latest
15
16
 
16
17
  steps:
17
- - uses: actions/checkout@v3
18
- - uses: actions/setup-node@v3
18
+ - uses: actions/checkout@v4
19
+ - uses: actions/setup-node@v4
19
20
  with:
20
21
  node-version: 20
21
22
  registry-url: https://registry.npmjs.org/
22
-
23
- - name: Install dependencies
24
- run: npm ci
25
-
26
- - name: Build
27
- run: npm run build
28
-
23
+ # Ensure npm 11.5.1 or later is installed
24
+ - run: npm install -g npm@latest
25
+ - run: npm ci
26
+ - run: npm run build
29
27
  - name: Bump version
30
28
  run: |
31
29
  git config --global user.name "github-actions"
32
30
  git config --global user.email "github-actions@github.com"
33
31
  npm version patch --force
34
-
35
32
  - name: Publish to NPM
36
33
  run: npm publish --access public
37
- env:
38
- NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
39
-
40
34
  - name: Commit and push
41
35
  run: |
42
36
  git push
@@ -4,24 +4,48 @@ on:
4
4
  release:
5
5
  types: [created]
6
6
 
7
+ permissions:
8
+ contents: write # нужно для пуша
9
+
7
10
  jobs:
8
11
  publish-npm:
9
12
  runs-on: ubuntu-latest
10
13
  steps:
11
14
  - uses: actions/checkout@v3
15
+ with:
16
+ # Checkout the branch where the release was created, not the tag
17
+ ref: ${{ github.event.release.target_commitish }}
12
18
  - uses: actions/setup-node@v3
13
19
  with:
14
20
  node-version: 20
15
21
  registry-url: https://registry.npmjs.org/
16
- - name: Extract tag name
17
- id: get_version
18
- run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
19
- - name: Update package.json
22
+ - name: Install dependencies
23
+ run: npm ci
24
+ - name: Build
25
+ run: npm run build
26
+ - name: Bump version to release tag
27
+ id: bump_version
20
28
  run: |
21
- VERSION=${{ steps.get_version.outputs.VERSION }}
22
- sed -i "s/\"version\": \"1.0.0\"/\"version\": \"$VERSION\"/" package.json
23
- - run: npm ci
24
- - run: npm run build
25
- - run: npm publish
29
+ git config --global user.name "github-actions"
30
+ git config --global user.email "github-actions@github.com"
31
+ # GITHUB_REF is in format refs/tags/<tag_name>, we want the tag name
32
+ VERSION=${GITHUB_REF#refs/tags/}
33
+ echo "version=$VERSION" >> $GITHUB_OUTPUT
34
+ # Use npm version to update package.json and package-lock.json
35
+ # --no-git-tag-version prevents it from creating a commit or tag
36
+ npm version $VERSION --no-git-tag-version --allow-same-version
37
+ - name: Publish to NPM
38
+ run: npm publish --access public
26
39
  env:
27
40
  NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
41
+ - name: Commit and push version bump
42
+ run: |
43
+ # Commit the changes made by npm version
44
+ git add package.json package-lock.json
45
+ # Check if there are changes to commit
46
+ if git diff --staged --quiet; then
47
+ echo "Version already up to date."
48
+ else
49
+ git commit -m "chore(release): bump version to ${{ steps.bump_version.outputs.version }}"
50
+ git push
51
+ fi
@@ -10,7 +10,7 @@ export interface OfferContract {
10
10
  };
11
11
  result: getPaginatedOffersResult;
12
12
  };
13
- getCandidate: {
13
+ getOffer: {
14
14
  params: {
15
15
  id: string;
16
16
  };
@@ -36,6 +36,7 @@ interface DefaultOffer {
36
36
  createdBy?: ("user" | "databaseСomparison" | "loader" | "cosineSimilarity" | "importByLink") | null;
37
37
  respondedAt?: string | null;
38
38
  matchedBatch?: number | null;
39
+ liked?: boolean | null;
39
40
  updatedAt: string;
40
41
  createdAt: string;
41
42
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iconicompany/imarketplacetypes",
3
- "version": "1.0.6",
3
+ "version": "1.0.8",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "module": "dist/index.js",
@@ -22,3 +22,4 @@ export interface JobContract {
22
22
  result: getJobSelectResult;
23
23
  };
24
24
  }
25
+
@@ -11,7 +11,7 @@ export interface OfferContract {
11
11
  };
12
12
 
13
13
  // /offers/:id
14
- getCandidate: {
14
+ getOffer: {
15
15
  params: { id: string };
16
16
  result: DetailedOffer | undefined;
17
17
  };
@@ -11,12 +11,12 @@ interface OfferRequirement {
11
11
  matched: number;
12
12
  comment?: string | null;
13
13
  questions?:
14
- | {
15
- question?: string | null;
16
- answer?: string | null;
17
- id?: string | null;
18
- }[]
19
- | null;
14
+ | {
15
+ question?: string | null;
16
+ answer?: string | null;
17
+ id?: string | null;
18
+ }[]
19
+ | null;
20
20
  }
21
21
 
22
22
  interface DefaultOffer {
@@ -38,16 +38,18 @@ interface DefaultOffer {
38
38
  comment?: string | null;
39
39
  assessmentOfRequirements?: string | null;
40
40
  createdBy?:
41
- | (
42
- | "user"
43
- | "databaseСomparison"
44
- | "loader"
45
- | "cosineSimilarity"
46
- | "importByLink"
47
- )
48
- | null;
41
+ | (
42
+ | "user"
43
+ | "databaseСomparison"
44
+ | "loader"
45
+ | "cosineSimilarity"
46
+ | "importByLink"
47
+ )
48
+ | null;
49
49
  respondedAt?: string | null;
50
50
  matchedBatch?: number | null;
51
+ liked?: boolean | null;
52
+
51
53
  updatedAt: string;
52
54
  createdAt: string;
53
55
  }