@@ -47,12 +47,13 @@ export async function getServiceAccountInsertSerialOperations(
4747 const {
4848 deep,
4949 serviceAccount,
50- containValue,
50+ valueForContainForServiceAccount,
51+ valueForContainForUsesServiceAccount,
5152 shouldMakeActive = false
5253 } = param ;
5354 const containerLinkId = param . containerLinkId !== null ? param . containerLinkId ?? deep . linkId : null ;
5455 const reservedLinkIds = await getReservedLinkIds ( ) ;
55- const { containForServiceAccountLinkId : containLinkId , serviceAccountLinkId, usesServiceAccountLinkId, containForUsesServiceAccountLinkId } = reservedLinkIds ;
56+ const { containForServiceAccountLinkId, serviceAccountLinkId, usesServiceAccountLinkId, containForUsesServiceAccountLinkId } = reservedLinkIds ;
5657 const typeLinkIds = await getTypeLinkIds ( ) ;
5758 const { containTypeLinkId, serviceAccountTypeLinkId , usesServiceAccountTypeLinkId} = typeLinkIds ;
5859 const serialOperations = [ ] ;
@@ -79,7 +80,7 @@ export async function getServiceAccountInsertSerialOperations(
7980 type : 'insert' ,
8081 table : 'links' ,
8182 objects : {
82- id : containLinkId ,
83+ id : containForServiceAccountLinkId ,
8384 type_id : containTypeLinkId ,
8485 from_id : containerLinkId ,
8586 to_id : serviceAccountLinkId ,
@@ -90,8 +91,8 @@ export async function getServiceAccountInsertSerialOperations(
9091 type : 'insert' ,
9192 table : 'objects' ,
9293 objects : {
93- link_id : containLinkId ,
94- value : containValue ,
94+ link_id : containForServiceAccountLinkId ,
95+ value : valueForContainForServiceAccount ,
9596 } ,
9697 } ) ;
9798 serialOperations . push ( valueOfContainInsertSerialOperation ) ;
@@ -121,6 +122,16 @@ export async function getServiceAccountInsertSerialOperations(
121122 }
122123 } )
123124 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 ) ;
124135 }
125136 }
126137
@@ -237,12 +248,19 @@ export interface GetServiceAccountInsertSerialOperationsParam {
237248 */
238249 containerLinkId ?: number | undefined | null ;
239250 /**
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}
241259 *
242260 * @remarks
243261 * If {@link GetServiceAccountInsertSerialOperationsParam.containerLinkId} is null, this will be ignored
244262 */
245- containValue ?: string | undefined ;
263+ valueForContainForUsesServiceAccount ?: string | undefined ;
246264 /**
247265 * If true, the link will be made active by creating a {@link LinkName.UsesServiceAccount} link pointing to it
248266 *
0 commit comments