@sweepbright/api-client 0.30.4 → 0.30.5

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 (78) hide show
  1. package/dist/mockServer.js +27 -0
  2. package/dist/mockServer.js.map +1 -0
  3. package/dist/src/__tests__/auth.test.js +15 -0
  4. package/dist/src/__tests__/auth.test.js.map +1 -0
  5. package/dist/src/__tests__/channels.test.js +77 -0
  6. package/dist/src/__tests__/channels.test.js.map +1 -0
  7. package/dist/src/__tests__/contacts.test.js +61 -0
  8. package/dist/src/__tests__/contacts.test.js.map +1 -0
  9. package/dist/src/__tests__/estates.test.js +43 -0
  10. package/dist/src/__tests__/estates.test.js.map +1 -0
  11. package/dist/src/__tests__/leads.test.js +55 -0
  12. package/dist/src/__tests__/leads.test.js.map +1 -0
  13. package/dist/src/common/currencies.js +55 -0
  14. package/dist/src/common/currencies.js.map +1 -0
  15. package/dist/src/common/types.js +3 -0
  16. package/dist/src/common/types.js.map +1 -0
  17. package/dist/src/entities/office.js +9 -0
  18. package/dist/src/entities/office.js.map +1 -0
  19. package/dist/src/entities/property.js +220 -0
  20. package/dist/src/entities/property.js.map +1 -0
  21. package/dist/src/index.js +94 -0
  22. package/dist/src/index.js.map +1 -0
  23. package/dist/src/resources/channel_accounts.js +31 -0
  24. package/dist/src/resources/channel_accounts.js.map +1 -0
  25. package/dist/src/resources/channels.js +32 -0
  26. package/dist/src/resources/channels.js.map +1 -0
  27. package/dist/src/resources/companies.js +16 -0
  28. package/dist/src/resources/companies.js.map +1 -0
  29. package/dist/src/resources/contact_preferences.js +14 -0
  30. package/dist/src/resources/contact_preferences.js.map +1 -0
  31. package/dist/src/resources/contacts.js +29 -0
  32. package/dist/src/resources/contacts.js.map +1 -0
  33. package/dist/src/resources/estates.js +73 -0
  34. package/dist/src/resources/estates.js.map +1 -0
  35. package/dist/src/resources/leads.js +26 -0
  36. package/dist/src/resources/leads.js.map +1 -0
  37. package/dist/src/resources/negotiators.js +16 -0
  38. package/dist/src/resources/negotiators.js.map +1 -0
  39. package/dist/src/resources/offices.js +12 -0
  40. package/dist/src/resources/offices.js.map +1 -0
  41. package/dist/src/types.js +40 -0
  42. package/dist/src/types.js.map +1 -0
  43. package/dist/src/utils.js +28 -0
  44. package/dist/src/utils.js.map +1 -0
  45. package/package.json +5 -1
  46. package/.circleci/config.yml +0 -102
  47. package/.devcontainer/Dockerfile +0 -23
  48. package/.devcontainer/devcontainer.json +0 -59
  49. package/.editorconfig +0 -11
  50. package/.eslintrc.json +0 -6
  51. package/.github/PULL_REQUEST_TEMPLATE.md +0 -40
  52. package/.nvmrc +0 -1
  53. package/.prettierignore +0 -1
  54. package/jest.config.js +0 -7
  55. package/mockServer.ts +0 -44
  56. package/setupTests.ts +0 -1
  57. package/src/__tests__/auth.test.ts +0 -14
  58. package/src/__tests__/channels.test.ts +0 -104
  59. package/src/__tests__/contacts.test.ts +0 -85
  60. package/src/__tests__/estates.test.ts +0 -50
  61. package/src/__tests__/leads.test.ts +0 -67
  62. package/src/common/currencies.ts +0 -50
  63. package/src/common/types.ts +0 -1
  64. package/src/entities/office.ts +0 -193
  65. package/src/entities/property.ts +0 -574
  66. package/src/index.ts +0 -128
  67. package/src/resources/channel_accounts.ts +0 -39
  68. package/src/resources/channels.ts +0 -52
  69. package/src/resources/companies.ts +0 -15
  70. package/src/resources/contact_preferences.ts +0 -14
  71. package/src/resources/contacts.ts +0 -38
  72. package/src/resources/estates.ts +0 -145
  73. package/src/resources/leads.ts +0 -65
  74. package/src/resources/negotiators.ts +0 -19
  75. package/src/resources/offices.ts +0 -12
  76. package/src/types.ts +0 -88
  77. package/src/utils.ts +0 -35
  78. package/tsconfig.json +0 -19
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.handlers = exports.rest = exports.server = void 0;
4
+ const msw_1 = require("msw");
5
+ Object.defineProperty(exports, "rest", { enumerable: true, get: function () { return msw_1.rest; } });
6
+ const node_1 = require("msw/node");
7
+ const server = (0, node_1.setupServer)(msw_1.rest.post('*', (req, res, ctx) => {
8
+ return res(ctx.status(500), ctx.json({ error: 'Mock this request ' + req.url.toString() }));
9
+ }), msw_1.rest.get('*', (req, res, ctx) => {
10
+ return res(ctx.status(500), ctx.json({ error: 'Mock this request ' + req.url.toString() }));
11
+ }), msw_1.rest.put('*', (req, res, ctx) => {
12
+ return res(ctx.status(500), ctx.json({ error: 'Mock this request ' + req.url.toString() }));
13
+ }));
14
+ exports.server = server;
15
+ beforeAll(() => server.listen());
16
+ afterAll(() => server.close());
17
+ beforeEach(() => server.resetHandlers());
18
+ const handlers = {
19
+ authHandler: msw_1.rest.post('https://api.sweepbright.com/auth/access-token', (_req, res, ctx) => {
20
+ return res(ctx.status(200), ctx.json({
21
+ access_token: 'FAKE_TOKEN',
22
+ expires_in: Date.now(),
23
+ }));
24
+ }),
25
+ };
26
+ exports.handlers = handlers;
27
+ //# sourceMappingURL=mockServer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mockServer.js","sourceRoot":"","sources":["../mockServer.ts"],"names":[],"mappings":";;;AAAA,6BAA2B;AA2CV,qFA3CR,UAAI,OA2CQ;AA1CrB,mCAAuC;AAEvC,MAAM,MAAM,GAAG,IAAA,kBAAW,EACxB,UAAI,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE;IAC/B,OAAO,GAAG,CACR,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,EACf,GAAG,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,oBAAoB,GAAG,GAAG,CAAC,GAAG,CAAC,QAAQ,EAAE,EAAE,CAAC,CAC/D,CAAC;AACJ,CAAC,CAAC,EACF,UAAI,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE;IAC9B,OAAO,GAAG,CACR,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,EACf,GAAG,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,oBAAoB,GAAG,GAAG,CAAC,GAAG,CAAC,QAAQ,EAAE,EAAE,CAAC,CAC/D,CAAC;AACJ,CAAC,CAAC,EACF,UAAI,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE;IAC9B,OAAO,GAAG,CACR,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,EACf,GAAG,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,oBAAoB,GAAG,GAAG,CAAC,GAAG,CAAC,QAAQ,EAAE,EAAE,CAAC,CAC/D,CAAC;AACJ,CAAC,CAAC,CACH,CAAC;AAqBO,wBAAM;AAnBf,SAAS,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC;AACjC,QAAQ,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC;AAC/B,UAAU,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,aAAa,EAAE,CAAC,CAAC;AAEzC,MAAM,QAAQ,GAAG;IACf,WAAW,EAAE,UAAI,CAAC,IAAI,CACpB,+CAA+C,EAC/C,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE;QACjB,OAAO,GAAG,CACR,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,EACf,GAAG,CAAC,IAAI,CAAC;YACP,YAAY,EAAE,YAAY;YAC1B,UAAU,EAAE,IAAI,CAAC,GAAG,EAAE;SACvB,CAAC,CACH,CAAC;IACJ,CAAC,CACF;CACF,CAAC;AAEqB,4BAAQ"}
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const __1 = require("../");
4
+ const mockServer_1 = require("../../mockServer");
5
+ describe('authorization', () => {
6
+ it('can fetch an auth token', async () => {
7
+ const client = (0, __1.createClient)({
8
+ clientId: 'FAKE_ID',
9
+ clientSecret: 'FAKE_SECRET',
10
+ });
11
+ mockServer_1.server.use(mockServer_1.handlers.authHandler);
12
+ await client.authorize({});
13
+ });
14
+ });
15
+ //# sourceMappingURL=auth.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth.test.js","sourceRoot":"","sources":["../../../src/__tests__/auth.test.ts"],"names":[],"mappings":";;AAAA,2BAAmC;AACnC,iDAAoD;AAEpD,QAAQ,CAAC,eAAe,EAAE,GAAG,EAAE;IAC7B,EAAE,CAAC,yBAAyB,EAAE,KAAK,IAAI,EAAE;QACvC,MAAM,MAAM,GAAG,IAAA,gBAAY,EAAC;YAC1B,QAAQ,EAAE,SAAS;YACnB,YAAY,EAAE,aAAa;SAC5B,CAAC,CAAC;QAEH,mBAAM,CAAC,GAAG,CAAC,qBAAQ,CAAC,WAAW,CAAC,CAAC;QACjC,MAAM,MAAM,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;IAC7B,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1,77 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const __1 = require("../");
4
+ const mockServer_1 = require("../../mockServer");
5
+ describe('channels', () => {
6
+ it('can fetch a references list', async () => {
7
+ const client = (0, __1.createClient)({
8
+ clientId: 'FAKE_ID',
9
+ clientSecret: 'FAKE_SECRET',
10
+ });
11
+ mockServer_1.server.use(mockServer_1.handlers.authHandler);
12
+ await client.authorize();
13
+ const estateId = 'FAKE_ESTATE_ID';
14
+ const reference = 'FAKE_REFERENCE';
15
+ const channelAccountId = 'FAKE_CHANNEL_ACCOUNT_ID';
16
+ const companyId = 'FAKE_COMPANY_ID';
17
+ const channelId = 'FAKE_CHANNEL_ID';
18
+ mockServer_1.server.use(mockServer_1.rest.get('https://api.sweepbright.com/services/channel-references', (req, res, ctx) => {
19
+ return res(ctx.status(200), ctx.json({
20
+ data: [
21
+ {
22
+ reference_code: req.url.searchParams.get('reference_code'),
23
+ company_id: req.url.searchParams.get('company_id'),
24
+ channel_id: req.url.searchParams.get('channel_id'),
25
+ estate_id: estateId,
26
+ channel_account_id: channelAccountId,
27
+ },
28
+ ],
29
+ }));
30
+ }));
31
+ const result = await client.channels.resolveReferences(channelId, reference, companyId);
32
+ expect(result).toEqual({
33
+ data: [
34
+ {
35
+ reference_code: reference,
36
+ estate_id: estateId,
37
+ channel_account_id: channelAccountId,
38
+ channel_id: channelId,
39
+ company_id: companyId,
40
+ },
41
+ ],
42
+ });
43
+ });
44
+ it('it does not send a company_id when not set', async () => {
45
+ const client = (0, __1.createClient)({
46
+ clientId: 'FAKE_ID',
47
+ clientSecret: 'FAKE_SECRET',
48
+ });
49
+ mockServer_1.server.use(mockServer_1.handlers.authHandler);
50
+ await client.authorize();
51
+ const estateId = 'FAKE_ESTATE_ID';
52
+ const reference = 'FAKE_REFERENCE';
53
+ const channelAccountId = 'FAKE_CHANNEL_ACCOUNT_ID';
54
+ const channelId = 'FAKE_CHANNEL_ID';
55
+ mockServer_1.server.use(mockServer_1.rest.get('https://api.sweepbright.com/services/channel-references', (req, res, ctx) => {
56
+ try {
57
+ expect(req.url.search).toEqual(`?channel_id=${channelId}&reference_code=${reference}`);
58
+ }
59
+ catch (e) {
60
+ return res(ctx.status(500), ctx.json({ error: e }));
61
+ }
62
+ return res(ctx.status(200), ctx.json({
63
+ data: [
64
+ {
65
+ reference_code: req.url.searchParams.get('reference_code'),
66
+ company_id: 'FAKE',
67
+ channel_id: req.url.searchParams.get('channel_id'),
68
+ estate_id: estateId,
69
+ channel_account_id: channelAccountId,
70
+ },
71
+ ],
72
+ }));
73
+ }));
74
+ await client.channels.resolveReferences(channelId, reference, undefined);
75
+ });
76
+ });
77
+ //# sourceMappingURL=channels.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"channels.test.js","sourceRoot":"","sources":["../../../src/__tests__/channels.test.ts"],"names":[],"mappings":";;AAAA,2BAAmC;AACnC,iDAA0D;AAE1D,QA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,CAAC,GAAG,CAAC,gBAAgB,CAAC;wBAC1D,UAAU,EAAE,MAAM;wBAClB,UAAU,EAAE,GAAG,CAAC,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,YAAY,CAAC;wBAClD,SAAS,EAAE,QAAQ;wBACnB,kBAAkB,EAAE,gBAAgB;qBACrC;iBACF;aACF,CAAC,CACH,CAAC;QACJ,CAAC,CACF,CACF,CAAC;QAEF,MAAM,MAAM,CAAC,QAAQ,CAAC,iBAAiB,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC;IAC3E,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1,61 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const __1 = require("../");
4
+ const mockServer_1 = require("../../mockServer");
5
+ describe('contacts', () => {
6
+ it('requires authentication', async () => {
7
+ const client = (0, __1.createClient)({
8
+ clientId: 'FAKE_ID',
9
+ clientSecret: 'FAKE_SECRET',
10
+ });
11
+ try {
12
+ await client.contacts.getOne({
13
+ contactId: 'foo',
14
+ });
15
+ }
16
+ catch (err) {
17
+ expect(err.message).toEqual('client is not authenticated');
18
+ }
19
+ });
20
+ it('can fetch a contact', async () => {
21
+ const client = (0, __1.createClient)({
22
+ clientId: 'FAKE_ID',
23
+ clientSecret: 'FAKE_SECRET',
24
+ });
25
+ mockServer_1.server.use(mockServer_1.handlers.authHandler);
26
+ await client.authorize();
27
+ const contactId = 'FAKE_CONTACT_ID';
28
+ mockServer_1.server.use(mockServer_1.rest.get('https://api.sweepbright.com/services/contacts/:contactId', (req, res, ctx) => {
29
+ return res(ctx.status(200), ctx.json({
30
+ data: {
31
+ id: req.params.contactId,
32
+ },
33
+ }));
34
+ }));
35
+ const result = await client.contacts.getOne({
36
+ contactId: contactId,
37
+ });
38
+ expect(result).toEqual({ data: { id: contactId } });
39
+ });
40
+ it('can fetch a contact with negotiators', async () => {
41
+ const client = (0, __1.createClient)({
42
+ clientId: 'FAKE_ID',
43
+ clientSecret: 'FAKE_SECRET',
44
+ });
45
+ mockServer_1.server.use(mockServer_1.handlers.authHandler);
46
+ await client.authorize();
47
+ const contactId = 'FAKE_CONTACT_ID';
48
+ mockServer_1.server.use(mockServer_1.rest.get('https://api.sweepbright.com/services/contacts/:contactId?includes=negotiators', (req, res, ctx) => {
49
+ return res(ctx.status(200), ctx.json({
50
+ data: {
51
+ id: req.params.contactId,
52
+ },
53
+ }));
54
+ }));
55
+ const result = await client.contacts.getOneWithNegotiators({
56
+ contactId: contactId,
57
+ });
58
+ expect(result).toEqual({ data: { id: contactId } });
59
+ });
60
+ });
61
+ //# sourceMappingURL=contacts.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contacts.test.js","sourceRoot":"","sources":["../../../src/__tests__/contacts.test.ts"],"names":[],"mappings":";;AAAA,2BAAmC;AACnC,iDAA0D;AAE1D,QAAQ,CAAC,UAAU,EAAE,GAAG,EAAE;IACxB,EAAE,CAAC,yBAAyB,EAAE,KAAK,IAAI,EAAE;QACvC,MAAM,MAAM,GAAG,IAAA,gBAAY,EAAC;YAC1B,QAAQ,EAAE,SAAS;YACnB,YAAY,EAAE,aAAa;SAC5B,CAAC,CAAC;QAEH,IAAI;YACF,MAAM,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC;gBAC3B,SAAS,EAAE,KAAK;aACjB,CAAC,CAAC;SACJ;QAAC,OAAO,GAAQ,EAAE;YACjB,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,6BAA6B,CAAC,CAAC;SAC5D;IACH,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,qBAAqB,EAAE,KAAK,IAAI,EAAE;QACnC,MAAM,MAAM,GAAG,IAAA,gBAAY,EAAC;YAC1B,QAAQ,EAAE,SAAS;YACnB,YAAY,EAAE,aAAa;SAC5B,CAAC,CAAC;QAEH,mBAAM,CAAC,GAAG,CAAC,qBAAQ,CAAC,WAAW,CAAC,CA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M,CAAC,SAAS;iBACzB;aACF,CAAC,CACH,CAAC;QACJ,CAAC,CACF,CACF,CAAC;QAEF,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,QAAQ,CAAC,qBAAqB,CAAC;YACzD,SAAS,EAAE,SAAS;SACrB,CAAC,CAAC;QAEH,MAAM,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,CAAC,CAAC;IACtD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const __1 = require("../");
4
+ const mockServer_1 = require("../../mockServer");
5
+ describe('estates', () => {
6
+ it('requires authentication', async () => {
7
+ const client = (0, __1.createClient)({
8
+ clientId: 'FAKE_ID',
9
+ clientSecret: 'FAKE_SECRET',
10
+ });
11
+ try {
12
+ await client.estates.getOne({
13
+ estateId: 'FAKE_ESTATE_ID',
14
+ companyId: 'FAKE_COMPANY_ID',
15
+ });
16
+ }
17
+ catch (err) {
18
+ await expect(err.message).toEqual('client is not authenticated');
19
+ }
20
+ });
21
+ it('can fetch a estate', async () => {
22
+ const client = (0, __1.createClient)({
23
+ clientId: 'FAKE_ID',
24
+ clientSecret: 'FAKE_SECRET',
25
+ });
26
+ mockServer_1.server.use(mockServer_1.handlers.authHandler);
27
+ await client.authorize();
28
+ const estateId = 'FAKE_ESTATE_ID';
29
+ mockServer_1.server.use(mockServer_1.rest.get('https://api.sweepbright.com/services/estates/:estateId', (req, res, ctx) => {
30
+ return res(ctx.status(200), ctx.json({
31
+ data: {
32
+ id: req.params.estateId,
33
+ },
34
+ }));
35
+ }));
36
+ const result = await client.estates.getOne({
37
+ estateId: estateId,
38
+ companyId: 'FAKE_COMPANY_ID',
39
+ });
40
+ expect(result).toEqual({ id: estateId });
41
+ });
42
+ });
43
+ //# sourceMappingURL=estates.test.js.map
@@ -0,0 +1 @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,CAAC;QACF,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC;YACzC,QAAQ,EAAE,QAAQ;YAClB,SAAS,EAAE,iBAAiB;SAC7B,CAAC,CAAC;QACH,MAAM,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAC;IAC3C,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const __1 = require("../");
4
+ const mockServer_1 = require("../../mockServer");
5
+ describe('leads', () => {
6
+ it('requires authentication', async () => {
7
+ const client = (0, __1.createClient)({
8
+ clientId: 'FAKE_ID',
9
+ clientSecret: 'FAKE_SECRET',
10
+ });
11
+ try {
12
+ await client.leads.createLead({
13
+ firstName: 'foo',
14
+ lastName: 'bar',
15
+ propertyId: 'baz',
16
+ email: 'john@example.com',
17
+ phone: '999',
18
+ message: "I'm not authenticated",
19
+ portal: 'portal',
20
+ });
21
+ }
22
+ catch (err) {
23
+ expect(err.message).toEqual('client is not authenticated');
24
+ }
25
+ });
26
+ it('can put a lead', async () => {
27
+ const client = (0, __1.createClient)({
28
+ clientId: 'FAKE_ID',
29
+ clientSecret: 'FAKE_SECRET',
30
+ });
31
+ mockServer_1.server.use(mockServer_1.handlers.authHandler);
32
+ await client.authorize();
33
+ const lead = {
34
+ firstName: 'foo',
35
+ lastName: 'bar',
36
+ propertyId: 'PROPERTY_ID',
37
+ email: 'john@example.com',
38
+ phone: '999',
39
+ message: "I'm authenticated",
40
+ portal: 'portal',
41
+ location_preference: {
42
+ country: 'BR',
43
+ postal_codes: ['06010'],
44
+ },
45
+ };
46
+ mockServer_1.server.use(mockServer_1.rest.put('https://api.sweepbright.com/estates/PROPERTY_ID/leads', (_, res, ctx) => {
47
+ return res(ctx.status(200), ctx.json({
48
+ data: lead,
49
+ }));
50
+ }));
51
+ const result = await client.leads.createLead(lead);
52
+ expect(result).toEqual({ data: lead });
53
+ });
54
+ });
55
+ //# sourceMappingURL=leads.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"leads.test.js","sourceRoot":"","sources":["../../../src/__tests__/leads.test.ts"],"names":[],"mappings":";;AAAA,2BAAmC;AACnC,iDAA0D;AAE1D,QAAQ,CAAC,OAAO,EAAE,GAAG,EAAE;IACrB,EAAE,CAAC,yBAAyB,EAAE,KAAK,IAAI,EAAE;QACvC,MAAM,MAAM,GAAG,IAAA,gBAAY,EAAC;YAC1B,QAAQ,EAAE,SAAS;YACnB,YAAY,EAAE,aAAa;SAC5B,CAAC,CAAC;QAEH,IAAI;YACF,MAAM,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC;gBAC5B,SAAS,EAAE,KAAK;gBAChB,QAAQ,EAAE,KAAK;gBACf,UAAU,EAAE,KAAK;gBACjB,KAAK,EAAE,kBAAkB;gBACzB,KAAK,EAAE,KAAK;gBACZ,OAAO,EAAE,uBAAuB;gBAChC,MAAM,EAAE,QAAQ;aACjB,CAAC,CAAC;SACJ;QAAC,OAAO,GAAQ,EAAE;YACjB,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,6BAA6B,CAAC,CAAC;SAC5D;IACH,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,gBAAgB,EAAE,KAAK,IAAI,EAAE;QAC9B,MAAM,MAAM,GAAG,IAAA,gBAAY,EAAC;YAC1B,QAAQ,EAAE,SAAS;YACnB,YAAY,EAAE,aAAa;SAC5B,CAAC,CAAC;QAEH,mBAAM,CAAC,GAAG,CAAC,qBAAQ,CAAC,WAAW,CAAC,CAAC;QACjC,MAAM,MAAM,CAAC,SAAS,EAAE,CAAC;QAEzB,MAAM,IAAI,GAAG;YACX,SAAS,EAAE,KAAK;YAChB,QAAQ,EAAE,KAAK;YACf,UAAU,EAAE,aAAa;YACzB,KAAK,EAAE,kBAAkB;YACzB,KAAK,EAAE,KAAK;YACZ,OAAO,EAAE,mBAAmB;YAC5B,MAAM,EAAE,QAAQ;YAChB,mBAAmB,EAAE;gBACnB,OAAO,EAAE,IAAI;gBACb,YAAY,EAAE,CAAC,OAAO,CAAC;aACxB;SACF,CAAC;QAEF,mBAAM,CAAC,GAAG,CACR,iBAAI,CAAC,GAAG,CACN,uDAAuD,EACvD,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE;YACd,OAAO,GAAG,CACR,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,EACf,GAAG,CAAC,IAAI,CAAC;gBACP,IAAI,EAAE,IAAI;aACX,CAAC,CACH,CAAC;QACJ,CAAC,CACF,CACF,CAAC;QAEF,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;QAEnD,MAAM,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;IACzC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Currency = void 0;
4
+ var Currency;
5
+ (function (Currency) {
6
+ Currency["EUR"] = "EUR";
7
+ Currency["AUD"] = "AUD";
8
+ Currency["USD"] = "USD";
9
+ Currency["AFN"] = "AFN";
10
+ Currency["GBP"] = "GBP";
11
+ Currency["XPF"] = "XPF";
12
+ Currency["MXN"] = "MXN";
13
+ Currency["PHP"] = "PHP";
14
+ Currency["CAD"] = "CAD";
15
+ Currency["RON"] = "RON";
16
+ Currency["BRL"] = "BRL";
17
+ Currency["UYU"] = "UYU";
18
+ Currency["HRK"] = "HRK";
19
+ Currency["GEL"] = "GEL";
20
+ Currency["RSD"] = "RSD";
21
+ Currency["ILS"] = "ILS";
22
+ Currency["ARS"] = "ARS";
23
+ Currency["NZD"] = "NZD";
24
+ Currency["ZAR"] = "ZAR";
25
+ Currency["INR"] = "INR";
26
+ Currency["DZD"] = "DZD";
27
+ Currency["LKR"] = "LKR";
28
+ Currency["CLP"] = "CLP";
29
+ Currency["ALL"] = "ALL";
30
+ Currency["RUB"] = "RUB";
31
+ Currency["TRY"] = "TRY";
32
+ Currency["UAH"] = "UAH";
33
+ Currency["MUR"] = "MUR";
34
+ Currency["COP"] = "COP";
35
+ Currency["AED"] = "AED";
36
+ Currency["MZN"] = "MZN";
37
+ Currency["EGP"] = "EGP";
38
+ Currency["AOA"] = "AOA";
39
+ Currency["XOF"] = "XOF";
40
+ Currency["CNY"] = "CNY";
41
+ Currency["XCD"] = "XCD";
42
+ Currency["VND"] = "VND";
43
+ Currency["JPY"] = "JPY";
44
+ Currency["MAD"] = "MAD";
45
+ Currency["CHF"] = "CHF";
46
+ Currency["IRR"] = "IRR";
47
+ Currency["KHR"] = "KHR";
48
+ Currency["XAF"] = "XAF";
49
+ Currency["AMD"] = "AMD";
50
+ Currency["ETB"] = "ETB";
51
+ Currency["SGD"] = "SGD";
52
+ Currency["NGN"] = "NGN";
53
+ Currency["PKP"] = "PKP";
54
+ })(Currency || (exports.Currency = Currency = {}));
55
+ //# sourceMappingURL=currencies.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"currencies.js","sourceRoot":"","sources":["../../../src/common/currencies.ts"],"names":[],"mappings":";;;AAAA,IAAY,QAiDX;AAjDD,WAAY,QAAQ;IAClB,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;AACb,CAAC,EAjDW,QAAQ,wBAAR,QAAQ,QAiDnB"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/common/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MeasurementSystem = void 0;
4
+ var MeasurementSystem;
5
+ (function (MeasurementSystem) {
6
+ MeasurementSystem["metric"] = "metric";
7
+ MeasurementSystem["imperial"] = "imperial";
8
+ })(MeasurementSystem || (exports.MeasurementSystem = MeasurementSystem = {}));
9
+ //# sourceMappingURL=office.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"office.js","sourceRoot":"","sources":["../../../src/entities/office.ts"],"names":[],"mappings":";;;AAGA,IAAY,iBAGX;AAHD,WAAY,iBAAiB;IAC3B,sCAAiB,CAAA;IACjB,0CAAqB,CAAA;AACvB,CAAC,EAHW,iBAAiB,iCAAjB,iBAAiB,QAG5B"}
@@ -0,0 +1,220 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.InternalType = exports.LandUseDesignation = exports.Shape = exports.FloodRisk = exports.EnergyReport = exports.EnergyCategoryExtended = exports.EnergyCategory = exports.Orientation = exports.Condition = exports.Negotiation = exports.PropertyType = exports.PropertySubType = exports.PropertyStatus = exports.AreaType = exports.MeasurementSystem = exports.UnitOfMeasurement = exports.Amenity = exports.ADScale = void 0;
4
+ var ADScale;
5
+ (function (ADScale) {
6
+ ADScale["A"] = "A";
7
+ ADScale["B"] = "B";
8
+ ADScale["C"] = "C";
9
+ ADScale["D"] = "D";
10
+ })(ADScale || (exports.ADScale = ADScale = {}));
11
+ var Amenity;
12
+ (function (Amenity) {
13
+ Amenity["Attic"] = "attic";
14
+ Amenity["Balcony"] = "balcony";
15
+ Amenity["Basement"] = "basement";
16
+ Amenity["ClimateControl"] = "climate_control";
17
+ Amenity["Code"] = "code";
18
+ Amenity["CoolingRoom"] = "cooling_room";
19
+ Amenity["DisplayWindow"] = "display_window";
20
+ Amenity["Drainage"] = "drainage";
21
+ Amenity["ElectricalGate"] = "electrical_gate";
22
+ Amenity["ExteriorParking"] = "exterior_parking";
23
+ Amenity["Fence"] = "fence";
24
+ Amenity["Fenced"] = "fenced";
25
+ Amenity["Garden"] = "garden";
26
+ Amenity["Guesthouse"] = "guesthouse";
27
+ Amenity["InteriorParking"] = "interior_parking";
28
+ Amenity["KeyCard"] = "key_card";
29
+ Amenity["Lift"] = "lift";
30
+ Amenity["ManualGate"] = "manual_gate";
31
+ Amenity["Parking"] = "parking";
32
+ Amenity["Pool"] = "pool";
33
+ Amenity["PrintAndCopyArea"] = "print_and_copy_area";
34
+ Amenity["ReceptionArea"] = "reception_area";
35
+ Amenity["RoadAccess"] = "road_access";
36
+ Amenity["ServerRoom"] = "server_room";
37
+ Amenity["SewerAccess"] = "sewer_access";
38
+ Amenity["StorageSpace"] = "storage_space";
39
+ Amenity["Terrace"] = "terrace";
40
+ Amenity["UtilitiesAccess"] = "utilities_access";
41
+ Amenity["WaitingArea"] = "waiting_area";
42
+ Amenity["WaterAccess"] = "water_access";
43
+ })(Amenity || (exports.Amenity = Amenity = {}));
44
+ var UnitOfMeasurement;
45
+ (function (UnitOfMeasurement) {
46
+ UnitOfMeasurement["cm"] = "cm";
47
+ UnitOfMeasurement["inch"] = "inch";
48
+ UnitOfMeasurement["sq_m"] = "sq_m";
49
+ UnitOfMeasurement["sq_ft"] = "sq_ft";
50
+ })(UnitOfMeasurement || (exports.UnitOfMeasurement = UnitOfMeasurement = {}));
51
+ var MeasurementSystem;
52
+ (function (MeasurementSystem) {
53
+ MeasurementSystem["Metric"] = "metric";
54
+ MeasurementSystem["Imperial"] = "imperial";
55
+ })(MeasurementSystem || (exports.MeasurementSystem = MeasurementSystem = {}));
56
+ var AreaType;
57
+ (function (AreaType) {
58
+ AreaType["Bathrooms"] = "bathrooms";
59
+ AreaType["Bedrooms"] = "bedrooms";
60
+ AreaType["ClosedOfficeSpaces"] = "closed_office_spaces";
61
+ AreaType["ConferenceRooms"] = "conference_rooms";
62
+ AreaType["Floors"] = "floors";
63
+ AreaType["Kitchens"] = "kitchens";
64
+ AreaType["LivingRoom"] = "living_room";
65
+ AreaType["ManufacturingAreas"] = "manufacturing_areas";
66
+ AreaType["MeetingRooms"] = "meeting_rooms";
67
+ AreaType["OpenOfficeSpaces"] = "open_office_spaces";
68
+ AreaType["ParkingSpaces"] = "parking_spaces";
69
+ AreaType["Showrooms"] = "showrooms";
70
+ AreaType["StorageRooms"] = "storage_rooms";
71
+ AreaType["Toilets"] = "toilets";
72
+ })(AreaType || (exports.AreaType = AreaType = {}));
73
+ var PropertyStatus;
74
+ (function (PropertyStatus) {
75
+ PropertyStatus["prospect"] = "prospect";
76
+ PropertyStatus["lost"] = "lost";
77
+ PropertyStatus["available"] = "available";
78
+ PropertyStatus["rented"] = "rented";
79
+ PropertyStatus["sold"] = "sold";
80
+ PropertyStatus["bid"] = "bid";
81
+ PropertyStatus["option"] = "option";
82
+ PropertyStatus["under_contract"] = "under_contract";
83
+ })(PropertyStatus || (exports.PropertyStatus = PropertyStatus = {}));
84
+ var PropertySubType;
85
+ (function (PropertySubType) {
86
+ PropertySubType["duplex"] = "duplex";
87
+ PropertySubType["agricultural"] = "agricultural";
88
+ PropertySubType["pasture_land"] = "pasture_land";
89
+ PropertySubType["private_garage"] = "private_garage";
90
+ PropertySubType["loft"] = "loft";
91
+ PropertySubType["recreational"] = "recreational";
92
+ PropertySubType["investment_property"] = "investment_property";
93
+ PropertySubType["mansion"] = "mansion";
94
+ PropertySubType["terraced"] = "terraced";
95
+ PropertySubType["townhouse"] = "townhouse";
96
+ PropertySubType["condo"] = "condo";
97
+ PropertySubType["penthouse"] = "penthouse";
98
+ PropertySubType["farm"] = "farm";
99
+ PropertySubType["cottage"] = "cottage";
100
+ PropertySubType["buildable"] = "buildable";
101
+ PropertySubType["villa"] = "villa";
102
+ PropertySubType["retail"] = "retail";
103
+ PropertySubType["covered_outdoor_space"] = "covered_outdoor_space";
104
+ PropertySubType["indoor_parking_space"] = "indoor_parking_space";
105
+ PropertySubType["flex_office"] = "flex_office";
106
+ PropertySubType["open_office"] = "open_office";
107
+ PropertySubType["industrial"] = "industrial";
108
+ PropertySubType["restaurant_and_cafe"] = "restaurant_and_cafe";
109
+ PropertySubType["student_accommodation"] = "student_accommodation";
110
+ PropertySubType["leisure_and_sports"] = "leasure_and_sports";
111
+ PropertySubType["outdoor_parking_space"] = "outdoor_parking_space";
112
+ PropertySubType["coworking"] = "coworking";
113
+ PropertySubType["warehouse"] = "warehouse";
114
+ PropertySubType["shop"] = "shop";
115
+ PropertySubType["semi_detached"] = "semi_detached";
116
+ PropertySubType["healthcare"] = "healthcare";
117
+ PropertySubType["detached"] = "detached";
118
+ PropertySubType["bungalow"] = "bungalow";
119
+ })(PropertySubType || (exports.PropertySubType = PropertySubType = {}));
120
+ var PropertyType;
121
+ (function (PropertyType) {
122
+ PropertyType["apartment"] = "apartment";
123
+ PropertyType["house"] = "house";
124
+ PropertyType["land"] = "land";
125
+ PropertyType["office"] = "office";
126
+ PropertyType["parking"] = "parking";
127
+ PropertyType["commercial"] = "commercial";
128
+ })(PropertyType || (exports.PropertyType = PropertyType = {}));
129
+ var Negotiation;
130
+ (function (Negotiation) {
131
+ Negotiation["sale"] = "sale";
132
+ Negotiation["let"] = "let";
133
+ })(Negotiation || (exports.Negotiation = Negotiation = {}));
134
+ var Condition;
135
+ (function (Condition) {
136
+ Condition["new"] = "new";
137
+ Condition["good"] = "good";
138
+ Condition["mint"] = "mint";
139
+ Condition["poor"] = "poor";
140
+ Condition["fair"] = "fair";
141
+ })(Condition || (exports.Condition = Condition = {}));
142
+ var Orientation;
143
+ (function (Orientation) {
144
+ Orientation["N"] = "N";
145
+ Orientation["S"] = "S";
146
+ Orientation["E"] = "E";
147
+ Orientation["W"] = "W";
148
+ Orientation["NE"] = "NE";
149
+ Orientation["NW"] = "NW";
150
+ Orientation["SE"] = "SE";
151
+ Orientation["SW"] = "SW";
152
+ })(Orientation || (exports.Orientation = Orientation = {}));
153
+ var EnergyCategory;
154
+ (function (EnergyCategory) {
155
+ EnergyCategory["A"] = "A";
156
+ EnergyCategory["B"] = "B";
157
+ EnergyCategory["C"] = "C";
158
+ EnergyCategory["D"] = "D";
159
+ EnergyCategory["E"] = "E";
160
+ EnergyCategory["F"] = "F";
161
+ EnergyCategory["G"] = "G";
162
+ })(EnergyCategory || (exports.EnergyCategory = EnergyCategory = {}));
163
+ var EnergyCategoryExtended;
164
+ (function (EnergyCategoryExtended) {
165
+ EnergyCategoryExtended["A_PLUS_PLUS"] = "A++";
166
+ EnergyCategoryExtended["A_PLUS"] = "A+";
167
+ EnergyCategoryExtended["A"] = "A";
168
+ EnergyCategoryExtended["B"] = "B";
169
+ EnergyCategoryExtended["C"] = "C";
170
+ EnergyCategoryExtended["D"] = "D";
171
+ EnergyCategoryExtended["E"] = "E";
172
+ EnergyCategoryExtended["F"] = "F";
173
+ EnergyCategoryExtended["G"] = "G";
174
+ })(EnergyCategoryExtended || (exports.EnergyCategoryExtended = EnergyCategoryExtended = {}));
175
+ var EnergyReport;
176
+ (function (EnergyReport) {
177
+ EnergyReport["conform"] = "conform";
178
+ EnergyReport["not_conform"] = "not_conform";
179
+ EnergyReport["no_report"] = "no_report";
180
+ EnergyReport["not_applicable"] = "not_applicable";
181
+ })(EnergyReport || (exports.EnergyReport = EnergyReport = {}));
182
+ var FloodRisk;
183
+ (function (FloodRisk) {
184
+ FloodRisk["no_flood_risk_area"] = "no_flood_risk_area";
185
+ FloodRisk["potential_flood_sensitive_area"] = "potential_flood_sensitive_area";
186
+ FloodRisk["effective_flood_sensitive_area"] = "effective_flood_sensitive_area";
187
+ })(FloodRisk || (exports.FloodRisk = FloodRisk = {}));
188
+ var Shape;
189
+ (function (Shape) {
190
+ Shape["flat"] = "flat";
191
+ Shape["sloped"] = "sloped";
192
+ Shape["wooded"] = "wooded";
193
+ Shape["has_rivers_lakes_or_ponds"] = "has_rivers_lakes_or_ponds";
194
+ Shape["single"] = "single";
195
+ Shape["double"] = "double";
196
+ })(Shape || (exports.Shape = Shape = {}));
197
+ var LandUseDesignation;
198
+ (function (LandUseDesignation) {
199
+ LandUseDesignation["residential"] = "residential";
200
+ LandUseDesignation["mixed_residential"] = "mixed_residential";
201
+ LandUseDesignation["industrial"] = "industrial";
202
+ LandUseDesignation["recreational"] = "recreational";
203
+ LandUseDesignation["park"] = "park";
204
+ LandUseDesignation["area_with_economical_activity"] = "area_with_economical_activity";
205
+ LandUseDesignation["forest_area"] = "forest_area";
206
+ LandUseDesignation["agricultural"] = "agricultural";
207
+ LandUseDesignation["nature_area"] = "nature_area";
208
+ LandUseDesignation["natural_reserve"] = "natural_reserve";
209
+ LandUseDesignation["residential_area_with_cultural_historical_value"] = "residential_area_with_cultural_historical_value";
210
+ LandUseDesignation["industrial_area_for_sme"] = "industrial_area_for_sme";
211
+ LandUseDesignation["day_recreation_area"] = "day_recreation_area";
212
+ LandUseDesignation["other"] = "other";
213
+ })(LandUseDesignation || (exports.LandUseDesignation = LandUseDesignation = {}));
214
+ var InternalType;
215
+ (function (InternalType) {
216
+ InternalType["project"] = "project";
217
+ InternalType["unit"] = "unit";
218
+ InternalType["standalone"] = "standalone";
219
+ })(InternalType || (exports.InternalType = InternalType = {}));
220
+ //# sourceMappingURL=property.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"property.js","sourceRoot":"","sources":["../../../src/entities/property.ts"],"names":[],"mappings":";;;AAIA,IAAY,OAKX;AALD,WAAY,OAAO;IACjB,kBAAO,CAAA;IACP,kBAAO,CAAA;IACP,kBAAO,CAAA;IACP,kBAAO,CAAA;AACT,CAAC,EALW,OAAO,uBAAP,OAAO,QAKlB;AAED,IAAY,OA+BX;AA/BD,WAAY,OAAO;IACjB,0BAAe,CAAA;IACf,8BAAmB,CAAA;IACnB,gCAAqB,CAAA;IACrB,6CAAkC,CAAA;IAClC,wBAAa,CAAA;IACb,uCAA4B,CAAA;IAC5B,2CAAgC,CAAA;IAChC,gCAAqB,CAAA;IACrB,6CAAkC,CAAA;IAClC,+CAAoC,CAAA;IACpC,0BAAe,CAAA;IACf,4BAAiB,CAAA;IACjB,4BAAiB,CAAA;IACjB,oCAAyB,CAAA;IACzB,+CAAoC,CAAA;IACpC,+BAAoB,CAAA;IACpB,wBAAa,CAAA;IACb,qCAA0B,CAAA;IAC1B,8BAAmB,CAAA;IACnB,wBAAa,CAAA;IACb,mDAAwC,CAAA;IACxC,2CAAgC,CAAA;IAChC,qCAA0B,CAAA;IAC1B,qCAA0B,CAAA;IAC1B,uCAA4B,CAAA;IAC5B,yCAA8B,CAAA;IAC9B,8BAAmB,CAAA;IACnB,+CAAoC,CAAA;IACpC,uCAA4B,CAAA;IAC5B,uCAA4B,CAAA;AAC9B,CAAC,EA/BW,OAAO,uBAAP,OAAO,QA+BlB;AAED,IAAY,iBAKX;AALD,WAAY,iBAAiB;IAC3B,8BAAS,CAAA;IACT,kCAAa,CAAA;IACb,kCA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