@api-client/core 0.12.14 → 0.12.16
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/build/src/models/store/Invitation.d.ts +11 -0
- package/build/src/models/store/Invitation.d.ts.map +1 -1
- package/build/src/models/store/Invitation.js +9 -1
- package/build/src/models/store/Invitation.js.map +1 -1
- package/build/src/sdk/OrganizationsSdk.d.ts +1 -1
- package/build/src/sdk/OrganizationsSdk.d.ts.map +1 -1
- package/build/src/sdk/OrganizationsSdk.js +2 -2
- package/build/src/sdk/OrganizationsSdk.js.map +1 -1
- package/build/src/sdk/RouteBuilder.d.ts +1 -1
- package/build/src/sdk/RouteBuilder.d.ts.map +1 -1
- package/build/src/sdk/RouteBuilder.js +2 -2
- package/build/src/sdk/RouteBuilder.js.map +1 -1
- package/build/tsconfig.tsbuildinfo +1 -0
- package/data/models/example-generator-api.json +25 -25
- package/package.json +1 -1
- package/src/models/store/Invitation.ts +19 -0
- package/src/sdk/OrganizationsSdk.ts +2 -2
- package/src/sdk/RouteBuilder.ts +2 -2
- package/tests/unit/models/store/Invitation.spec.ts +4 -0
- package/tsconfig.browser.json +2 -1
- package/tsconfig.node.json +2 -1
|
@@ -41725,19 +41725,19 @@
|
|
|
41725
41725
|
"@id": "#191"
|
|
41726
41726
|
},
|
|
41727
41727
|
{
|
|
41728
|
-
"@id": "#
|
|
41728
|
+
"@id": "#194"
|
|
41729
41729
|
},
|
|
41730
41730
|
{
|
|
41731
|
-
"@id": "#
|
|
41731
|
+
"@id": "#200"
|
|
41732
41732
|
},
|
|
41733
41733
|
{
|
|
41734
|
-
"@id": "#
|
|
41734
|
+
"@id": "#197"
|
|
41735
41735
|
},
|
|
41736
41736
|
{
|
|
41737
|
-
"@id": "#
|
|
41737
|
+
"@id": "#203"
|
|
41738
41738
|
},
|
|
41739
41739
|
{
|
|
41740
|
-
"@id": "#
|
|
41740
|
+
"@id": "#206"
|
|
41741
41741
|
},
|
|
41742
41742
|
{
|
|
41743
41743
|
"@id": "#209"
|
|
@@ -42470,6 +42470,9 @@
|
|
|
42470
42470
|
"@id": "#219"
|
|
42471
42471
|
},
|
|
42472
42472
|
{
|
|
42473
|
+
"@id": "#219"
|
|
42474
|
+
},
|
|
42475
|
+
{
|
|
42473
42476
|
"@id": "#210"
|
|
42474
42477
|
},
|
|
42475
42478
|
{
|
|
@@ -42477,9 +42480,6 @@
|
|
|
42477
42480
|
},
|
|
42478
42481
|
{
|
|
42479
42482
|
"@id": "#216"
|
|
42480
|
-
},
|
|
42481
|
-
{
|
|
42482
|
-
"@id": "#219"
|
|
42483
42483
|
}
|
|
42484
42484
|
],
|
|
42485
42485
|
"doc:root": false,
|
|
@@ -43117,7 +43117,7 @@
|
|
|
43117
43117
|
"doc:ExternalDomainElement",
|
|
43118
43118
|
"doc:DomainElement"
|
|
43119
43119
|
],
|
|
43120
|
-
"doc:raw": "
|
|
43120
|
+
"doc:raw": "addressType: 'REGISTERED-OFFICE-ADDRESS'\nstreetName: 'UITBREIDINGSTRAAT'\nhouseNumber: '84'\nhouseNumberAddition: '/1'\npostalCode: '2600'\ncity: 'BERCHEM (ANTWERPEN)'\ncountry: 'Belgium'\ncountryCode: 'BE'\nfullFormatedAddress: \"UITBREIDINGSTRAAT 84 /1, 2600 BERCHEM (ANTWERPEN), BELIUM\"\n",
|
|
43121
43121
|
"core:mediaType": "application/yaml",
|
|
43122
43122
|
"sourcemaps:sources": [
|
|
43123
43123
|
{
|
|
@@ -43138,7 +43138,7 @@
|
|
|
43138
43138
|
"doc:ExternalDomainElement",
|
|
43139
43139
|
"doc:DomainElement"
|
|
43140
43140
|
],
|
|
43141
|
-
"doc:raw": "
|
|
43141
|
+
"doc:raw": "class: '3'\ndescription: '150 - 300'\nnumberOfFte: 5500\nnumberOfEmployees: 5232\n",
|
|
43142
43142
|
"core:mediaType": "application/yaml",
|
|
43143
43143
|
"sourcemaps:sources": [
|
|
43144
43144
|
{
|
|
@@ -43159,7 +43159,7 @@
|
|
|
43159
43159
|
"doc:ExternalDomainElement",
|
|
43160
43160
|
"doc:DomainElement"
|
|
43161
43161
|
],
|
|
43162
|
-
"doc:raw": "code: '
|
|
43162
|
+
"doc:raw": "code: '5'\ndescription: 'Limited company'\n",
|
|
43163
43163
|
"core:mediaType": "application/yaml",
|
|
43164
43164
|
"sourcemaps:sources": [
|
|
43165
43165
|
{
|
|
@@ -43180,7 +43180,7 @@
|
|
|
43180
43180
|
"doc:ExternalDomainElement",
|
|
43181
43181
|
"doc:DomainElement"
|
|
43182
43182
|
],
|
|
43183
|
-
"doc:raw": "
|
|
43183
|
+
"doc:raw": "code: 'J'\ndescription: 'Information and communication'\n",
|
|
43184
43184
|
"core:mediaType": "application/yaml",
|
|
43185
43185
|
"sourcemaps:sources": [
|
|
43186
43186
|
{
|
|
@@ -43201,7 +43201,7 @@
|
|
|
43201
43201
|
"doc:ExternalDomainElement",
|
|
43202
43202
|
"doc:DomainElement"
|
|
43203
43203
|
],
|
|
43204
|
-
"doc:raw": "code: '
|
|
43204
|
+
"doc:raw": "code: '7487'\ndescription: 'Financial and insurance activities'\ntype: \"PRIMARY\"\nclassificationCode: 'BE_NACEBEL2008'\nactivityGroupCode: 'ABCDE'\n",
|
|
43205
43205
|
"core:mediaType": "application/yaml",
|
|
43206
43206
|
"sourcemaps:sources": [
|
|
43207
43207
|
{
|
|
@@ -43892,7 +43892,7 @@
|
|
|
43892
43892
|
"doc:ExternalDomainElement",
|
|
43893
43893
|
"doc:DomainElement"
|
|
43894
43894
|
],
|
|
43895
|
-
"doc:raw": "type: 'GENERAL'\ncountryDialCode : '+32'\nareaCode : '
|
|
43895
|
+
"doc:raw": "type: 'GENERAL'\ncountryDialCode : '+32'\nareaCode : '21'\nsubscriberNumber: '12.87.00'\nformatted: '+32-(0)21 302099'\n",
|
|
43896
43896
|
"core:mediaType": "application/yaml",
|
|
43897
43897
|
"sourcemaps:sources": [
|
|
43898
43898
|
{
|
|
@@ -43913,7 +43913,7 @@
|
|
|
43913
43913
|
"doc:ExternalDomainElement",
|
|
43914
43914
|
"doc:DomainElement"
|
|
43915
43915
|
],
|
|
43916
|
-
"doc:raw": "type: 'GENERAL'\
|
|
43916
|
+
"doc:raw": "-\n type: 'GENERAL'\n value: 'info@company.be'\n-\n type: 'IT_DEPT'\n value: 'it-service@company.be'\n",
|
|
43917
43917
|
"core:mediaType": "application/yaml",
|
|
43918
43918
|
"sourcemaps:sources": [
|
|
43919
43919
|
{
|
|
@@ -43934,7 +43934,7 @@
|
|
|
43934
43934
|
"doc:ExternalDomainElement",
|
|
43935
43935
|
"doc:DomainElement"
|
|
43936
43936
|
],
|
|
43937
|
-
"doc:raw": "
|
|
43937
|
+
"doc:raw": "type: \"GENERAL\"\nvalue: \"www.company.be\"\n",
|
|
43938
43938
|
"core:mediaType": "application/yaml",
|
|
43939
43939
|
"sourcemaps:sources": [
|
|
43940
43940
|
{
|
|
@@ -43955,7 +43955,7 @@
|
|
|
43955
43955
|
"doc:ExternalDomainElement",
|
|
43956
43956
|
"doc:DomainElement"
|
|
43957
43957
|
],
|
|
43958
|
-
"doc:raw": "type:
|
|
43958
|
+
"doc:raw": "type: 'GENERAL'\ncountryDialCode : '+32'\nareaCode : '22'\nsubscriberNumber: '12.87.00'\nformatted: '+32-(0)22 000000'\n",
|
|
43959
43959
|
"core:mediaType": "application/yaml",
|
|
43960
43960
|
"sourcemaps:sources": [
|
|
43961
43961
|
{
|
|
@@ -44421,27 +44421,27 @@
|
|
|
44421
44421
|
{
|
|
44422
44422
|
"@id": "#196/source-map/lexical/element_0",
|
|
44423
44423
|
"sourcemaps:element": "amf://id#196",
|
|
44424
|
-
"sourcemaps:value": "[(1,0)-(
|
|
44424
|
+
"sourcemaps:value": "[(1,0)-(10,0)]"
|
|
44425
44425
|
},
|
|
44426
44426
|
{
|
|
44427
44427
|
"@id": "#199/source-map/lexical/element_0",
|
|
44428
44428
|
"sourcemaps:element": "amf://id#199",
|
|
44429
|
-
"sourcemaps:value": "[(1,0)-(
|
|
44429
|
+
"sourcemaps:value": "[(1,0)-(5,0)]"
|
|
44430
44430
|
},
|
|
44431
44431
|
{
|
|
44432
44432
|
"@id": "#202/source-map/lexical/element_0",
|
|
44433
44433
|
"sourcemaps:element": "amf://id#202",
|
|
44434
|
-
"sourcemaps:value": "[(1,0)-(
|
|
44434
|
+
"sourcemaps:value": "[(1,0)-(3,0)]"
|
|
44435
44435
|
},
|
|
44436
44436
|
{
|
|
44437
44437
|
"@id": "#205/source-map/lexical/element_0",
|
|
44438
44438
|
"sourcemaps:element": "amf://id#205",
|
|
44439
|
-
"sourcemaps:value": "[(1,0)-(
|
|
44439
|
+
"sourcemaps:value": "[(1,0)-(3,0)]"
|
|
44440
44440
|
},
|
|
44441
44441
|
{
|
|
44442
44442
|
"@id": "#208/source-map/lexical/element_0",
|
|
44443
44443
|
"sourcemaps:element": "amf://id#208",
|
|
44444
|
-
"sourcemaps:value": "[(1,0)-(
|
|
44444
|
+
"sourcemaps:value": "[(1,0)-(6,0)]"
|
|
44445
44445
|
},
|
|
44446
44446
|
{
|
|
44447
44447
|
"@id": "#223/source-map/lexical/element_0",
|
|
@@ -44781,17 +44781,17 @@
|
|
|
44781
44781
|
{
|
|
44782
44782
|
"@id": "#215/source-map/lexical/element_0",
|
|
44783
44783
|
"sourcemaps:element": "amf://id#215",
|
|
44784
|
-
"sourcemaps:value": "[(1,0)-(
|
|
44784
|
+
"sourcemaps:value": "[(1,0)-(7,0)]"
|
|
44785
44785
|
},
|
|
44786
44786
|
{
|
|
44787
44787
|
"@id": "#218/source-map/lexical/element_0",
|
|
44788
44788
|
"sourcemaps:element": "amf://id#218",
|
|
44789
|
-
"sourcemaps:value": "[(1,0)-(
|
|
44789
|
+
"sourcemaps:value": "[(1,0)-(3,0)]"
|
|
44790
44790
|
},
|
|
44791
44791
|
{
|
|
44792
44792
|
"@id": "#221/source-map/lexical/element_0",
|
|
44793
44793
|
"sourcemaps:element": "amf://id#221",
|
|
44794
|
-
"sourcemaps:value": "[(1,0)-(
|
|
44794
|
+
"sourcemaps:value": "[(1,0)-(6,0)]"
|
|
44795
44795
|
},
|
|
44796
44796
|
{
|
|
44797
44797
|
"@id": "#338/source-map/synthesized-field/element_1",
|
package/package.json
CHANGED
|
@@ -82,6 +82,15 @@ export interface InvitationSchema {
|
|
|
82
82
|
* The timestamp when the invitation was last updated.
|
|
83
83
|
*/
|
|
84
84
|
updatedAt: number
|
|
85
|
+
/**
|
|
86
|
+
* Number of times the invitation was resent to the user.
|
|
87
|
+
*/
|
|
88
|
+
resent: number
|
|
89
|
+
/**
|
|
90
|
+
* The timestamp when the invitation was last sent.
|
|
91
|
+
* This is used to track when the invitation was last communicated to the user.
|
|
92
|
+
*/
|
|
93
|
+
lastSentAt: number
|
|
85
94
|
}
|
|
86
95
|
|
|
87
96
|
/**
|
|
@@ -104,6 +113,8 @@ export class Invitation implements InvitationSchema {
|
|
|
104
113
|
deletedInfo: IDeletion | undefined
|
|
105
114
|
createdAt: number
|
|
106
115
|
updatedAt: number
|
|
116
|
+
resent: number
|
|
117
|
+
lastSentAt: number
|
|
107
118
|
|
|
108
119
|
#builder?: Builder<InvitationSchema>
|
|
109
120
|
|
|
@@ -133,6 +144,8 @@ export class Invitation implements InvitationSchema {
|
|
|
133
144
|
updatedAt = 0,
|
|
134
145
|
createdAt = 0,
|
|
135
146
|
expiresAt = 0,
|
|
147
|
+
resent = 0,
|
|
148
|
+
lastSentAt = 0,
|
|
136
149
|
status = 'pending',
|
|
137
150
|
token = '',
|
|
138
151
|
} = input
|
|
@@ -157,6 +170,8 @@ export class Invitation implements InvitationSchema {
|
|
|
157
170
|
status,
|
|
158
171
|
createdAt,
|
|
159
172
|
updatedAt,
|
|
173
|
+
resent,
|
|
174
|
+
lastSentAt,
|
|
160
175
|
}
|
|
161
176
|
if (input.name) {
|
|
162
177
|
result.name = input.name
|
|
@@ -197,6 +212,8 @@ export class Invitation implements InvitationSchema {
|
|
|
197
212
|
this.deletedInfo = init.deletedInfo
|
|
198
213
|
this.createdAt = init.createdAt
|
|
199
214
|
this.updatedAt = init.updatedAt
|
|
215
|
+
this.resent = init.resent
|
|
216
|
+
this.lastSentAt = init.lastSentAt
|
|
200
217
|
}
|
|
201
218
|
|
|
202
219
|
toJSON(): InvitationSchema {
|
|
@@ -213,6 +230,8 @@ export class Invitation implements InvitationSchema {
|
|
|
213
230
|
deleted: this.deleted,
|
|
214
231
|
createdAt: this.createdAt,
|
|
215
232
|
updatedAt: this.updatedAt,
|
|
233
|
+
resent: this.resent,
|
|
234
|
+
lastSentAt: this.lastSentAt,
|
|
216
235
|
}
|
|
217
236
|
if (this.name) {
|
|
218
237
|
result.name = this.name
|
|
@@ -172,8 +172,8 @@ export class OrganizationsSdk extends SdkBase {
|
|
|
172
172
|
* @param request The request options.
|
|
173
173
|
* @returns A promise that resolves to the found invitation.
|
|
174
174
|
*/
|
|
175
|
-
findByToken: async (
|
|
176
|
-
const url = this.sdk.getUrl(RouteBuilder.findInvitation(
|
|
175
|
+
findByToken: async (token: string, request: SdkOptions = {}): Promise<InvitationSchema> => {
|
|
176
|
+
const url = this.sdk.getUrl(RouteBuilder.findInvitation())
|
|
177
177
|
url.searchParams.append('token', token)
|
|
178
178
|
const result = await this.sdk.http.get(url.toString(), request)
|
|
179
179
|
this.inspectCommonStatusCodes(result)
|
package/src/sdk/RouteBuilder.ts
CHANGED
|
@@ -200,8 +200,8 @@ export class RouteBuilder {
|
|
|
200
200
|
return `${this.invitations(oid)}/${id}`
|
|
201
201
|
}
|
|
202
202
|
|
|
203
|
-
static findInvitation(
|
|
204
|
-
return `${this.
|
|
203
|
+
static findInvitation(): string {
|
|
204
|
+
return `${this.organizations()}/find-invitation`
|
|
205
205
|
}
|
|
206
206
|
|
|
207
207
|
static declineInvitation(oid: string, id: string): string {
|
|
@@ -48,6 +48,8 @@ test.group('Invitation', (group) => {
|
|
|
48
48
|
deletedInfo: { time: Date.now(), user: 'admin-user', byMe: false, name: 'Admin' },
|
|
49
49
|
createdAt: Date.now() - 7200000,
|
|
50
50
|
updatedAt: Date.now() - 3600000,
|
|
51
|
+
resent: 0,
|
|
52
|
+
lastSentAt: Date.now() - 180000,
|
|
51
53
|
}
|
|
52
54
|
const invitation = new Invitation(fullInput)
|
|
53
55
|
assert.deepEqual(invitation.toJSON(), fullInput)
|
|
@@ -89,6 +91,8 @@ test.group('Invitation', (group) => {
|
|
|
89
91
|
deletedInfo: deletionInfo,
|
|
90
92
|
createdAt: 1230000000,
|
|
91
93
|
updatedAt: 1234000000,
|
|
94
|
+
resent: 0, // default
|
|
95
|
+
lastSentAt: 0, // default
|
|
92
96
|
})
|
|
93
97
|
})
|
|
94
98
|
|
package/tsconfig.browser.json
CHANGED
|
@@ -26,7 +26,8 @@
|
|
|
26
26
|
"checkJs": false,
|
|
27
27
|
"allowJs": true,
|
|
28
28
|
"resolveJsonModule": true,
|
|
29
|
-
"skipLibCheck": true
|
|
29
|
+
"skipLibCheck": true,
|
|
30
|
+
"incremental": true
|
|
30
31
|
},
|
|
31
32
|
"include": ["src/**/*", "test/**/*"],
|
|
32
33
|
"exclude": ["node_modules", "build", "coverage", ".tmp", ".wireit", "amf-models", "bin", "data", "docs", "scripts"],
|
package/tsconfig.node.json
CHANGED
|
@@ -28,7 +28,8 @@
|
|
|
28
28
|
"skipLibCheck": true,
|
|
29
29
|
"checkJs": false,
|
|
30
30
|
"allowJs": true,
|
|
31
|
-
"resolveJsonModule": true
|
|
31
|
+
"resolveJsonModule": true,
|
|
32
|
+
"incremental": true
|
|
32
33
|
},
|
|
33
34
|
"include": ["src/**/*", "tests/**/*", "bin/test.ts"],
|
|
34
35
|
"exclude": ["node_modules", "build", "coverage", ".tmp", ".wireit", "amf-models", "data", "docs", "scripts"],
|