| 1 | 2 | ▶ | use Moops -strict; |
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||
| 2 | 2 | ||
| 3 | 2 | ▶ | library WebService::Intercom::Types |
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
Subroutine
__ANON__: called CC=1 SCAR=0.0
Subroutine
__ANON__: called CC=1 SCAR=0.0
Subroutine
__ANON__: called CC=1 SCAR=0.0
Subroutine
__ANON__: called CC=1 SCAR=0.0
Subroutine
__ANON__: called CC=1 SCAR=0.0
Subroutine
__ANON__: called CC=1 SCAR=0.0
Subroutine
__ANON__: called CC=1 SCAR=0.0
Subroutine
__ANON__: called CC=1 SCAR=0.0
Subroutine
__ANON__: called CC=1 SCAR=0.0
Subroutine
__ANON__: called CC=1 SCAR=0.0
Subroutine
__ANON__: called CC=1 SCAR=0.0
Subroutine
__ANON__: called CC=1 SCAR=0.0
Subroutine
__ANON__: called CC=1 SCAR=0.0
Subroutine
__ANON__: called CC=1 SCAR=0.0
Subroutine
__ANON__: called CC=1 SCAR=0.0
Subroutine
__ANON__: called CC=1 SCAR=0.0
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||
| 4 | extends Types::Standard | ||
| 5 | declares CustomAttributeNameType, | ||
| 6 | CustomAttributeValueType, | ||
| 7 | IPAddressType, | ||
| 8 | CustomAttributesType, | ||
| 9 | EventNameType, | ||
| 10 | EventMetadataURLValueType, | ||
| 11 | EventMetadataPriceValueType, | ||
| 12 | EventMetadataType, | ||
| 13 | SocialProfileListType, | ||
| 14 | SocialProfileType, | ||
| 15 | AvatarType, | ||
| 16 | LocationDataType, | ||
| 17 | CompaniesListType, | ||
| 18 | SegmentsListType, | ||
| 19 | SegmentType, | ||
| 20 | TagsListType, | ||
| 21 | TagUserIdentifierType, | ||
| 22 | TagCompanyIdentifierType, | ||
| 23 | MessagePersonType | ||
| 24 | { | ||
| 25 | |||
| 26 | 2 | declare "MessagePersonType", as Dict[ | |
| 27 | type => StrMatch[qr/^(admin|user)$/], | ||
| 28 | user_id => Optional[Str], | ||
| 29 | email => Optional[Str], | ||
| 30 | id => Optional[Str] | ||
| 31 | ]; | ||
| 32 | 0 | ▶ | coerce MessagePersonType, from HashRef, via { |
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||
| 33 | 0 | MessagePersonType->new($_); | |
| 34 | 2 | }; | |
| 35 | |||
| 36 | 2 | declare "CustomAttributeNameType", as StrMatch[qr/^[^[.\$]+$/]; | |
| 37 | 2 | declare "IPAddressType", as StrMatch[qr/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/]; | |
| 38 | 0 | ▶ | coerce IPAddressType, from Str, via { |
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||
| 39 | 0 | IPAddressType->new($_); | |
| 40 | 2 | }; | |
| 41 | |||
| 42 | |||
| 43 | 2 | declare "CustomAttributeValueType", as Value|Bool; | |
| 44 | |||
| 45 | 2 | declare "CustomAttributesType", as Map[CustomAttributeNameType, CustomAttributeValueType]; | |
| 46 | 0 | ▶ | coerce CustomAttributesType, from HashRef, via { |
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||
| 47 | 0 | CustomAttributesType->new($_); | |
| 48 | 2 | }; | |
| 49 | |||
| 50 | 2 | declare "SocialProfileType", as Dict[type => Str, | |
| 51 | name => Maybe[Str], | ||
| 52 | username => Maybe[Str], | ||
| 53 | url => Maybe[Str], | ||
| 54 | id => Maybe[Str] | ||
| 55 | ]; | ||
| 56 | 0 | ▶ | coerce SocialProfileType, from HashRef, via { |
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||
| 57 | 0 | SocialProfileType->new($_); | |
| 58 | 2 | }; | |
| 59 | |||
| 60 | 2 | declare "SocialProfileListType", as Dict[type => Str, | |
| 61 | social_profiles => ArrayRef[SocialProfileType] | ||
| 62 | ]; | ||
| 63 | 0 | ▶ | coerce SocialProfileListType, from HashRef, via { |
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||
| 64 | 0 | SocialProfileListType->new($_); | |
| 65 | 2 | }; | |
| 66 | |||
| 67 | 2 | declare "EventNameType", as StrMatch[qr/^[^[.\$]+$/]; | |
| 68 | |||
| 69 | 2 | declare "EventMetadataURLValueType", as Dict[url => Str, | |
| 70 | value => Optional[Str]]; | ||
| 71 | 0 | ▶ | coerce EventMetadataURLValueType, from HashRef, via { |
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||
| 72 | 0 | EventMetadataURLValueType->new($_); | |
| 73 | 2 | }; | |
| 74 | |||
| 75 | 2 | declare "EventMetadataPriceValueType", as Dict[amount => Int, | |
| 76 | currency => Str]; | ||
| 77 | |||
| 78 | 0 | ▶ | coerce EventMetadataPriceValueType, from HashRef, via { |
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||
| 79 | 0 | EventMetadataPriceValueType->new($_); | |
| 80 | 2 | }; | |
| 81 | |||
| 82 | |||
| 83 | 2 | declare "EventMetadataType", as Map[Str, Value|EventMetadataURLValueType|EventMetadataPriceValueType]; | |
| 84 | 0 | ▶ | coerce EventMetadataType from HashRef, via { |
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||
| 85 | 0 | EventMetadataType->new($_); | |
| 86 | 2 | }; | |
| 87 | |||
| 88 | |||
| 89 | 2 | declare "TagUserIdentifierType", as Dict[id => Optional[Str], | |
| 90 | email => Optional[Str], | ||
| 91 | user_id => Optional[Str], | ||
| 92 | untag => Optional[Bool], | ||
| 93 | ]; | ||
| 94 | 0 | ▶ | coerce TagUserIdentifierType, from HashRef, via { |
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||
| 95 | 0 | TagUserIdentifierType->new($_) | |
| 96 | 2 | }; | |
| 97 | |||
| 98 | |||
| 99 | 2 | declare "TagCompanyIdentifierType", as Dict[id => Optional[Str], | |
| 100 | company_id => Optional[Str], | ||
| 101 | untag => Optional[Bool], | ||
| 102 | ]; | ||
| 103 | 0 | ▶ | coerce TagCompanyIdentifierType, from HashRef, via { |
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||
| 104 | 0 | TagCompanyIdentifierType->new($_) | |
| 105 | 2 | }; | |
| 106 | |||
| 107 | |||
| 108 | |||
| 109 | 2 | declare "AvatarType", as Dict[type => Str, | |
| 110 | image_url => Maybe[Str]]; | ||
| 111 | |||
| 112 | 2 | declare "LocationDataType", as Dict[type => Str, | |
| 113 | city_name => Maybe[Str], | ||
| 114 | continent_code => Maybe[Str], | ||
| 115 | country_code => Maybe[Str], | ||
| 116 | country_name => Maybe[Str], | ||
| 117 | latitude => Maybe[Num], | ||
| 118 | longitude => Maybe[Num], | ||
| 119 | postal_code => Maybe[Str], | ||
| 120 | region_name => Maybe[Str], | ||
| 121 | timezone => Maybe[Str] | ||
| 122 | ]; | ||
| 123 | |||
| 124 | 2 | declare "CompaniesListType", as Dict[type => Str, | |
| 125 | companies => ArrayRef[Dict[id => Str]]]; | ||
| 126 | |||
| 127 | |||
| 128 | 2 | declare "SegmentType", as Dict[type => Str, | |
| 129 | id => Str, | ||
| 130 | name => Str, | ||
| 131 | created_at => Int, | ||
| 132 | updated_at => Int]; | ||
| 133 | |||
| 134 | 2 | declare "SegmentsListType", as Dict[type => Str, | |
| 135 | segments => ArrayRef[Dict[type => Str, id => Str]]]; | ||
| 136 | |||
| 137 | |||
| 138 | 2 | declare "TagsListType", as Dict[type => Str, | |
| 139 | tags => ArrayRef[Dict[id => Str, | ||
| 140 | type => Str, | ||
| 141 | name => Optional[Str] | ||
| 142 | ]]]; | ||
| 143 | |||
| 144 | }; | ||
| 145 | |||
| 146 | 2 | 1; | |