@things-factory/contact 10.1.278 → 10.1.279
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/package.json +22 -6
- package/CHANGELOG.md +0 -8
- package/dist-client/bootstrap.js.map +0 -1
- package/dist-client/components/contact-popup.js.map +0 -1
- package/dist-client/components/contact-selector.js.map +0 -1
- package/dist-client/index.js.map +0 -1
- package/dist-client/pages/contact-importer.js.map +0 -1
- package/dist-client/pages/contact-list-page.js.map +0 -1
- package/dist-client/route.js.map +0 -1
- package/dist-client/tsconfig.tsbuildinfo +0 -1
- package/dist-server/controllers/index.js.map +0 -1
- package/dist-server/controllers/register-contact-as-system-user.js.map +0 -1
- package/dist-server/index.js.map +0 -1
- package/dist-server/role-tasks.js.map +0 -1
- package/dist-server/routes.js.map +0 -1
- package/dist-server/service/contact/contact-counterparty.js.map +0 -1
- package/dist-server/service/contact/contact-item.js.map +0 -1
- package/dist-server/service/contact/contact-mutation.js.map +0 -1
- package/dist-server/service/contact/contact-query.js.map +0 -1
- package/dist-server/service/contact/contact-type.js.map +0 -1
- package/dist-server/service/contact/contact.js.map +0 -1
- package/dist-server/service/contact/contacts-by-email.js.map +0 -1
- package/dist-server/service/contact/index.js.map +0 -1
- package/dist-server/service/contact/profile.js.map +0 -1
- package/dist-server/service/index.js.map +0 -1
- package/dist-server/tsconfig.tsbuildinfo +0 -1
- package/tests/open-doors.test.ts +0 -41
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"contact-type.js","sourceRoot":"","sources":["../../../server/service/contact/contact-type.ts"],"names":[],"mappings":";;;;AAAA,+CAAoE;AACpE,qDAAqD;AAErD,iDAAiD;AAEjD,uCAAwC;AACxC,iDAAiD;AACjD,uCAAmC;AAG5B,IAAM,UAAU,GAAhB,MAAM,UAAU;CA2BtB,CAAA;AA3BY,gCAAU;AAErB;IADC,IAAA,oBAAK,EAAC,EAAE,WAAW,EAAE,wBAAwB,EAAE,CAAC;;w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,EAAE,IAAI,EAAE,WAAW,EAAE,sCAAsC,EAAE,CAAC;;4CAChE;uBAhCJ,YAAY;IADxB,IAAA,wBAAS,EAAC,EAAE,WAAW,EAAE,uDAAuD,EAAE,CAAC;GACvE,YAAY,CAiCxB;AAGM,IAAM,WAAW,GAAjB,MAAM,WAAW;CAMvB,CAAA;AANY,kCAAW;AAEtB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,iBAAO,CAAC,EAAE,EAAE,WAAW,EAAE,0BAA0B,EAAE,CAAC;;0CACtD;AAGhB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,EAAE,EAAE,WAAW,EAAE,yCAAyC,EAAE,CAAC;;0CAClE;sBALF,WAAW;IADvB,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,oBAAoB,EAAE,CAAC;GACrC,WAAW,CAMvB","sourcesContent":["import { ObjectType, Field, InputType, Int, ID } from 'type-graphql'\nimport { GraphQLEmailAddress } from 'graphql-scalars'\n\nimport { ObjectRef } from '@things-factory/shell'\n\nimport { ProfileInput } from './profile'\nimport { ContactItemPatch } from './contact-item'\nimport { Contact } from './contact'\n\n@InputType({ description: 'A new contact' })\nexport class NewContact {\n @Field({ description: 'The name of the person' })\n name: string\n\n @Field(type => ObjectRef, { nullable: true, description: 'The counterparty the person belongs to, by its id - null clears it' })\n counterparty?: ObjectRef | null\n\n @Field(type => GraphQLEmailAddress, { nullable: true, description: 'The work email - kept as a work email item' })\n email?: string\n\n @Field({ nullable: true, description: 'The work phone - kept as a work phone item' })\n phone?: string\n\n @Field({ nullable: true, description: 'The work address - kept as a work address item' })\n address?: string\n\n @Field({ nullable: true, description: 'The department at work - kept as a work department item' })\n department?: string\n\n @Field({ nullable: true, description: 'A note about the person' })\n note?: string\n\n @Field(type => ProfileInput, { nullable: true, description: 'The profile picture and how it is framed' })\n profile?: ProfileInput\n\n @Field(type => [ContactItemPatch], { nullable: true, description: 'Ways to reach the person' })\n items?: ContactItemPatch[]\n}\n\n@InputType({ description: 'Changes to a contact; a field left out stays as it is' })\nexport class ContactPatch {\n @Field(type => ID, { nullable: true })\n id?: string\n\n @Field({ nullable: true, description: 'The name of the person' })\n name?: string\n\n @Field(type => ObjectRef, { nullable: true, description: 'The counterparty the person belongs to, by its id - null clears it' })\n counterparty?: ObjectRef | null\n\n @Field(type => GraphQLEmailAddress, { nullable: true, description: 'The work email - kept as a work email item' })\n email?: string\n\n @Field({ nullable: true, description: 'The work phone - kept as a work phone item' })\n phone?: string\n\n @Field({ nullable: true, description: 'The work address - kept as a work address item' })\n address?: string\n\n @Field({ nullable: true, description: 'The department at work - kept as a work department item' })\n department?: string\n\n @Field({ nullable: true, description: 'A note about the person' })\n note?: string\n\n @Field(type => ProfileInput, { nullable: true, description: 'The profile picture and how it is framed' })\n profile?: ProfileInput\n\n @Field(type => [ContactItemPatch], { nullable: true, description: 'Ways to reach the person' })\n items?: ContactItemPatch[]\n\n @Field({ nullable: true, description: 'In a batch: + to create, M to modify' })\n cuFlag?: string\n}\n\n@ObjectType({ description: 'A page of contacts' })\nexport class ContactList {\n @Field(type => [Contact], { description: 'The contacts of the page' })\n items: Contact[]\n\n @Field(type => Int, { description: 'How many contacts match, over all pages' })\n total: number\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"contact.js","sourceRoot":"","sources":["../../../server/service/contact/contact.ts"],"names":[],"mappings":";;;;AAAA,qCAWgB;AAChB,+CAA2E;AAC3E,qDAAqD;AAErD,iDAA4D;AAC5D,yDAAgD;AAChD,uDAAuD;AAEvD,iDAA4C;AAC5C,uCAAmC;AAEnC,IAAY,YAWX;AAXD,WAAY,YAAY;IACtB,6BAAa,CAAA;IACb,sCAAsB,CAAA;IACtB,+BAAe,CAAA;IACf,mCAAmB,CAAA;IACnB,+BAAe,CAAA;IACf,qCAAqB,CAAA;IACrB,mCAAmB,CAAA;IACnB,mCAAmB,CAAA;IACnB,yCAAyB,CA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K,EAAC,cAAc,EAAE,CAAC,OAAgB,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC;IACnF,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,0EAA0E,EAAE,CAAC;GAC3F,OAAO,CA4EnB","sourcesContent":["import {\n CreateDateColumn,\n UpdateDateColumn,\n DeleteDateColumn,\n Entity,\n Index,\n Column,\n RelationId,\n ManyToOne,\n OneToMany,\n PrimaryGeneratedColumn\n} from 'typeorm'\nimport { ObjectType, Field, Int, ID, registerEnumType } from 'type-graphql'\nimport { GraphQLEmailAddress } from 'graphql-scalars'\n\nimport { Domain, ScalarObject } from '@things-factory/shell'\nimport { User } from '@things-factory/auth-base'\nimport { Counterparty } from '@things-factory/biz-base'\n\nimport { ContactItem } from './contact-item'\nimport { Profile } from './profile'\n\nexport enum ContactField {\n Name = 'name',\n JobTitle = 'job-title',\n Phone = 'phone',\n Address = 'address',\n Email = 'email',\n Birthday = 'birthday',\n Profile = 'profile',\n Picture = 'picture',\n Department = 'department',\n Homepage = 'homepage'\n}\n\nregisterEnumType(ContactField, {\n name: 'ContactField',\n description: 'The kind of a contact item - phone, email, address and the like'\n})\n\n@Entity()\n@Index('ix_contact_0', (contact: Contact) => [contact.domain, contact.name])\n@Index('ix_contact_1', (contact: Contact) => [contact.domain, contact.counterparty])\n@ObjectType({ description: 'A person to reach, the counterparty they belong to and how to reach them' })\nexport class Contact {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID)\n readonly id: string\n\n @ManyToOne(type => Domain)\n @Field(type => Domain)\n domain?: Domain\n\n @RelationId((contact: Contact) => contact.domain)\n domainId?: string\n\n @Column()\n @Field({ nullable: true, description: 'The name of the person' })\n name?: string\n\n @ManyToOne(type => Counterparty, { nullable: true })\n @Field(type => Counterparty, { nullable: true, description: 'The counterparty the person belongs to - one of the same domain' })\n counterparty?: Counterparty\n\n @RelationId((contact: Contact) => contact.counterparty)\n counterpartyId?: string\n\n @Field(type => GraphQLEmailAddress, { nullable: true, description: 'The work email, read from the items' })\n email?: string\n\n @Field({ nullable: true, description: 'The work phone, read from the items' })\n phone?: string\n\n @Field({ nullable: true, description: 'The work address, read from the items' })\n address?: string\n\n @Field({ nullable: true, description: 'The department at work, read from the items' })\n department?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'A note about the person' })\n note?: string\n\n @Column('simple-json', { nullable: true })\n @Field(type => Profile, { nullable: true, description: 'The profile picture and how it is framed' })\n profile: Profile\n\n @Column('simple-json', { nullable: true })\n @Field(type => [ContactItem], { nullable: true, description: 'Ways to reach the person, each a kind, a label and a value' })\n items?: ContactItem[]\n\n @CreateDateColumn()\n @Field({ nullable: true, description: 'When it was created' })\n createdAt?: Date\n\n @UpdateDateColumn()\n @Field({ nullable: true, description: 'When it was last changed' })\n updatedAt?: Date\n\n @DeleteDateColumn()\n @Field({ nullable: true, description: 'When it was deleted' })\n deletedAt?: Date\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n creator?: User\n\n @RelationId((contact: Contact) => contact.creator)\n creatorId?: string\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n updater?: User\n\n @RelationId((contact: Contact) => contact.updater)\n updaterId?: string\n\n getContactItem(type: ContactField, label?: string) {\n return (this.items || []).find(item => item.type === type && (!item.label || item.label === label))?.value\n }\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"contacts-by-email.js","sourceRoot":"","sources":["../../../server/service/contact/contacts-by-email.ts"],"names":[],"mappings":";;;AAcA,0CAKC;AAjBD,uCAAiD;AAEjD;;;GAGG;AAEH,+CAA+C;AACxC,MAAM,QAAQ,GAAG,CAAC,OAA+B,EAAE,EAAE,CAC1D,CAAC,OAAO,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,sBAAY,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,CAAA;AAD9H,QAAA,QAAQ,YACsH;AAE3I,6DAA6D;AACtD,KAAK,UAAU,eAAe,CAAC,EAAiB,EAAE,MAAsB,EAAE,SAA4B;IAC3G,MAAM,MAAM,GAAG,IAAI,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,MAAM,CAAC,GAAG,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAA;IACpG,IAAI,CAAC,MAAM,CAAC,IAAI;QAAE,OAAO,EAAE,CAAA;IAC3B,MAAM,QAAQ,GAAG,MAAM,EAAE,CAAC,aAAa,CAAC,iBAAO,CAAC,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,MAAM,CAAC,EAAE,EAAE,EAAS,EAAE,CAAC,CAAA;IACtG,OAAO,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,IAAA,gBAAQ,EAAC,OAAO,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,CAAA;AAC3F,CAAC","sourcesContent":["import { EntityManager } from 'typeorm'\n\nimport { Contact, ContactField } from './contact'\n\n/*\n * The contacts reached at some email addresses - a contact's addresses are its email items, so another module that\n * knows only an address (a mail's sender, its recipients) finds the people and their counterparties here.\n */\n\n/** The addresses of a contact, lower-cased. */\nexport const emailsOf = (contact: Pick<Contact, 'items'>) =>\n (contact.items ?? []).filter(item => item.type === ContactField.Email && item.value).map(item => String(item.value).trim().toLowerCase())\n\n/** The domain's contacts reached at any of the addresses. */\nexport async function contactsByEmail(tx: EntityManager, domain: { id: string }, addresses: readonly string[]): Promise<Contact[]> {\n const wanted = new Set(addresses.map(one => String(one ?? '').trim().toLowerCase()).filter(Boolean))\n if (!wanted.size) return []\n const contacts = await tx.getRepository(Contact).find({ where: { domain: { id: domain.id } } as any })\n return contacts.filter(contact => emailsOf(contact).some(address => wanted.has(address)))\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/contact/index.ts"],"names":[],"mappings":";;;AAAA,uCAAmC;AACnC,uCAAmC;AACnC,mDAA8C;AAC9C,yDAAoD;AAEvC,QAAA,QAAQ,GAAG,CAAC,iBAAO,EAAE,iBAAO,CAAC,CAAA;AAC7B,QAAA,SAAS,GAAG,CAAC,4BAAY,EAAE,kCAAe,CAAC,CAAA","sourcesContent":["import { Contact } from './contact'\nimport { Profile } from './profile'\nimport { ContactQuery } from './contact-query'\nimport { ContactMutation } from './contact-mutation'\n\nexport const entities = [Profile, Contact]\nexport const resolvers = [ContactQuery, ContactMutation]\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"profile.js","sourceRoot":"","sources":["../../../server/service/contact/profile.ts"],"names":[],"mappings":";;;;AAAA,+CAA2D;AAE3D,+FAA2D;AAGpD,IAAM,OAAO,GAAb,MAAM,OAAO;CAYnB,CAAA;AAZY,0BAAO;AAElB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,mDAAmD,EAAE,CAAC;;qCAC/E;AAGb;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,iDAAiD,EAAE,CAAC;;oCAC9E;AAGZ;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,4CAA4C,EAAE,CAAC;;qCACxE;AAGb;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,4BAA4B,EAAE,CAAC;;wCACrD;kBAXL,OAAO;IADnB,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,kDAAkD,EAAE,CAAC;GACnE,OAAO,CAYnB;AAGM,IAAM,YAAY,GAAlB,MAAM,YAAY;CAexB,CAAA;AAfY,oCAAY;AAEvB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,mDAAmD,EAAE,CAAC;;0CAC/E;AAGb;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,iDAAiD,EAAE,CAAC;;yCAC9E;AAGZ;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,4CAA4C,EAAE,CAAC;;0CACxE;AAGb;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,4BAA4B,EAAE,CAAC;;6CACrD;AAGhB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,0BAAa,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,yBAAyB,EAAE,CAAC;;0CACxE;uBAdN,YAAY;IADxB,IAAA,wBAAS,EAAC,EAAE,WAAW,EAAE,kEAAkE,EAAE,CAAC;GAClF,YAAY,CAexB","sourcesContent":["import { ObjectType, Field, InputType } from 'type-graphql'\nimport type { FileUpload } from 'graphql-upload/GraphQLUpload.js'\nimport GraphQLUpload from 'graphql-upload/GraphQLUpload.js'\n\n@ObjectType({ description: 'A contact’s profile picture and how it is framed' })\nexport class Profile {\n @Field({ nullable: true, description: 'The horizontal offset of the picture in its frame' })\n left?: number\n\n @Field({ nullable: true, description: 'The vertical offset of the picture in its frame' })\n top?: number\n\n @Field({ nullable: true, description: 'How far the picture is zoomed in its frame' })\n zoom?: number\n\n @Field({ nullable: true, description: 'The address of the picture' })\n picture?: string\n}\n\n@InputType({ description: 'A contact’s profile picture and how it is framed, as it is given' })\nexport class ProfileInput {\n @Field({ nullable: true, description: 'The horizontal offset of the picture in its frame' })\n left?: number\n\n @Field({ nullable: true, description: 'The vertical offset of the picture in its frame' })\n top?: number\n\n @Field({ nullable: true, description: 'How far the picture is zoomed in its frame' })\n zoom?: number\n\n @Field({ nullable: true, description: 'The address of the picture' })\n picture?: string\n\n @Field(type => GraphQLUpload, { nullable: true, description: 'A new picture to upload' })\n file?: FileUpload\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../server/service/index.ts"],"names":[],"mappings":";;;;AAAA,yBAAyB;AACzB,4DAAiC;AACjC,iEAAsC;AACtC,4DAAiC;AACjC,sEAA2C;AAE3C,mCAAmC;AACnC,uCAAsF;AAEzE,QAAA,QAAQ,GAAG;IACtB,cAAc;IACd,GAAG,kBAAe;CACnB,CAAA;AAEY,QAAA,WAAW,GAAG;AACzB,iBAAiB;CAClB,CAAA;AAEY,QAAA,MAAM,GAAG;IACpB,eAAe,EAAE;QACf,sBAAsB;QACtB,GAAG,mBAAgB;KACpB;CACF,CAAA","sourcesContent":["/* EXPORT ENTITY TYPES */\nexport * from './contact/profile'\nexport * from './contact/contact-item'\nexport * from './contact/contact'\nexport * from './contact/contacts-by-email'\n\n/* IMPORT ENTITIES AND RESOLVERS */\nimport { entities as ContactEntities, resolvers as ContactResolvers } from './contact'\n\nexport const entities = [\n /* ENTITIES */\n ...ContactEntities\n]\n\nexport const subscribers = [\n /* SUBSCRIBERS */\n]\n\nexport const schema = {\n resolverClasses: [\n /* RESOLVER CLASSES */\n ...ContactResolvers\n ]\n}\n"]}
|