@sortlist/cli 0.31.0 → 0.32.0
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 +1 -1
- package/src/commands/login.ts +21 -5
- package/src/graphql/generated/graphql.ts +62 -51
package/package.json
CHANGED
package/src/commands/login.ts
CHANGED
|
@@ -11,11 +11,27 @@ import { error, hint, info, success, warn } from '../lib/output.ts';
|
|
|
11
11
|
|
|
12
12
|
// TODO: fetch the set of available API scopes dynamically (e.g. from Hermes'
|
|
13
13
|
// resource server) once the backend exposes them. For now the CLI requests a
|
|
14
|
-
// fixed superset so users can exercise every subgraph.
|
|
15
|
-
//
|
|
16
|
-
//
|
|
17
|
-
//
|
|
18
|
-
|
|
14
|
+
// fixed superset so users can exercise every subgraph. Auth0 RBAC grants the
|
|
15
|
+
// intersection of requested scopes and the user's assigned permissions by EXACT
|
|
16
|
+
// string match — wildcards are not expanded, and unmatched scopes are dropped
|
|
17
|
+
// silently. The list below must therefore contain every permission name the
|
|
18
|
+
// terraform-auth0 roles can hold (superadmin `*:*`, admin `*:read`, sales
|
|
19
|
+
// granular grants), not just the broadest wildcard per service.
|
|
20
|
+
const API_SCOPES = [
|
|
21
|
+
'atlas/*:*',
|
|
22
|
+
'atlas/*:read',
|
|
23
|
+
'core/*:*',
|
|
24
|
+
'core/*:read',
|
|
25
|
+
'max/*:*',
|
|
26
|
+
'max/*:read',
|
|
27
|
+
'max/company:write',
|
|
28
|
+
'signals/*:*',
|
|
29
|
+
'signals/*:read',
|
|
30
|
+
'billing/*:*',
|
|
31
|
+
'billing/*:read',
|
|
32
|
+
'billing/offer:*',
|
|
33
|
+
];
|
|
34
|
+
const DEFAULT_SCOPE = `openid profile email offline_access ${API_SCOPES.join(' ')}`;
|
|
19
35
|
|
|
20
36
|
function sleep(ms: number): Promise<void> {
|
|
21
37
|
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
@@ -1221,12 +1221,23 @@ export type Contact = Node & {
|
|
|
1221
1221
|
lastName?: Maybe<Scalars['String']['output']>;
|
|
1222
1222
|
/** LinkedIn profile URL. */
|
|
1223
1223
|
linkedinUrl?: Maybe<Scalars['String']['output']>;
|
|
1224
|
+
/** Mercator location divisions assigned to this contact's location. Empty until the background enrichment job runs. */
|
|
1225
|
+
locations: LocationConnection;
|
|
1224
1226
|
/** The organization this contact belongs to. */
|
|
1225
1227
|
organization: Organization;
|
|
1226
1228
|
/** When the contact record was last modified. */
|
|
1227
1229
|
updatedAt: Scalars['ISO8601DateTime']['output'];
|
|
1228
1230
|
};
|
|
1229
1231
|
|
|
1232
|
+
|
|
1233
|
+
/** A business contact associated with an organization. */
|
|
1234
|
+
export type ContactLocationsArgs = {
|
|
1235
|
+
after?: InputMaybe<Scalars['String']['input']>;
|
|
1236
|
+
before?: InputMaybe<Scalars['String']['input']>;
|
|
1237
|
+
first?: InputMaybe<Scalars['Int']['input']>;
|
|
1238
|
+
last?: InputMaybe<Scalars['Int']['input']>;
|
|
1239
|
+
};
|
|
1240
|
+
|
|
1230
1241
|
/** The connection type for Contact. */
|
|
1231
1242
|
export type ContactConnection = {
|
|
1232
1243
|
__typename?: 'ContactConnection';
|
|
@@ -1262,8 +1273,18 @@ export type ContactEnrichmentResultPayload = {
|
|
|
1262
1273
|
export type ContactFilterInput = {
|
|
1263
1274
|
/** Filter by confidence score (0.0–1.0). */
|
|
1264
1275
|
confidenceScore?: InputMaybe<FloatFilterInput>;
|
|
1265
|
-
/**
|
|
1276
|
+
/**
|
|
1277
|
+
* Filter by ISO 3166-1 alpha-2 country code.
|
|
1278
|
+
* @deprecated Use divisionIds for geographic filtering. divisionIds supports cities, regions, and multi-country groups (DACH, BENELUX) via Mercator.
|
|
1279
|
+
*/
|
|
1266
1280
|
countryCode?: InputMaybe<StringFilterInput>;
|
|
1281
|
+
/**
|
|
1282
|
+
* Filter contacts that belong to any of the given Mercator location division
|
|
1283
|
+
* IDs. `eq`/`in` match contacts with at least one overlapping division;
|
|
1284
|
+
* `not_eq`/`not_in` exclude them. This is an array-overlap filter against
|
|
1285
|
+
* Mercator-encoded division IDs, not a scalar Atlas ID filter.
|
|
1286
|
+
*/
|
|
1287
|
+
divisionIds?: InputMaybe<IdFilterInput>;
|
|
1267
1288
|
/** Filter by email verification status (VALID, INVALID, CATCH_ALL, UNKNOWN). */
|
|
1268
1289
|
emailStatus?: InputMaybe<EmailStatusFilterInput>;
|
|
1269
1290
|
/** Filter by contact global id. */
|
|
@@ -3254,10 +3275,7 @@ export type LinkedinSendMessageStepConfig = {
|
|
|
3254
3275
|
writingStyle?: Maybe<OutboundCampaignWritingStyle>;
|
|
3255
3276
|
};
|
|
3256
3277
|
|
|
3257
|
-
/**
|
|
3258
|
-
* An administrative geographic division (country, region, city, etc.) sourced from
|
|
3259
|
-
* Overture Maps, backed by PostGIS polygon boundaries.
|
|
3260
|
-
*/
|
|
3278
|
+
/** Federation reference to a Location owned by another subgraph. */
|
|
3261
3279
|
export type Location = Node & {
|
|
3262
3280
|
__typename?: 'Location';
|
|
3263
3281
|
/** Numeric hierarchy depth. 0 = country, higher = more granular. */
|
|
@@ -3268,6 +3286,7 @@ export type Location = Node & {
|
|
|
3268
3286
|
children: LocationConnection;
|
|
3269
3287
|
/** ISO 3166-1 alpha-2 country code of the division. */
|
|
3270
3288
|
countryCode?: Maybe<Scalars['String']['output']>;
|
|
3289
|
+
/** GlobalID-encoded Location id. */
|
|
3271
3290
|
id: Scalars['ID']['output'];
|
|
3272
3291
|
/** Primary English name of the division. */
|
|
3273
3292
|
name: Scalars['String']['output'];
|
|
@@ -3278,10 +3297,7 @@ export type Location = Node & {
|
|
|
3278
3297
|
};
|
|
3279
3298
|
|
|
3280
3299
|
|
|
3281
|
-
/**
|
|
3282
|
-
* An administrative geographic division (country, region, city, etc.) sourced from
|
|
3283
|
-
* Overture Maps, backed by PostGIS polygon boundaries.
|
|
3284
|
-
*/
|
|
3300
|
+
/** Federation reference to a Location owned by another subgraph. */
|
|
3285
3301
|
export type LocationChildrenArgs = {
|
|
3286
3302
|
after?: InputMaybe<Scalars['String']['input']>;
|
|
3287
3303
|
before?: InputMaybe<Scalars['String']['input']>;
|
|
@@ -3305,23 +3321,34 @@ export type LocationConnection = {
|
|
|
3305
3321
|
};
|
|
3306
3322
|
|
|
3307
3323
|
/** An edge in a connection. */
|
|
3308
|
-
export type LocationEdge =
|
|
3324
|
+
export type LocationEdge = {
|
|
3309
3325
|
__typename?: 'LocationEdge';
|
|
3310
3326
|
/** A cursor for use in pagination. */
|
|
3311
3327
|
cursor: Scalars['String']['output'];
|
|
3312
|
-
id: Scalars['ID']['output'];
|
|
3313
3328
|
/** The item at the end of the edge. */
|
|
3314
3329
|
node?: Maybe<Location>;
|
|
3315
3330
|
};
|
|
3316
3331
|
|
|
3317
3332
|
/** Administrative subdivision level of a geographic location. */
|
|
3318
3333
|
export type LocationSubtype =
|
|
3334
|
+
/** Borough or city district between the locality and neighborhood levels. */
|
|
3335
|
+
| 'BOROUGH'
|
|
3319
3336
|
/** Sovereign nation (admin_level 0). */
|
|
3320
3337
|
| 'COUNTRY'
|
|
3321
3338
|
/** County, department, or second-level subdivision (admin_level 3-4). */
|
|
3322
3339
|
| 'COUNTY'
|
|
3340
|
+
/** Dependent or overseas territory of a country. */
|
|
3341
|
+
| 'DEPENDENCY'
|
|
3342
|
+
/** Local administrative unit such as a commune or municipality, between the county and locality levels. */
|
|
3343
|
+
| 'LOCALADMIN'
|
|
3323
3344
|
/** City, town, or municipality (admin_level 5-8). */
|
|
3324
3345
|
| 'LOCALITY'
|
|
3346
|
+
/** Grouping of counties between the region and county levels. */
|
|
3347
|
+
| 'MACROCOUNTY'
|
|
3348
|
+
/** Large area grouping multiple neighborhoods within a locality. */
|
|
3349
|
+
| 'MACROHOOD'
|
|
3350
|
+
/** Grouping of regions between the country and region levels. */
|
|
3351
|
+
| 'MACROREGION'
|
|
3325
3352
|
/** Neighborhood, district, or sub-municipal area (admin_level 9+). */
|
|
3326
3353
|
| 'NEIGHBORHOOD'
|
|
3327
3354
|
/** State, province, or first-level subdivision (admin_level 1-2). */
|
|
@@ -3867,13 +3894,6 @@ export type Mutation = {
|
|
|
3867
3894
|
retrainToneOfVoice?: Maybe<RetrainToneOfVoicePayload>;
|
|
3868
3895
|
/** Revoke a pending invitation so its link can no longer be claimed. */
|
|
3869
3896
|
revokeInvitation?: Maybe<RevokeInvitationPayload>;
|
|
3870
|
-
/**
|
|
3871
|
-
* Merge rotated credential material into a RAW integration's data blob.
|
|
3872
|
-
* M2M-only: gated on the max/company:write scope so consuming subgraphs (e.g.
|
|
3873
|
-
* Outreach) can write back rotated session cookies through the federation
|
|
3874
|
-
* gateway without knowing about Max internals.
|
|
3875
|
-
*/
|
|
3876
|
-
rotateIntegrationCredential?: Maybe<RotateIntegrationCredentialPayload>;
|
|
3877
3897
|
/** Run a background job inline. Admin-only, intended for E2E test orchestration. */
|
|
3878
3898
|
runMaxSynchronousWorker?: Maybe<RunMaxSynchronousWorkerPayload>;
|
|
3879
3899
|
/** Runs a background job inline. Admin-only, intended for E2E test orchestration. */
|
|
@@ -4340,11 +4360,6 @@ export type MutationRevokeInvitationArgs = {
|
|
|
4340
4360
|
};
|
|
4341
4361
|
|
|
4342
4362
|
|
|
4343
|
-
export type MutationRotateIntegrationCredentialArgs = {
|
|
4344
|
-
input: RotateIntegrationCredentialInput;
|
|
4345
|
-
};
|
|
4346
|
-
|
|
4347
|
-
|
|
4348
4363
|
export type MutationRunMaxSynchronousWorkerArgs = {
|
|
4349
4364
|
input: RunMaxSynchronousWorkerInput;
|
|
4350
4365
|
};
|
|
@@ -4624,6 +4639,8 @@ export type OrganizationAddress = Node & {
|
|
|
4624
4639
|
__typename?: 'OrganizationAddress';
|
|
4625
4640
|
/** City where the office is located. */
|
|
4626
4641
|
city?: Maybe<Scalars['String']['output']>;
|
|
4642
|
+
/** Geographic coordinates of the address as a GeoJSON Point. */
|
|
4643
|
+
coordinates?: Maybe<Coordinate>;
|
|
4627
4644
|
/** ISO 3166-1 alpha-2 country code. */
|
|
4628
4645
|
countryCode?: Maybe<Scalars['String']['output']>;
|
|
4629
4646
|
/** Human-readable country name derived from country_code. */
|
|
@@ -4633,10 +4650,8 @@ export type OrganizationAddress = Node & {
|
|
|
4633
4650
|
id: Scalars['ID']['output'];
|
|
4634
4651
|
/** Whether this is the organization's headquarters. */
|
|
4635
4652
|
isHeadquarters: Scalars['Boolean']['output'];
|
|
4636
|
-
/**
|
|
4637
|
-
|
|
4638
|
-
/** Geographic longitude. */
|
|
4639
|
-
longitude?: Maybe<Scalars['Float']['output']>;
|
|
4653
|
+
/** Mercator location divisions for this office address. Empty until the background enrichment job runs. */
|
|
4654
|
+
locations: LocationConnection;
|
|
4640
4655
|
/** Postal or ZIP code. */
|
|
4641
4656
|
postalCode?: Maybe<Scalars['String']['output']>;
|
|
4642
4657
|
/** State or province. */
|
|
@@ -4647,6 +4662,15 @@ export type OrganizationAddress = Node & {
|
|
|
4647
4662
|
updatedAt: Scalars['ISO8601DateTime']['output'];
|
|
4648
4663
|
};
|
|
4649
4664
|
|
|
4665
|
+
|
|
4666
|
+
/** A physical address of an organization. */
|
|
4667
|
+
export type OrganizationAddressLocationsArgs = {
|
|
4668
|
+
after?: InputMaybe<Scalars['String']['input']>;
|
|
4669
|
+
before?: InputMaybe<Scalars['String']['input']>;
|
|
4670
|
+
first?: InputMaybe<Scalars['Int']['input']>;
|
|
4671
|
+
last?: InputMaybe<Scalars['Int']['input']>;
|
|
4672
|
+
};
|
|
4673
|
+
|
|
4650
4674
|
/** The connection type for OrganizationAddress. */
|
|
4651
4675
|
export type OrganizationAddressConnection = {
|
|
4652
4676
|
__typename?: 'OrganizationAddressConnection';
|
|
@@ -4712,7 +4736,10 @@ export type OrganizationFilterInput = {
|
|
|
4712
4736
|
companySize?: InputMaybe<RangeFilterInput>;
|
|
4713
4737
|
/** Filter by confidence score (0.0–1.0). */
|
|
4714
4738
|
confidenceScore?: InputMaybe<FloatFilterInput>;
|
|
4715
|
-
/**
|
|
4739
|
+
/**
|
|
4740
|
+
* Filter by ISO 3166-1 alpha-2 country code.
|
|
4741
|
+
* @deprecated Use divisionIds for geographic filtering. divisionIds supports cities, regions, and multi-country groups (DACH, BENELUX) via Mercator.
|
|
4742
|
+
*/
|
|
4716
4743
|
countryCode?: InputMaybe<StringFilterInput>;
|
|
4717
4744
|
/**
|
|
4718
4745
|
* Description embedding filters. Each entry matches organizations whose
|
|
@@ -4724,6 +4751,13 @@ export type OrganizationFilterInput = {
|
|
|
4724
4751
|
* Threshold validated by the embedding_calibration test suite.
|
|
4725
4752
|
*/
|
|
4726
4753
|
description?: InputMaybe<Array<EmbeddingFilterInput>>;
|
|
4754
|
+
/**
|
|
4755
|
+
* Filter organizations that have at least one address belonging to any of the
|
|
4756
|
+
* given Mercator location division IDs. `eq`/`in` match organizations with at
|
|
4757
|
+
* least one overlapping division; `not_eq`/`not_in` exclude them. This is an
|
|
4758
|
+
* array-overlap filter against Mercator-encoded division IDs, not a scalar Atlas ID filter.
|
|
4759
|
+
*/
|
|
4760
|
+
divisionIds?: InputMaybe<IdFilterInput>;
|
|
4727
4761
|
/** Filter by organization global id. */
|
|
4728
4762
|
id?: InputMaybe<IdFilterInput>;
|
|
4729
4763
|
/**
|
|
@@ -5931,29 +5965,6 @@ export type RevokeInvitationPayload = Node & {
|
|
|
5931
5965
|
invitation: Invitation;
|
|
5932
5966
|
};
|
|
5933
5967
|
|
|
5934
|
-
/** Autogenerated input type of RotateIntegrationCredential */
|
|
5935
|
-
export type RotateIntegrationCredentialInput = {
|
|
5936
|
-
/** A unique identifier for the client performing the mutation. */
|
|
5937
|
-
clientMutationId?: InputMaybe<Scalars['String']['input']>;
|
|
5938
|
-
/**
|
|
5939
|
-
* Partial payload to merge into the integration's existing data blob (e.g. `{
|
|
5940
|
-
* cookies: { li_at: "..." } }` for LinkedIn). Existing keys not present in the
|
|
5941
|
-
* payload are preserved.
|
|
5942
|
-
*/
|
|
5943
|
-
data: Scalars['JSON']['input'];
|
|
5944
|
-
/** Global ID of the integration whose credential rotated. */
|
|
5945
|
-
id: Scalars['ID']['input'];
|
|
5946
|
-
};
|
|
5947
|
-
|
|
5948
|
-
/** Autogenerated return type of RotateIntegrationCredential. */
|
|
5949
|
-
export type RotateIntegrationCredentialPayload = Node & {
|
|
5950
|
-
__typename?: 'RotateIntegrationCredentialPayload';
|
|
5951
|
-
/** A unique identifier for the client performing the mutation. */
|
|
5952
|
-
clientMutationId?: Maybe<Scalars['String']['output']>;
|
|
5953
|
-
id: Scalars['ID']['output'];
|
|
5954
|
-
integration: Integration;
|
|
5955
|
-
};
|
|
5956
|
-
|
|
5957
5968
|
/** Federation reference to a Routine owned by another subgraph. */
|
|
5958
5969
|
export type Routine = Node & TrackableInterface & {
|
|
5959
5970
|
__typename?: 'Routine';
|