@@ -47,12 +47,13 @@ export async function getServiceAccountInsertSerialOperations(
47
47
const {
48
48
deep,
49
49
serviceAccount,
50
- containValue,
50
+ valueForContainForServiceAccount,
51
+ valueForContainForUsesServiceAccount,
51
52
shouldMakeActive = false
52
53
} = param ;
53
54
const containerLinkId = param . containerLinkId !== null ? param . containerLinkId ?? deep . linkId : null ;
54
55
const reservedLinkIds = await getReservedLinkIds ( ) ;
55
- const { containForServiceAccountLinkId : containLinkId , serviceAccountLinkId, usesServiceAccountLinkId, containForUsesServiceAccountLinkId } = reservedLinkIds ;
56
+ const { containForServiceAccountLinkId, serviceAccountLinkId, usesServiceAccountLinkId, containForUsesServiceAccountLinkId } = reservedLinkIds ;
56
57
const typeLinkIds = await getTypeLinkIds ( ) ;
57
58
const { containTypeLinkId, serviceAccountTypeLinkId , usesServiceAccountTypeLinkId} = typeLinkIds ;
58
59
const serialOperations = [ ] ;
@@ -79,7 +80,7 @@ export async function getServiceAccountInsertSerialOperations(
79
80
type : 'insert' ,
80
81
table : 'links' ,
81
82
objects : {
82
- id : containLinkId ,
83
+ id : containForServiceAccountLinkId ,
83
84
type_id : containTypeLinkId ,
84
85
from_id : containerLinkId ,
85
86
to_id : serviceAccountLinkId ,
@@ -90,8 +91,8 @@ export async function getServiceAccountInsertSerialOperations(
90
91
type : 'insert' ,
91
92
table : 'objects' ,
92
93
objects : {
93
- link_id : containLinkId ,
94
- value : containValue ,
94
+ link_id : containForServiceAccountLinkId ,
95
+ value : valueForContainForServiceAccount ,
95
96
} ,
96
97
} ) ;
97
98
serialOperations . push ( valueOfContainInsertSerialOperation ) ;
@@ -121,6 +122,16 @@ export async function getServiceAccountInsertSerialOperations(
121
122
}
122
123
} )
123
124
serialOperations . push ( containForUsesServiceAccountInsertSerialOperation ) ;
125
+
126
+ const valueForContainInsertSerialOperation = createSerialOperation ( {
127
+ type : 'insert' ,
128
+ table : 'objects' ,
129
+ objects : {
130
+ link_id : containForUsesServiceAccountLinkId ,
131
+ value : valueForContainForUsesServiceAccount ,
132
+ } ,
133
+ } ) ;
134
+ serialOperations . push ( valueForContainInsertSerialOperation ) ;
124
135
}
125
136
}
126
137
@@ -237,12 +248,19 @@ export interface GetServiceAccountInsertSerialOperationsParam {
237
248
*/
238
249
containerLinkId ?: number | undefined | null ;
239
250
/**
240
- * Value of the contain link
251
+ * Value for the contain link for {@link LinkName.ServiceAccount}
252
+ *
253
+ * @remarks
254
+ * If {@link GetServiceAccountInsertSerialOperationsParam.containerLinkId} is null, this will be ignored
255
+ */
256
+ valueForContainForServiceAccount ?: string | undefined ;
257
+ /**
258
+ * Value for the contain link for {@link LinkName.UsesServiceAccount}
241
259
*
242
260
* @remarks
243
261
* If {@link GetServiceAccountInsertSerialOperationsParam.containerLinkId} is null, this will be ignored
244
262
*/
245
- containValue ?: string | undefined ;
263
+ valueForContainForUsesServiceAccount ?: string | undefined ;
246
264
/**
247
265
* If true, the link will be made active by creating a {@link LinkName.UsesServiceAccount} link pointing to it
248
266
*
0 commit comments