@collective-intelligence/external-apps-client-sdk-react 0.1.14 → 0.1.16

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 (2) hide show
  1. package/dist/index.d.ts +42 -1
  2. package/package.json +3 -3
package/dist/index.d.ts CHANGED
@@ -106,6 +106,39 @@ export type ExternalApplicationsCreateOrGetAppUserResponses = {
106
106
  };
107
107
  };
108
108
  export type ExternalApplicationsCreateOrGetAppUserResponse = ExternalApplicationsCreateOrGetAppUserResponses[keyof ExternalApplicationsCreateOrGetAppUserResponses];
109
+ export type ExternalApplicationsCheckAppUserEmailData = {
110
+ body: {
111
+ email: string;
112
+ };
113
+ headers: {
114
+ authorization?: string;
115
+ "x-organization-id": string;
116
+ "x-correlation-id"?: string;
117
+ "x-external-audit-issuer"?: string;
118
+ "x-external-audit-subject"?: string;
119
+ "x-external-caller-kind"?: "anonymous_visitor";
120
+ "x-external-ci-user-id"?: string;
121
+ "x-external-server-role"?: string;
122
+ };
123
+ path?: never;
124
+ query?: never;
125
+ url: "/application/v1/users/check-email";
126
+ };
127
+ export type ExternalApplicationsCheckAppUserEmailResponses = {
128
+ /**
129
+ * Success
130
+ */
131
+ 200: {
132
+ correlationId: string;
133
+ result: {
134
+ usable: true;
135
+ } | {
136
+ reason: "user_unavailable" | "target_inactive";
137
+ usable: false;
138
+ };
139
+ };
140
+ };
141
+ export type ExternalApplicationsCheckAppUserEmailResponse = ExternalApplicationsCheckAppUserEmailResponses[keyof ExternalApplicationsCheckAppUserEmailResponses];
109
142
  export type ExternalApplicationsGetAppUserResponses = {
110
143
  /**
111
144
  * Success
@@ -501,6 +534,9 @@ export interface DurableFileUpload {
501
534
  sizeBytes: number;
502
535
  }
503
536
  export type ExternalApplicationServiceOperationRequest = {
537
+ input: ExternalApplicationsCheckAppUserEmailData["body"];
538
+ operationId: "users_check_email";
539
+ } | {
504
540
  input: DurableFileUpload;
505
541
  operationId: "files_upload";
506
542
  } | {
@@ -520,11 +556,16 @@ export type ExternalApplicationServiceOperationRequest = {
520
556
  };
521
557
  operationId: "users_link_companies";
522
558
  };
559
+ /**
560
+ * Whether `users_create_or_get` would accept an email, checked without
561
+ * creating anything; an unknown email is usable.
562
+ */
563
+ export type ApplicationUserEmailCheck = ExternalApplicationsCheckAppUserEmailResponse["result"];
523
564
  /** A user's linked company entities, in entity id order. */
524
565
  export interface UserCompanyLinks {
525
566
  entityIds: string[];
526
567
  }
527
- export type ExternalApplicationServiceOperationSuccess = EnvelopeSuccess<"files_upload", {
568
+ export type ExternalApplicationServiceOperationSuccess = EnvelopeSuccess<"users_check_email", ApplicationUserEmailCheck> | EnvelopeSuccess<"files_upload", {
528
569
  storageFileId: StorageFileId;
529
570
  }> | EnvelopeSuccess<"origins_set_runtime", {
530
571
  origin: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@collective-intelligence/external-apps-client-sdk-react",
3
- "version": "0.1.14",
3
+ "version": "0.1.16",
4
4
  "description": "React bindings for Collective Intelligence external applications.",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -48,8 +48,8 @@
48
48
  "access": "public"
49
49
  },
50
50
  "devDependencies": {
51
- "@collective-intelligence/external-apps-client-sdk": "0.1.14",
52
- "@collective-intelligence/ui-react": "0.1.14",
51
+ "@collective-intelligence/external-apps-client-sdk": "0.1.16",
52
+ "@collective-intelligence/ui-react": "0.1.16",
53
53
  "@oxlint/plugins": "1.85.0",
54
54
  "@tanstack/react-router": "1.170.30",
55
55
  "@tanstack/react-start": "1.168.47",