@spytecgps/nova-orm 1.0.50 → 1.0.52
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/index.js +1 -1
- package/dist/repositories/billing/upsertBillingCustomerBraintree.js +10 -1
- package/dist/repositories/billing/upsertBillingCustomerBraintree.js.map +1 -1
- package/dist/repositories/entityTags/index.d.ts +6 -6
- package/dist/repositories/entityTags/index.js +12 -12
- package/dist/repositories/entityTags/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -33,7 +33,16 @@ export const upsertBillingCustomerBraintree = async (novaDataSource, params, log
|
|
|
33
33
|
createdAt: existingBillingCustomerBraintree?.createdAt ?? now,
|
|
34
34
|
updatedAt: now,
|
|
35
35
|
};
|
|
36
|
-
const
|
|
36
|
+
const upsertResult = await billingCustomerBraintreeRepository.upsert(billingCustomerBraintree, {
|
|
37
|
+
conflictPaths: ['id'],
|
|
38
|
+
});
|
|
39
|
+
const result = upsertResult?.raw?.affectedRows > 0
|
|
40
|
+
? await billingCustomerBraintreeRepository.findOne({
|
|
41
|
+
where: {
|
|
42
|
+
id: params.id,
|
|
43
|
+
},
|
|
44
|
+
})
|
|
45
|
+
: null;
|
|
37
46
|
return result;
|
|
38
47
|
}, 'BillingRepository::upsertBillingCustomerBraintree');
|
|
39
48
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upsertBillingCustomerBraintree.js","sourceRoot":"","sources":["../../../src/repositories/billing/upsertBillingCustomerBraintree.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAA;AAKzD,MAAM,CAAC,MAAM,8BAA8B,GAAG,KAAK,EACjD,cAA8B,EAC9B,MAA4C,EAC5C,MAAc,EACqB,EAAE;IACrC,iBAAiB;IACjB,IAAI,CAAC,MAAM,EAAE,EAAE,EAAE;QACf,MAAM,CAAC,IAAI,CACT,EAAE,MAAM,EAAE,EACV,iFAAiF,CAClF,CAAA;QACD,OAAO,IAAI,CAAA;KACZ;IAED,2CAA2C;IAC3C,IACE,CAAC,MAAM,EAAE,SAAS;QAClB,CAAC,MAAM,EAAE,QAAQ;QACjB,CAAC,MAAM,EAAE,OAAO;QAChB,CAAC,MAAM,EAAE,KAAK;QACd,CAAC,MAAM,EAAE,KAAK,EACd;QACA,MAAM,CAAC,IAAI,CACT,EAAE,MAAM,EAAE,EACV,iFAAiF,CAClF,CAAA;QACD,OAAO,IAAI,CAAA;KACZ;IAED,OAAO,cAAc,CAAC,SAAS,CAAC,KAAK,EAAE,UAA0B,EAE/D,EAAE;QACF,MAAM,kCAAkC,GAAG,UAAU,CAAC,aAAa,CAAC,wBAAwB,CAAC,CAAA;QAE7F,MAAM,gCAAgC,GAAG,MAAM,kCAAkC,CAAC,OAAO,CAAC;YACxF,KAAK,EAAE;gBACL,EAAE,EAAE,MAAM,CAAC,EAAE;aACd;SACF,CAAC,CAAA;QAEF,MAAM,GAAG,GAAG,IAAI,IAAI,EAAE,CAAA;QAEtB,MAAM,wBAAwB,GAAG;YAC/B,EAAE,EAAE,MAAM,CAAC,EAAE;YACb,SAAS,EAAE,MAAM,CAAC,SAAS;YAC3B,QAAQ,EAAE,MAAM,CAAC,QAAQ;YACzB,OAAO,EAAE,MAAM,CAAC,OAAO;YACvB,KAAK,EAAE,MAAM,CAAC,KAAK;YACnB,KAAK,EAAE,MAAM,CAAC,KAAK;YACnB,WAAW,EAAE,gCAAgC,EAAE,WAAW;YAC1D,SAAS,EAAE,gCAAgC,EAAE,SAAS,IAAI,GAAG;YAC7D,SAAS,EAAE,GAAG;SACf,CAAA;
|
|
1
|
+
{"version":3,"file":"upsertBillingCustomerBraintree.js","sourceRoot":"","sources":["../../../src/repositories/billing/upsertBillingCustomerBraintree.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAA;AAKzD,MAAM,CAAC,MAAM,8BAA8B,GAAG,KAAK,EACjD,cAA8B,EAC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YAC7F,aAAa,EAAE,CAAC,IAAI,CAAC;SACtB,CAAC,CAAA;QAEF,MAAM,MAAM,GACV,YAAY,EAAE,GAAG,EAAE,YAAY,GAAG,CAAC;YACjC,CAAC,CAAC,MAAM,kCAAkC,CAAC,OAAO,CAAC;gBAC/C,KAAK,EAAE;oBACL,EAAE,EAAE,MAAM,CAAC,EAAE;iBACd;aACF,CAAC;YACJ,CAAC,CAAC,IAAI,CAAA;QAEV,OAAO,MAAM,CAAA;IACf,CAAC,EAAE,mDAAmD,CAAC,CAAA;AACzD,CAAC,CAAA"}
|
|
@@ -7,35 +7,35 @@ export declare class EntityTagsRepository extends BaseRepository {
|
|
|
7
7
|
* @param {CreateEntityTagParams} params The parameters to create the entity tag
|
|
8
8
|
* @returns {EntityTag} The created entity tag
|
|
9
9
|
*/
|
|
10
|
-
createEntityTag
|
|
10
|
+
createEntityTag(params: CreateEntityTagParams): Promise<EntityTag>;
|
|
11
11
|
/**
|
|
12
12
|
* Create multiple entity tags
|
|
13
13
|
* @param {CreateEntityTagParams[]} params The parameters to create the entity tags
|
|
14
14
|
* @returns {EntityTag[]} The created entity tags
|
|
15
15
|
*/
|
|
16
|
-
bulkCreateEntityTag
|
|
16
|
+
bulkCreateEntityTag(params: CreateEntityTagParams[]): Promise<EntityTag[]>;
|
|
17
17
|
/**
|
|
18
18
|
* Delete an entity tag
|
|
19
19
|
* @param {DeleteEntityTagParams} params The parameters to delete the entity tag
|
|
20
20
|
* @returns {boolean} Whether the entity tag was deleted
|
|
21
21
|
*/
|
|
22
|
-
deleteEntityTag
|
|
22
|
+
deleteEntityTag(params: DeleteEntityTagParams): Promise<boolean>;
|
|
23
23
|
/**
|
|
24
24
|
* Search for entity tags
|
|
25
25
|
* @param {SearchEntityTagsParams} params The parameters to search for entity tags
|
|
26
26
|
* @returns {GetEntityTagsResult} The results of the search
|
|
27
27
|
*/
|
|
28
|
-
searchEntityTags
|
|
28
|
+
searchEntityTags(params: SearchEntityTagsParams): Promise<GetEntityTagsResult>;
|
|
29
29
|
/**
|
|
30
30
|
* Delete multiple entity tags
|
|
31
31
|
* @param {BulkDeleteParams} params The parameters to delete the entity tags
|
|
32
32
|
* @returns {boolean} Whether the entity tags were deleted
|
|
33
33
|
*/
|
|
34
|
-
bulkDeleteEntityTag
|
|
34
|
+
bulkDeleteEntityTag(params: BulkDeleteParams): Promise<boolean>;
|
|
35
35
|
/**
|
|
36
36
|
* Enforce entity tags by entity
|
|
37
37
|
* @param {EnforceEntityTagsByEntityParams} params The parameters to enforce entity tags by entity
|
|
38
38
|
* @returns {GetEntityTagsResult} The results of the enforcement
|
|
39
39
|
*/
|
|
40
|
-
enforceEntityTagsByEntity
|
|
40
|
+
enforceEntityTagsByEntity(params: EnforceEntityTagsByEntityParams): Promise<EnforceEntityTagsByEntityResult>;
|
|
41
41
|
}
|
|
@@ -12,72 +12,72 @@ export class EntityTagsRepository extends BaseRepository {
|
|
|
12
12
|
* @param {CreateEntityTagParams} params The parameters to create the entity tag
|
|
13
13
|
* @returns {EntityTag} The created entity tag
|
|
14
14
|
*/
|
|
15
|
-
|
|
15
|
+
async createEntityTag(params) {
|
|
16
16
|
this.logger.trace(params, `EntityTagsRepository::createEntityTag started with params`);
|
|
17
17
|
const novaDataSource = new NovaDataSource(this.novaDataSourceConfig, this.logger);
|
|
18
18
|
const result = await createEntityTag(novaDataSource, params, this.logger);
|
|
19
19
|
this.logger.trace(result, 'EntityTagsRepository::createEntityTag result');
|
|
20
20
|
return result;
|
|
21
|
-
}
|
|
21
|
+
}
|
|
22
22
|
/**
|
|
23
23
|
* Create multiple entity tags
|
|
24
24
|
* @param {CreateEntityTagParams[]} params The parameters to create the entity tags
|
|
25
25
|
* @returns {EntityTag[]} The created entity tags
|
|
26
26
|
*/
|
|
27
|
-
|
|
27
|
+
async bulkCreateEntityTag(params) {
|
|
28
28
|
this.logger.trace(params, `EntityTagsRepository::bulkCreateEntityTag started with params`);
|
|
29
29
|
const novaDataSource = new NovaDataSource(this.novaDataSourceConfig, this.logger);
|
|
30
30
|
const results = await bulkCreateEntityTag(novaDataSource, params, this.logger);
|
|
31
31
|
this.logger.trace(results, 'EntityTagsRepository::bulkCreateEntityTag result');
|
|
32
32
|
return results;
|
|
33
|
-
}
|
|
33
|
+
}
|
|
34
34
|
/**
|
|
35
35
|
* Delete an entity tag
|
|
36
36
|
* @param {DeleteEntityTagParams} params The parameters to delete the entity tag
|
|
37
37
|
* @returns {boolean} Whether the entity tag was deleted
|
|
38
38
|
*/
|
|
39
|
-
|
|
39
|
+
async deleteEntityTag(params) {
|
|
40
40
|
this.logger.trace(params, `EntityTagsRepository::deleteEntityTag started with params`);
|
|
41
41
|
const novaDataSource = new NovaDataSource(this.novaDataSourceConfig, this.logger);
|
|
42
42
|
const result = await deleteEntityTag(novaDataSource, params, this.logger);
|
|
43
43
|
this.logger.trace({ wasDeleted: result }, 'EntityTagsRepository::deleteEntityTag result');
|
|
44
44
|
return result;
|
|
45
|
-
}
|
|
45
|
+
}
|
|
46
46
|
/**
|
|
47
47
|
* Search for entity tags
|
|
48
48
|
* @param {SearchEntityTagsParams} params The parameters to search for entity tags
|
|
49
49
|
* @returns {GetEntityTagsResult} The results of the search
|
|
50
50
|
*/
|
|
51
|
-
|
|
51
|
+
async searchEntityTags(params) {
|
|
52
52
|
this.logger.trace(params, `EntityTagsRepository::searchEntityTags started with params`);
|
|
53
53
|
const novaDataSource = new NovaDataSource(this.novaDataSourceConfig, this.logger);
|
|
54
54
|
const result = await searchEntityTags(novaDataSource, params, this.logger);
|
|
55
55
|
this.logger.trace(result, 'EntityTagsRepository::searchEntityTags result');
|
|
56
56
|
return result;
|
|
57
|
-
}
|
|
57
|
+
}
|
|
58
58
|
/**
|
|
59
59
|
* Delete multiple entity tags
|
|
60
60
|
* @param {BulkDeleteParams} params The parameters to delete the entity tags
|
|
61
61
|
* @returns {boolean} Whether the entity tags were deleted
|
|
62
62
|
*/
|
|
63
|
-
|
|
63
|
+
async bulkDeleteEntityTag(params) {
|
|
64
64
|
this.logger.trace(params, `EntityTagsRepository::bulkDeleteEntityTag started with params`);
|
|
65
65
|
const novaDataSource = new NovaDataSource(this.novaDataSourceConfig, this.logger);
|
|
66
66
|
const wasDeleted = await bulkDeleteEntityTag(novaDataSource, params, this.logger);
|
|
67
67
|
this.logger.trace({ wasDeleted }, 'EntityTagsRepository::bulkDeleteEntityTag result');
|
|
68
68
|
return wasDeleted;
|
|
69
|
-
}
|
|
69
|
+
}
|
|
70
70
|
/**
|
|
71
71
|
* Enforce entity tags by entity
|
|
72
72
|
* @param {EnforceEntityTagsByEntityParams} params The parameters to enforce entity tags by entity
|
|
73
73
|
* @returns {GetEntityTagsResult} The results of the enforcement
|
|
74
74
|
*/
|
|
75
|
-
|
|
75
|
+
async enforceEntityTagsByEntity(params) {
|
|
76
76
|
this.logger.trace(params, `EntityTagsRepository::enforceEntityTagsByEntity started with params`);
|
|
77
77
|
const novaDataSource = new NovaDataSource(this.novaDataSourceConfig, this.logger);
|
|
78
78
|
const result = await enforceEntityTagsByEntity(novaDataSource, params, this.logger);
|
|
79
79
|
this.logger.trace(result, 'EntityTagsRepository::enforceEntityTagsByEntity result');
|
|
80
80
|
return result;
|
|
81
|
-
}
|
|
81
|
+
}
|
|
82
82
|
}
|
|
83
83
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/repositories/entityTags/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAUrD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAC3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EA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