@wisemen/wise-crm 0.0.1

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.
Files changed (137) hide show
  1. package/README.md +0 -0
  2. package/dist/clients/index.d.ts +2 -0
  3. package/dist/clients/index.js +3 -0
  4. package/dist/clients/index.js.map +1 -0
  5. package/dist/clients/wise-crm-api-client/business.client.d.ts +9 -0
  6. package/dist/clients/wise-crm-api-client/business.client.js +18 -0
  7. package/dist/clients/wise-crm-api-client/business.client.js.map +1 -0
  8. package/dist/clients/wise-crm-api-client/index.d.ts +2 -0
  9. package/dist/clients/wise-crm-api-client/index.js +3 -0
  10. package/dist/clients/wise-crm-api-client/index.js.map +1 -0
  11. package/dist/clients/wise-crm-api-client/wise-crm-api.client.d.ts +9 -0
  12. package/dist/clients/wise-crm-api-client/wise-crm-api.client.js +8 -0
  13. package/dist/clients/wise-crm-api-client/wise-crm-api.client.js.map +1 -0
  14. package/dist/clients/wise-crm-service-user-client/index.d.ts +1 -0
  15. package/dist/clients/wise-crm-service-user-client/index.js +2 -0
  16. package/dist/clients/wise-crm-service-user-client/index.js.map +1 -0
  17. package/dist/clients/wise-crm-service-user-client/wise-crm-service-user.client.d.ts +19 -0
  18. package/dist/clients/wise-crm-service-user-client/wise-crm-service-user.client.js +93 -0
  19. package/dist/clients/wise-crm-service-user-client/wise-crm-service-user.client.js.map +1 -0
  20. package/dist/constants/index.d.ts +1 -0
  21. package/dist/constants/index.js +2 -0
  22. package/dist/constants/index.js.map +1 -0
  23. package/dist/constants/nats-subjects/index.d.ts +1 -0
  24. package/dist/constants/nats-subjects/index.js +2 -0
  25. package/dist/constants/nats-subjects/index.js.map +1 -0
  26. package/dist/constants/nats-subjects/subjects.d.ts +2 -0
  27. package/dist/constants/nats-subjects/subjects.js +3 -0
  28. package/dist/constants/nats-subjects/subjects.js.map +1 -0
  29. package/dist/functions/index.d.ts +1 -0
  30. package/dist/functions/index.js +2 -0
  31. package/dist/functions/index.js.map +1 -0
  32. package/dist/functions/map-address-string-to-command.function.d.ts +2 -0
  33. package/dist/functions/map-address-string-to-command.function.js +18 -0
  34. package/dist/functions/map-address-string-to-command.function.js.map +1 -0
  35. package/dist/index.d.ts +4 -0
  36. package/dist/index.js +5 -0
  37. package/dist/index.js.map +1 -0
  38. package/dist/types/address/address-command.builder.d.ts +16 -0
  39. package/dist/types/address/address-command.builder.js +57 -0
  40. package/dist/types/address/address-command.builder.js.map +1 -0
  41. package/dist/types/address/address-command.d.ts +14 -0
  42. package/dist/types/address/address-command.js +26 -0
  43. package/dist/types/address/address-command.js.map +1 -0
  44. package/dist/types/address/address.builder.d.ts +16 -0
  45. package/dist/types/address/address.builder.js +57 -0
  46. package/dist/types/address/address.builder.js.map +1 -0
  47. package/dist/types/address/address.d.ts +12 -0
  48. package/dist/types/address/address.js +12 -0
  49. package/dist/types/address/address.js.map +1 -0
  50. package/dist/types/address/address.response.d.ts +12 -0
  51. package/dist/types/address/address.response.js +12 -0
  52. package/dist/types/address/address.response.js.map +1 -0
  53. package/dist/types/address/index.d.ts +1 -0
  54. package/dist/types/address/index.js +2 -0
  55. package/dist/types/address/index.js.map +1 -0
  56. package/dist/types/business/business-billing-information.response.d.ts +11 -0
  57. package/dist/types/business/business-billing-information.response.js +11 -0
  58. package/dist/types/business/business-billing-information.response.js.map +1 -0
  59. package/dist/types/business/business-contact-person.response.d.ts +11 -0
  60. package/dist/types/business/business-contact-person.response.js +11 -0
  61. package/dist/types/business/business-contact-person.response.js.map +1 -0
  62. package/dist/types/business/business-detail.response.d.ts +22 -0
  63. package/dist/types/business/business-detail.response.js +18 -0
  64. package/dist/types/business/business-detail.response.js.map +1 -0
  65. package/dist/types/business/business-index.query.d.ts +6 -0
  66. package/dist/types/business/business-index.query.js +7 -0
  67. package/dist/types/business/business-index.query.js.map +1 -0
  68. package/dist/types/business/business-index.response.d.ts +14 -0
  69. package/dist/types/business/business-index.response.js +13 -0
  70. package/dist/types/business/business-index.response.js.map +1 -0
  71. package/dist/types/business/business.uuid.d.ts +2 -0
  72. package/dist/types/business/business.uuid.js +2 -0
  73. package/dist/types/business/business.uuid.js.map +1 -0
  74. package/dist/types/business/child-parent-business.response.d.ts +14 -0
  75. package/dist/types/business/child-parent-business.response.js +13 -0
  76. package/dist/types/business/child-parent-business.response.js.map +1 -0
  77. package/dist/types/business/index.d.ts +7 -0
  78. package/dist/types/business/index.js +8 -0
  79. package/dist/types/business/index.js.map +1 -0
  80. package/dist/types/index.d.ts +5 -0
  81. package/dist/types/index.js +6 -0
  82. package/dist/types/index.js.map +1 -0
  83. package/dist/types/individual/index.d.ts +5 -0
  84. package/dist/types/individual/index.js +6 -0
  85. package/dist/types/individual/index.js.map +1 -0
  86. package/dist/types/individual/individual-billing-information.response.d.ts +7 -0
  87. package/dist/types/individual/individual-billing-information.response.js +7 -0
  88. package/dist/types/individual/individual-billing-information.response.js.map +1 -0
  89. package/dist/types/individual/individual-contact-person.response.d.ts +11 -0
  90. package/dist/types/individual/individual-contact-person.response.js +11 -0
  91. package/dist/types/individual/individual-contact-person.response.js.map +1 -0
  92. package/dist/types/individual/individual-detail.response.d.ts +22 -0
  93. package/dist/types/individual/individual-detail.response.js +18 -0
  94. package/dist/types/individual/individual-detail.response.js.map +1 -0
  95. package/dist/types/individual/individual-linked-business.response.d.ts +9 -0
  96. package/dist/types/individual/individual-linked-business.response.js +9 -0
  97. package/dist/types/individual/individual-linked-business.response.js.map +1 -0
  98. package/dist/types/individual/individual.uuid.d.ts +2 -0
  99. package/dist/types/individual/individual.uuid.js +2 -0
  100. package/dist/types/individual/individual.uuid.js.map +1 -0
  101. package/dist/types/integration-events/business-billing-information-upserted-content.type.d.ts +10 -0
  102. package/dist/types/integration-events/business-billing-information-upserted-content.type.js +2 -0
  103. package/dist/types/integration-events/business-billing-information-upserted-content.type.js.map +1 -0
  104. package/dist/types/integration-events/business-created-content.type.d.ts +9 -0
  105. package/dist/types/integration-events/business-created-content.type.js +2 -0
  106. package/dist/types/integration-events/business-created-content.type.js.map +1 -0
  107. package/dist/types/integration-events/business-updated-content.type.d.ts +9 -0
  108. package/dist/types/integration-events/business-updated-content.type.js +2 -0
  109. package/dist/types/integration-events/business-updated-content.type.js.map +1 -0
  110. package/dist/types/integration-events/index.d.ts +7 -0
  111. package/dist/types/integration-events/index.js +8 -0
  112. package/dist/types/integration-events/index.js.map +1 -0
  113. package/dist/types/integration-events/individual-billing-information-upserted-content.type.d.ts +6 -0
  114. package/dist/types/integration-events/individual-billing-information-upserted-content.type.js +2 -0
  115. package/dist/types/integration-events/individual-billing-information-upserted-content.type.js.map +1 -0
  116. package/dist/types/integration-events/individual-created-content.type.d.ts +10 -0
  117. package/dist/types/integration-events/individual-created-content.type.js +2 -0
  118. package/dist/types/integration-events/individual-created-content.type.js.map +1 -0
  119. package/dist/types/integration-events/individual-updated-content.type.d.ts +10 -0
  120. package/dist/types/integration-events/individual-updated-content.type.js +2 -0
  121. package/dist/types/integration-events/individual-updated-content.type.js.map +1 -0
  122. package/dist/types/integration-events/integration-event.type.d.ts +9 -0
  123. package/dist/types/integration-events/integration-event.type.js +11 -0
  124. package/dist/types/integration-events/integration-event.type.js.map +1 -0
  125. package/dist/types/location/index.d.ts +2 -0
  126. package/dist/types/location/index.js +3 -0
  127. package/dist/types/location/index.js.map +1 -0
  128. package/dist/types/location/location-detail.response.d.ts +8 -0
  129. package/dist/types/location/location-detail.response.js +7 -0
  130. package/dist/types/location/location-detail.response.js.map +1 -0
  131. package/dist/types/location/location.uuid.d.ts +2 -0
  132. package/dist/types/location/location.uuid.js +2 -0
  133. package/dist/types/location/location.uuid.js.map +1 -0
  134. package/dist/types/uuid.d.ts +6 -0
  135. package/dist/types/uuid.js +4 -0
  136. package/dist/types/uuid.js.map +1 -0
  137. package/package.json +38 -0
package/README.md ADDED
File without changes
@@ -0,0 +1,2 @@
1
+ export * from './wise-crm-api-client/index.js';
2
+ export * from './wise-crm-service-user-client/index.js';
@@ -0,0 +1,3 @@
1
+ export * from './wise-crm-api-client/index.js';
2
+ export * from './wise-crm-service-user-client/index.js';
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../lib/clients/index.ts"],"names":[],"mappings":"AAAA,cAAc,gCAAgC,CAAA;AAC9C,cAAc,yCAAyC,CAAA"}
@@ -0,0 +1,9 @@
1
+ import { BusinessDetailResponse, ViewBusinessIndexQuery, BusinessIndexResponse } from "../../types/index.js";
2
+ import { WiseCrmApiClientOptions } from "./wise-crm-api.client.js";
3
+ export declare class BusinessClient {
4
+ private baseUrl;
5
+ private getAccessToken;
6
+ constructor(options: WiseCrmApiClientOptions);
7
+ detail(businessUuid: string): Promise<BusinessDetailResponse>;
8
+ index(queryParams: ViewBusinessIndexQuery): Promise<BusinessIndexResponse>;
9
+ }
@@ -0,0 +1,18 @@
1
+ import axios from "axios";
2
+ export class BusinessClient {
3
+ baseUrl;
4
+ getAccessToken;
5
+ constructor(options) {
6
+ this.baseUrl = `${options.host}/api/v1`;
7
+ this.getAccessToken = options.getAccessToken;
8
+ }
9
+ async detail(businessUuid) {
10
+ return axios
11
+ .get(`${this.baseUrl}/businesses/${businessUuid}`, { headers: { Authorization: `Bearer ${this.getAccessToken}` } }).then((res) => res.data);
12
+ }
13
+ async index(queryParams) {
14
+ return axios
15
+ .get(`${this.baseUrl}/businesses`, { headers: { Authorization: `Bearer ${this.getAccessToken}` }, params: queryParams }).then((res) => res.data);
16
+ }
17
+ }
18
+ //# sourceMappingURL=business.client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"business.client.js","sourceRoot":"","sources":["../../../lib/clients/wise-crm-api-client/business.client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,MAAM,OAAO,cAAc;IACjB,OAAO,CAAQ;IACf,cAAc,CAAuB;IAE7C,YAAY,OAAgC;QAC1C,IAAI,CAAC,OAAO,GAAG,GAAG,OAAO,CAAC,IAAI,SAAS,CAAA;QACvC,IAAI,CAAC,cAAc,GAAG,OAAO,CAAC,cAAc,CAAA;IAC9C,CAAC;IAEM,KAAK,CAAC,MAAM,CACjB,YAAoB;QAEpB,OAAO,KAAK;aACT,GAAG,CACF,GAAG,IAAI,CAAC,OAAO,eAAe,YAAY,EAAE,EAC5C,EAAE,OAAO,EAAE,EAAE,aAAa,EAAE,UAAU,IAAI,CAAC,cAAc,EAAE,EAAE,EAAE,CAChE,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC;IAEM,KAAK,CAAC,KAAK,CAChB,WAAmC;QAEnC,OAAO,KAAK;aACT,GAAG,CACF,GAAG,IAAI,CAAC,OAAO,aAAa,EAC5B,EAAE,OAAO,EAAE,EAAE,aAAa,EAAE,UAAU,IAAI,CAAC,cAAc,EAAE,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE,CACrF,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC;CACF"}
@@ -0,0 +1,2 @@
1
+ export * from './business.client.js';
2
+ export * from './wise-crm-api.client.js';
@@ -0,0 +1,3 @@
1
+ export * from './business.client.js';
2
+ export * from './wise-crm-api.client.js';
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../lib/clients/wise-crm-api-client/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAA;AACpC,cAAc,0BAA0B,CAAA"}
@@ -0,0 +1,9 @@
1
+ import { BusinessClient } from "./business.client.js";
2
+ export interface WiseCrmApiClientOptions {
3
+ host: string;
4
+ getAccessToken: () => Promise<string>;
5
+ }
6
+ export declare class WiseCrmApiClient {
7
+ business: BusinessClient;
8
+ constructor(options: WiseCrmApiClientOptions);
9
+ }
@@ -0,0 +1,8 @@
1
+ import { BusinessClient } from "./business.client.js";
2
+ export class WiseCrmApiClient {
3
+ business;
4
+ constructor(options) {
5
+ this.business = new BusinessClient(options);
6
+ }
7
+ }
8
+ //# sourceMappingURL=wise-crm-api.client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wise-crm-api.client.js","sourceRoot":"","sources":["../../../lib/clients/wise-crm-api-client/wise-crm-api.client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAQtD,MAAM,OAAO,gBAAgB;IACpB,QAAQ,CAAiB;IAEhC,YAAY,OAAgC;QAC1C,IAAI,CAAC,QAAQ,GAAG,IAAI,cAAc,CAAC,OAAO,CAAC,CAAC;IAC9C,CAAC;CACF"}
@@ -0,0 +1 @@
1
+ export * from './wise-crm-service-user.client.js';
@@ -0,0 +1,2 @@
1
+ export * from './wise-crm-service-user.client.js';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../lib/clients/wise-crm-service-user-client/index.ts"],"names":[],"mappings":"AAAA,cAAc,mCAAmC,CAAA"}
@@ -0,0 +1,19 @@
1
+ import { BusinessDetailResponse } from "../../types/index.js";
2
+ import { ViewIndividualDetailResponse } from "../../types/individual/individual-detail.response.js";
3
+ export interface WiseCrmServiceUserClientOptions {
4
+ host: string;
5
+ issuer: string;
6
+ serviceUserKey: string;
7
+ projectId: string;
8
+ }
9
+ export declare class WiseCrmServiceUserClient {
10
+ private readonly issuer;
11
+ private readonly baseUrl;
12
+ private readonly serviceUserKey;
13
+ private readonly projectId;
14
+ constructor(options: WiseCrmServiceUserClientOptions);
15
+ getBusinessOrFail(businessUuid: string): Promise<BusinessDetailResponse>;
16
+ getIndividualOrFail(individualUuid: string): Promise<ViewIndividualDetailResponse>;
17
+ private getToken;
18
+ private getJwt;
19
+ }
@@ -0,0 +1,93 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ var __metadata = (this && this.__metadata) || function (k, v) {
8
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
+ };
10
+ import axios from "axios";
11
+ import dayjs from "dayjs";
12
+ import jwt from "jsonwebtoken";
13
+ import { Injectable } from "@nestjs/common";
14
+ let WiseCrmServiceUserClient = class WiseCrmServiceUserClient {
15
+ issuer;
16
+ baseUrl;
17
+ serviceUserKey;
18
+ projectId;
19
+ constructor(options) {
20
+ this.issuer = options.issuer;
21
+ this.baseUrl = `${options.host}/api/v1`;
22
+ this.serviceUserKey = options.serviceUserKey;
23
+ this.projectId = options.projectId;
24
+ }
25
+ async getBusinessOrFail(businessUuid) {
26
+ const token = await this.getToken();
27
+ try {
28
+ return await axios.get(`${this.baseUrl}/businesses/${businessUuid}`, { headers: {
29
+ 'Authorization': `Bearer ${token}`,
30
+ 'User-Type': 'serviceaccount'
31
+ } }).then(res => res.data);
32
+ }
33
+ catch (error) {
34
+ throw new Error('Failed to fetch business from CRM');
35
+ }
36
+ }
37
+ async getIndividualOrFail(individualUuid) {
38
+ const token = await this.getToken();
39
+ try {
40
+ return await axios.get(`${this.baseUrl}/individuals/${individualUuid}`, { headers: {
41
+ 'Authorization': `Bearer ${token}`,
42
+ 'User-Type': 'serviceaccount'
43
+ } }).then(res => res.data);
44
+ }
45
+ catch (error) {
46
+ throw new Error('Failed to fetch individual from CRM');
47
+ }
48
+ }
49
+ async getToken() {
50
+ const authCrmTokenUrl = `${this.issuer}/oauth/v2/token`;
51
+ const authCrmProjectId = this.projectId;
52
+ const scopes = [
53
+ `urn:zitadel:iam:org:project:id:${authCrmProjectId}:aud`,
54
+ 'urn:zitadel:iam:user:resourceowner'
55
+ ];
56
+ const jwt = this.getJwt();
57
+ try {
58
+ const response = await axios.post(authCrmTokenUrl, new URLSearchParams({
59
+ grant_type: 'urn:ietf:params:oauth:grant-type:jwt-bearer',
60
+ assertion: jwt,
61
+ scope: scopes.join(' ')
62
+ }), {
63
+ headers: {
64
+ 'Content-Type': 'application/x-www-form-urlencoded'
65
+ }
66
+ });
67
+ return response.data.access_token;
68
+ }
69
+ catch (error) {
70
+ throw new Error('Token exchange failed');
71
+ }
72
+ }
73
+ getJwt() {
74
+ const encodedServiceUserKey = this.serviceUserKey;
75
+ const serviceUserKey = JSON.parse(Buffer.from(encodedServiceUserKey, 'base64').toString('utf-8'));
76
+ return jwt.sign({
77
+ iss: serviceUserKey.userId,
78
+ sub: serviceUserKey.userId,
79
+ aud: this.issuer,
80
+ exp: dayjs().add(1, 'hour').unix(),
81
+ iat: dayjs().unix()
82
+ }, serviceUserKey.key, {
83
+ algorithm: 'RS256',
84
+ keyid: serviceUserKey.keyId
85
+ });
86
+ }
87
+ };
88
+ WiseCrmServiceUserClient = __decorate([
89
+ Injectable(),
90
+ __metadata("design:paramtypes", [Object])
91
+ ], WiseCrmServiceUserClient);
92
+ export { WiseCrmServiceUserClient };
93
+ //# sourceMappingURL=wise-crm-service-user.client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wise-crm-service-user.client.js","sourceRoot":"","sources":["../../../lib/clients/wise-crm-service-user-client/wise-crm-service-user.client.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,GAAG,MAAM,cAAc,CAAA;AAG9B,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AA0BpC,IAAM,wBAAwB,GAA9B,MAAM,wBAAwB;IAClB,MAAM,CAAQ;IACd,OAAO,CAAQ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AI,EAAE;YAClC,GAAG,EAAE,KAAK,EAAE,CAAC,IAAI,EAAE;SACpB,EACD,cAAc,CAAC,GAAG,EAClB;YACE,SAAS,EAAE,OAAO;YAClB,KAAK,EAAE,cAAc,CAAC,KAAK;SAC5B,CACF,CAAA;IACH,CAAC;CACF,CAAA;AAjGY,wBAAwB;IADpC,UAAU,EAAE;;GACA,wBAAwB,CAiGpC"}
@@ -0,0 +1 @@
1
+ export * from './nats-subjects/index.js';
@@ -0,0 +1,2 @@
1
+ export * from './nats-subjects/index.js';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../lib/constants/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAA"}
@@ -0,0 +1 @@
1
+ export * from './subjects.js';
@@ -0,0 +1,2 @@
1
+ export * from './subjects.js';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../lib/constants/nats-subjects/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA"}
@@ -0,0 +1,2 @@
1
+ export declare const BUSINESS_REQUEST_SUBJECT = "{env}.wise-crm.tenant.{tenantUuid}.business.>";
2
+ export declare const INDIVIDUAL_REQUEST_SUBJECT = "{env}.wise-crm.tenant.{tenantUuid}.individual.>";
@@ -0,0 +1,3 @@
1
+ export const BUSINESS_REQUEST_SUBJECT = '{env}.wise-crm.tenant.{tenantUuid}.business.>';
2
+ export const INDIVIDUAL_REQUEST_SUBJECT = '{env}.wise-crm.tenant.{tenantUuid}.individual.>';
3
+ //# sourceMappingURL=subjects.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"subjects.js","sourceRoot":"","sources":["../../../lib/constants/nats-subjects/subjects.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,wBAAwB,GAAI,+CAA+C,CAAA;AACxF,MAAM,CAAC,MAAM,0BAA0B,GAAG,iDAAiD,CAAA"}
@@ -0,0 +1 @@
1
+ export * from './map-address-string-to-command.function.js';
@@ -0,0 +1,2 @@
1
+ export * from './map-address-string-to-command.function.js';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../lib/functions/index.ts"],"names":[],"mappings":"AAAA,cAAc,6CAA6C,CAAA"}
@@ -0,0 +1,2 @@
1
+ import { AddressCommand } from "../types/address/address-command.js";
2
+ export declare function mapAddressStringToCommand(addressString: string): AddressCommand;
@@ -0,0 +1,18 @@
1
+ import { CoordinatesCommandBuilder } from "@wisemen/coordinates";
2
+ import { AddressCommandBuilder } from "../types/address/address-command.builder.js";
3
+ export function mapAddressStringToCommand(addressString) {
4
+ const address = JSON.parse(addressString);
5
+ return new AddressCommandBuilder()
6
+ .withStreetName(address.streetName ?? null)
7
+ .withStreetNumber(address.streetNumber ?? null)
8
+ .withUnit(address.unit ?? null)
9
+ .withCity(address.city ?? null)
10
+ .withPostalCode(address.postalCode ?? null)
11
+ .withCountry(address.country ?? null)
12
+ .withCoordinates(new CoordinatesCommandBuilder()
13
+ .withLatitude(address.coordinates?.latitude ?? 0)
14
+ .withLongitude(address.coordinates?.longitude ?? 0)
15
+ .build())
16
+ .build();
17
+ }
18
+ //# sourceMappingURL=map-address-string-to-command.function.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"map-address-string-to-command.function.js","sourceRoot":"","sources":["../../lib/functions/map-address-string-to-command.function.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAA;AAGhE,OAAO,EAAE,qBAAqB,EAAE,MAAM,6CAA6C,CAAA;AAEnF,MAAM,UAAU,yBAAyB,CAAE,aAAqB;IAC5D,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,aAAa,CAAY,CAAA;IACpD,OAAO,IAAI,qBAAqB,EAAE;SAC/B,cAAc,CAAC,OAAO,CAAC,UAAU,IAAI,IAAI,CAAC;SAC1C,gBAAgB,CAAC,OAAO,CAAC,YAAY,IAAI,IAAI,CAAC;SAC9C,QAAQ,CAAC,OAAO,CAAC,IAAI,IAAI,IAAI,CAAC;SAC9B,QAAQ,CAAC,OAAO,CAAC,IAAI,IAAI,IAAI,CAAC;SAC9B,cAAc,CAAC,OAAO,CAAC,UAAU,IAAI,IAAI,CAAC;SAC1C,WAAW,CAAC,OAAO,CAAC,OAAO,IAAI,IAAI,CAAC;SACpC,eAAe,CAAC,IAAI,yBAAyB,EAAE;SAC7C,YAAY,CAAC,OAAO,CAAC,WAAW,EAAE,QAAQ,IAAI,CAAC,CAAC;SAChD,aAAa,CAAC,OAAO,CAAC,WAAW,EAAE,SAAS,IAAI,CAAC,CAAC;SAClD,KAAK,EAAE,CAAC;SACV,KAAK,EAAE,CAAA;AACZ,CAAC"}
@@ -0,0 +1,4 @@
1
+ export * from './types/index.js';
2
+ export * from './clients/index.js';
3
+ export * from './constants/index.js';
4
+ export * from './functions/index.js';
package/dist/index.js ADDED
@@ -0,0 +1,5 @@
1
+ export * from './types/index.js';
2
+ export * from './clients/index.js';
3
+ export * from './constants/index.js';
4
+ export * from './functions/index.js';
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAA;AAChC,cAAc,oBAAoB,CAAA;AAClC,cAAc,sBAAsB,CAAA;AACpC,cAAc,sBAAsB,CAAA"}
@@ -0,0 +1,16 @@
1
+ import { CoordinatesCommand } from '@wisemen/coordinates';
2
+ import { AddressCommand } from './address-command.js';
3
+ export declare class AddressCommandBuilder {
4
+ private command;
5
+ constructor();
6
+ withPlaceName(placeName: string | null): this;
7
+ withPlaceId(placeId: string | null): this;
8
+ withCountry(country: string | null): this;
9
+ withCity(city: string | null): this;
10
+ withPostalCode(postalCode: string | null): this;
11
+ withStreetName(streetName: string | null): this;
12
+ withStreetNumber(streetNumber: string | null): this;
13
+ withUnit(unit: string | null): this;
14
+ withCoordinates(coordinates: CoordinatesCommand): this;
15
+ build(): AddressCommand;
16
+ }
@@ -0,0 +1,57 @@
1
+ import { CoordinatesCommandBuilder } from '@wisemen/coordinates';
2
+ import { AddressCommand } from './address-command.js';
3
+ export class AddressCommandBuilder {
4
+ command;
5
+ constructor() {
6
+ this.command = new AddressCommand();
7
+ this.command.placeName = null;
8
+ this.command.placeId = null;
9
+ this.command.country = null;
10
+ this.command.city = null;
11
+ this.command.postalCode = null;
12
+ this.command.streetName = null;
13
+ this.command.streetNumber = null;
14
+ this.command.unit = null;
15
+ this.command.coordinates = new CoordinatesCommandBuilder().build();
16
+ }
17
+ withPlaceName(placeName) {
18
+ this.command.placeName = placeName;
19
+ return this;
20
+ }
21
+ withPlaceId(placeId) {
22
+ this.command.placeId = placeId;
23
+ return this;
24
+ }
25
+ withCountry(country) {
26
+ this.command.country = country;
27
+ return this;
28
+ }
29
+ withCity(city) {
30
+ this.command.city = city;
31
+ return this;
32
+ }
33
+ withPostalCode(postalCode) {
34
+ this.command.postalCode = postalCode;
35
+ return this;
36
+ }
37
+ withStreetName(streetName) {
38
+ this.command.streetName = streetName;
39
+ return this;
40
+ }
41
+ withStreetNumber(streetNumber) {
42
+ this.command.streetNumber = streetNumber;
43
+ return this;
44
+ }
45
+ withUnit(unit) {
46
+ this.command.unit = unit;
47
+ return this;
48
+ }
49
+ withCoordinates(coordinates) {
50
+ this.command.coordinates = coordinates;
51
+ return this;
52
+ }
53
+ build() {
54
+ return this.command;
55
+ }
56
+ }
57
+ //# sourceMappingURL=address-command.builder.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"address-command.builder.js","sourceRoot":"","sources":["../../../lib/types/address/address-command.builder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,yBAAyB,EAAE,MAAM,sBAAsB,CAAA;AACpF,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAErD,MAAM,OAAO,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CAAC,OAAO,CAAC,UAAU,GAAG,UAAU,CAAA;QACpC,OAAO,IAAI,CAAA;IACb,CAAC;IAED,gBAAgB,CAAE,YAA2B;QAC3C,IAAI,CAAC,OAAO,CAAC,YAAY,GAAG,YAAY,CAAA;QACxC,OAAO,IAAI,CAAA;IACb,CAAC;IAED,QAAQ,CAAE,IAAmB;QAC3B,IAAI,CAAC,OAAO,CAAC,IAAI,GAAG,IAAI,CAAA;QACxB,OAAO,IAAI,CAAA;IACb,CAAC;IAED,eAAe,CAAE,WAA+B;QAC9C,IAAI,CAAC,OAAO,CAAC,WAAW,GAAG,WAAW,CAAA;QACtC,OAAO,IAAI,CAAA;IACb,CAAC;IAED,KAAK;QACH,OAAO,IAAI,CAAC,OAAO,CAAA;IACrB,CAAC;CACF"}
@@ -0,0 +1,14 @@
1
+ import { CoordinatesCommand } from '@wisemen/coordinates';
2
+ import { Address } from './address.js';
3
+ export declare class AddressCommand {
4
+ placeName: string | null;
5
+ placeId: string | null;
6
+ country: string | null;
7
+ city: string | null;
8
+ postalCode: string | null;
9
+ streetName: string | null;
10
+ streetNumber: string | null;
11
+ unit: string | null;
12
+ coordinates: CoordinatesCommand | null;
13
+ parse(): Address;
14
+ }
@@ -0,0 +1,26 @@
1
+ import { AddressBuilder } from './address.builder.js';
2
+ export class AddressCommand {
3
+ placeName;
4
+ placeId;
5
+ country;
6
+ city;
7
+ postalCode;
8
+ streetName;
9
+ streetNumber;
10
+ unit;
11
+ coordinates;
12
+ parse() {
13
+ return new AddressBuilder()
14
+ .withPlaceName(this.placeName)
15
+ .withPlaceId(this.placeId)
16
+ .withCountry(this.country)
17
+ .withCity(this.city)
18
+ .withPostalCode(this.postalCode)
19
+ .withStreetName(this.streetName)
20
+ .withStreetNumber(this.streetNumber)
21
+ .withUnit(this.unit)
22
+ .withCoordinates(this.coordinates ? this.coordinates.toCoordinates() : null)
23
+ .build();
24
+ }
25
+ }
26
+ //# sourceMappingURL=address-command.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"address-command.js","sourceRoot":"","sources":["../../../lib/types/address/address-command.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAGrD,MAAM,OAAO,cAAc;IACzB,SAAS,CAAe;IACxB,OAAO,CAAe;IACtB,OAAO,CAAe;IACtB,IAAI,CAAe;IACnB,UAAU,CAAe;IACzB,UAAU,CAAe;IACzB,YAAY,CAAe;IAC3B,IAAI,CAAe;IACnB,WAAW,CAA2B;IAEtC,KAAK;QACH,OAAO,IAAI,cAAc,EAAE;aACxB,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC;aAC7B,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC;aACzB,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC;aACzB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC;aACnB,cAAc,CAAC,IAAI,CAAC,UAAU,CAAC;aAC/B,cAAc,CAAC,IAAI,CAAC,UAAU,CAAC;aAC/B,gBAAgB,CAAC,IAAI,CAAC,YAAY,CAAC;aACnC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC;aACnB,eAAe,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,aAAa,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;aAC3E,KAAK,EAAE,CAAA;IACZ,CAAC;CACF"}
@@ -0,0 +1,16 @@
1
+ import { Coordinates } from '@wisemen/coordinates';
2
+ import { Address } from './address.js';
3
+ export declare class AddressBuilder {
4
+ private readonly address;
5
+ constructor();
6
+ withPlaceName(placeName?: string | null): this;
7
+ withPlaceId(placeId?: string | null): this;
8
+ withCountry(country?: string | null): this;
9
+ withCity(city?: string | null): this;
10
+ withPostalCode(postalCode?: string | null): this;
11
+ withStreetName(streetName?: string | null): this;
12
+ withStreetNumber(streetNumber?: string | null): this;
13
+ withUnit(unit?: string | null): this;
14
+ withCoordinates(coordinates?: Coordinates | null): this;
15
+ build(): Address;
16
+ }
@@ -0,0 +1,57 @@
1
+ import { Coordinates } from '@wisemen/coordinates';
2
+ import { Address } from './address.js';
3
+ export class AddressBuilder {
4
+ address;
5
+ constructor() {
6
+ this.address = new Address();
7
+ this.address.placeName = null;
8
+ this.address.placeId = null;
9
+ this.address.coordinates = new Coordinates(0, 0);
10
+ this.address.country = null;
11
+ this.address.city = null;
12
+ this.address.postalCode = null;
13
+ this.address.streetName = null;
14
+ this.address.streetNumber = null;
15
+ this.address.unit = null;
16
+ }
17
+ withPlaceName(placeName) {
18
+ this.address.placeName = placeName ?? undefined;
19
+ return this;
20
+ }
21
+ withPlaceId(placeId) {
22
+ this.address.placeId = placeId ?? undefined;
23
+ return this;
24
+ }
25
+ withCountry(country) {
26
+ this.address.country = country ?? undefined;
27
+ return this;
28
+ }
29
+ withCity(city) {
30
+ this.address.city = city ?? undefined;
31
+ return this;
32
+ }
33
+ withPostalCode(postalCode) {
34
+ this.address.postalCode = postalCode ?? undefined;
35
+ return this;
36
+ }
37
+ withStreetName(streetName) {
38
+ this.address.streetName = streetName ?? undefined;
39
+ return this;
40
+ }
41
+ withStreetNumber(streetNumber) {
42
+ this.address.streetNumber = streetNumber ?? undefined;
43
+ return this;
44
+ }
45
+ withUnit(unit) {
46
+ this.address.unit = unit ?? undefined;
47
+ return this;
48
+ }
49
+ withCoordinates(coordinates) {
50
+ this.address.coordinates = coordinates ?? undefined;
51
+ return this;
52
+ }
53
+ build() {
54
+ return this.address;
55
+ }
56
+ }
57
+ //# sourceMappingURL=address.builder.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"address.builder.js","sourceRoot":"","sources":["../../../lib/types/address/address.builder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAEtC,MAAM,OAAO,cAAc;IACR,OAAO,CAAS;IAEjC;QACE,IAAI,CAAC,OAAO,GAAG,IAAI,O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C,OAAO,CAAC,UAAU,GAAG,UAAU,IAAI,SAAS,CAAA;QACjD,OAAO,IAAI,CAAA;IACb,CAAC;IAED,gBAAgB,CAAE,YAA4B;QAC5C,IAAI,CAAC,OAAO,CAAC,YAAY,GAAG,YAAY,IAAI,SAAS,CAAA;QACrD,OAAO,IAAI,CAAA;IACb,CAAC;IAED,QAAQ,CAAE,IAAoB;QAC5B,IAAI,CAAC,OAAO,CAAC,IAAI,GAAG,IAAI,IAAI,SAAS,CAAA;QACrC,OAAO,IAAI,CAAA;IACb,CAAC;IAED,eAAe,CAAE,WAAgC;QAC/C,IAAI,CAAC,OAAO,CAAC,WAAW,GAAG,WAAW,IAAI,SAAS,CAAA;QACnD,OAAO,IAAI,CAAA;IACb,CAAC;IAED,KAAK;QACH,OAAO,IAAI,CAAC,OAAO,CAAA;IACrB,CAAC;CACF"}
@@ -0,0 +1,12 @@
1
+ import { Coordinates } from '@wisemen/coordinates';
2
+ export declare class Address {
3
+ placeName?: string | null;
4
+ placeId?: string | null;
5
+ country?: string | null;
6
+ city?: string | null;
7
+ postalCode?: string | null;
8
+ streetName?: string | null;
9
+ streetNumber?: string | null;
10
+ unit?: string | null;
11
+ coordinates?: Coordinates | null;
12
+ }
@@ -0,0 +1,12 @@
1
+ export class Address {
2
+ placeName;
3
+ placeId;
4
+ country;
5
+ city;
6
+ postalCode;
7
+ streetName;
8
+ streetNumber;
9
+ unit;
10
+ coordinates;
11
+ }
12
+ //# sourceMappingURL=address.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"address.js","sourceRoot":"","sources":["../../../lib/types/address/address.ts"],"names":[],"mappings":"AAEA,MAAM,OAAO,OAAO;IAClB,SAAS,CAAgB;IACzB,OAAO,CAAgB;IACvB,OAAO,CAAgB;IACvB,IAAI,CAAgB;IACpB,UAAU,CAAgB;IAC1B,UAAU,CAAgB;IAC1B,YAAY,CAAgB;IAC5B,IAAI,CAAgB;IACpB,WAAW,CAAqB;CACjC"}
@@ -0,0 +1,12 @@
1
+ import { CoordinatesResponse } from "@wisemen/coordinates";
2
+ export declare class AddressResponse {
3
+ placeName: string | null;
4
+ placeId: string | null;
5
+ country: string | null;
6
+ city: string | null;
7
+ postalCode: string | null;
8
+ streetName: string | null;
9
+ streetNumber: string | null;
10
+ unit: string | null;
11
+ coordinates: CoordinatesResponse | null;
12
+ }
@@ -0,0 +1,12 @@
1
+ export class AddressResponse {
2
+ placeName;
3
+ placeId;
4
+ country;
5
+ city;
6
+ postalCode;
7
+ streetName;
8
+ streetNumber;
9
+ unit;
10
+ coordinates;
11
+ }
12
+ //# sourceMappingURL=address.response.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"address.response.js","sourceRoot":"","sources":["../../../lib/types/address/address.response.ts"],"names":[],"mappings":"AAEA,MAAM,OAAO,eAAe;IAC1B,SAAS,CAAe;IACxB,OAAO,CAAe;IACtB,OAAO,CAAe;IACtB,IAAI,CAAe;IACnB,UAAU,CAAe;IACzB,UAAU,CAAe;IACzB,YAAY,CAAe;IAC3B,IAAI,CAAe;IACnB,WAAW,CAA4B;CACxC"}
@@ -0,0 +1 @@
1
+ export * from './address.response.js';
@@ -0,0 +1,2 @@
1
+ export * from './address.response.js';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../lib/types/address/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAA"}
@@ -0,0 +1,11 @@
1
+ import { LocationDetailResponse } from "../location/location-detail.response.js";
2
+ export declare class BusinessBillingInformationResponse {
3
+ uuid: string;
4
+ invoiceEmail: string;
5
+ invoiceCcEmails: string[];
6
+ reminderEmail: string;
7
+ reminderCcEmails: string[];
8
+ purchaseNoteEmail: string;
9
+ purchaseNoteCcEmails: string[];
10
+ location: LocationDetailResponse;
11
+ }
@@ -0,0 +1,11 @@
1
+ export class BusinessBillingInformationResponse {
2
+ uuid;
3
+ invoiceEmail;
4
+ invoiceCcEmails;
5
+ reminderEmail;
6
+ reminderCcEmails;
7
+ purchaseNoteEmail;
8
+ purchaseNoteCcEmails;
9
+ location;
10
+ }
11
+ //# sourceMappingURL=business-billing-information.response.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"business-billing-information.response.js","sourceRoot":"","sources":["../../../lib/types/business/business-billing-information.response.ts"],"names":[],"mappings":"AAEA,MAAM,OAAO,kCAAkC;IAC7C,IAAI,CAAQ;IACZ,YAAY,CAAQ;IACpB,eAAe,CAAU;IACzB,aAAa,CAAQ;IACrB,gBAAgB,CAAU;IAC1B,iBAAiB,CAAQ;IACzB,oBAAoB,CAAU;IAC9B,QAAQ,CAAwB;CACjC"}