@collective-intelligence/external-apps-server-sdk 0.4.1 → 0.5.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/dist/index.d.ts CHANGED
@@ -777,7 +777,7 @@ export type ExternalApplicationsGetRunSourcesErrors = {
777
777
  error: {
778
778
  code: "invalid_request";
779
779
  message: string;
780
- reason?: "users_create_forbidden" | "role_not_assignable" | "user_unavailable" | "target_inactive" | "user_not_found" | "user_not_created_by_app" | "application_unavailable" | "actor_not_allowed";
780
+ reason?: "users_create_forbidden" | "role_not_assignable" | "user_unavailable" | "target_inactive" | "user_not_found" | "user_not_created_by_app" | "application_unavailable" | "actor_not_allowed" | "page_depth_exceeded";
781
781
  retryable: false;
782
782
  };
783
783
  };
@@ -789,7 +789,7 @@ export type ExternalApplicationsGetRunSourcesErrors = {
789
789
  error: {
790
790
  code: "authentication_required";
791
791
  message: string;
792
- reason?: "users_create_forbidden" | "role_not_assignable" | "user_unavailable" | "target_inactive" | "user_not_found" | "user_not_created_by_app" | "application_unavailable" | "actor_not_allowed";
792
+ reason?: "users_create_forbidden" | "role_not_assignable" | "user_unavailable" | "target_inactive" | "user_not_found" | "user_not_created_by_app" | "application_unavailable" | "actor_not_allowed" | "page_depth_exceeded";
793
793
  retryable: false;
794
794
  };
795
795
  };
@@ -801,7 +801,7 @@ export type ExternalApplicationsGetRunSourcesErrors = {
801
801
  error: {
802
802
  code: "authorization_denied";
803
803
  message: string;
804
- reason?: "users_create_forbidden" | "role_not_assignable" | "user_unavailable" | "target_inactive" | "user_not_found" | "user_not_created_by_app" | "application_unavailable" | "actor_not_allowed";
804
+ reason?: "users_create_forbidden" | "role_not_assignable" | "user_unavailable" | "target_inactive" | "user_not_found" | "user_not_created_by_app" | "application_unavailable" | "actor_not_allowed" | "page_depth_exceeded";
805
805
  retryable: false;
806
806
  };
807
807
  };
@@ -813,7 +813,7 @@ export type ExternalApplicationsGetRunSourcesErrors = {
813
813
  error: {
814
814
  code: "operation_not_allowed";
815
815
  message: string;
816
- reason?: "users_create_forbidden" | "role_not_assignable" | "user_unavailable" | "target_inactive" | "user_not_found" | "user_not_created_by_app" | "application_unavailable" | "actor_not_allowed";
816
+ reason?: "users_create_forbidden" | "role_not_assignable" | "user_unavailable" | "target_inactive" | "user_not_found" | "user_not_created_by_app" | "application_unavailable" | "actor_not_allowed" | "page_depth_exceeded";
817
817
  retryable: false;
818
818
  };
819
819
  } | {
@@ -821,7 +821,7 @@ export type ExternalApplicationsGetRunSourcesErrors = {
821
821
  error: {
822
822
  code: "not_found";
823
823
  message: string;
824
- reason?: "users_create_forbidden" | "role_not_assignable" | "user_unavailable" | "target_inactive" | "user_not_found" | "user_not_created_by_app" | "application_unavailable" | "actor_not_allowed";
824
+ reason?: "users_create_forbidden" | "role_not_assignable" | "user_unavailable" | "target_inactive" | "user_not_found" | "user_not_created_by_app" | "application_unavailable" | "actor_not_allowed" | "page_depth_exceeded";
825
825
  retryable: false;
826
826
  };
827
827
  };
@@ -833,7 +833,7 @@ export type ExternalApplicationsGetRunSourcesErrors = {
833
833
  error: {
834
834
  code: "conflict";
835
835
  message: string;
836
- reason?: "users_create_forbidden" | "role_not_assignable" | "user_unavailable" | "target_inactive" | "user_not_found" | "user_not_created_by_app" | "application_unavailable" | "actor_not_allowed";
836
+ reason?: "users_create_forbidden" | "role_not_assignable" | "user_unavailable" | "target_inactive" | "user_not_found" | "user_not_created_by_app" | "application_unavailable" | "actor_not_allowed" | "page_depth_exceeded";
837
837
  retryable: false;
838
838
  };
839
839
  } | {
@@ -841,7 +841,7 @@ export type ExternalApplicationsGetRunSourcesErrors = {
841
841
  error: {
842
842
  code: "run_not_settled";
843
843
  message: string;
844
- reason?: "users_create_forbidden" | "role_not_assignable" | "user_unavailable" | "target_inactive" | "user_not_found" | "user_not_created_by_app" | "application_unavailable" | "actor_not_allowed";
844
+ reason?: "users_create_forbidden" | "role_not_assignable" | "user_unavailable" | "target_inactive" | "user_not_found" | "user_not_created_by_app" | "application_unavailable" | "actor_not_allowed" | "page_depth_exceeded";
845
845
  retryable: true;
846
846
  };
847
847
  };
@@ -853,7 +853,7 @@ export type ExternalApplicationsGetRunSourcesErrors = {
853
853
  error: {
854
854
  code: "internal_error";
855
855
  message: string;
856
- reason?: "users_create_forbidden" | "role_not_assignable" | "user_unavailable" | "target_inactive" | "user_not_found" | "user_not_created_by_app" | "application_unavailable" | "actor_not_allowed";
856
+ reason?: "users_create_forbidden" | "role_not_assignable" | "user_unavailable" | "target_inactive" | "user_not_found" | "user_not_created_by_app" | "application_unavailable" | "actor_not_allowed" | "page_depth_exceeded";
857
857
  retryable: false;
858
858
  };
859
859
  };
@@ -865,7 +865,7 @@ export type ExternalApplicationsGetRunSourcesErrors = {
865
865
  error: {
866
866
  code: "temporarily_unavailable";
867
867
  message: string;
868
- reason?: "users_create_forbidden" | "role_not_assignable" | "user_unavailable" | "target_inactive" | "user_not_found" | "user_not_created_by_app" | "application_unavailable" | "actor_not_allowed";
868
+ reason?: "users_create_forbidden" | "role_not_assignable" | "user_unavailable" | "target_inactive" | "user_not_found" | "user_not_created_by_app" | "application_unavailable" | "actor_not_allowed" | "page_depth_exceeded";
869
869
  retryable: true;
870
870
  };
871
871
  };
@@ -900,7 +900,7 @@ export type ExternalApplicationsPutRunFeedbackErrors = {
900
900
  error: {
901
901
  code: "invalid_request";
902
902
  message: string;
903
- reason?: "users_create_forbidden" | "role_not_assignable" | "user_unavailable" | "target_inactive" | "user_not_found" | "user_not_created_by_app" | "application_unavailable" | "actor_not_allowed";
903
+ reason?: "users_create_forbidden" | "role_not_assignable" | "user_unavailable" | "target_inactive" | "user_not_found" | "user_not_created_by_app" | "application_unavailable" | "actor_not_allowed" | "page_depth_exceeded";
904
904
  retryable: false;
905
905
  };
906
906
  };
@@ -912,7 +912,7 @@ export type ExternalApplicationsPutRunFeedbackErrors = {
912
912
  error: {
913
913
  code: "authentication_required";
914
914
  message: string;
915
- reason?: "users_create_forbidden" | "role_not_assignable" | "user_unavailable" | "target_inactive" | "user_not_found" | "user_not_created_by_app" | "application_unavailable" | "actor_not_allowed";
915
+ reason?: "users_create_forbidden" | "role_not_assignable" | "user_unavailable" | "target_inactive" | "user_not_found" | "user_not_created_by_app" | "application_unavailable" | "actor_not_allowed" | "page_depth_exceeded";
916
916
  retryable: false;
917
917
  };
918
918
  };
@@ -924,7 +924,7 @@ export type ExternalApplicationsPutRunFeedbackErrors = {
924
924
  error: {
925
925
  code: "authorization_denied";
926
926
  message: string;
927
- reason?: "users_create_forbidden" | "role_not_assignable" | "user_unavailable" | "target_inactive" | "user_not_found" | "user_not_created_by_app" | "application_unavailable" | "actor_not_allowed";
927
+ reason?: "users_create_forbidden" | "role_not_assignable" | "user_unavailable" | "target_inactive" | "user_not_found" | "user_not_created_by_app" | "application_unavailable" | "actor_not_allowed" | "page_depth_exceeded";
928
928
  retryable: false;
929
929
  };
930
930
  };
@@ -936,7 +936,7 @@ export type ExternalApplicationsPutRunFeedbackErrors = {
936
936
  error: {
937
937
  code: "operation_not_allowed";
938
938
  message: string;
939
- reason?: "users_create_forbidden" | "role_not_assignable" | "user_unavailable" | "target_inactive" | "user_not_found" | "user_not_created_by_app" | "application_unavailable" | "actor_not_allowed";
939
+ reason?: "users_create_forbidden" | "role_not_assignable" | "user_unavailable" | "target_inactive" | "user_not_found" | "user_not_created_by_app" | "application_unavailable" | "actor_not_allowed" | "page_depth_exceeded";
940
940
  retryable: false;
941
941
  };
942
942
  } | {
@@ -944,7 +944,7 @@ export type ExternalApplicationsPutRunFeedbackErrors = {
944
944
  error: {
945
945
  code: "not_found";
946
946
  message: string;
947
- reason?: "users_create_forbidden" | "role_not_assignable" | "user_unavailable" | "target_inactive" | "user_not_found" | "user_not_created_by_app" | "application_unavailable" | "actor_not_allowed";
947
+ reason?: "users_create_forbidden" | "role_not_assignable" | "user_unavailable" | "target_inactive" | "user_not_found" | "user_not_created_by_app" | "application_unavailable" | "actor_not_allowed" | "page_depth_exceeded";
948
948
  retryable: false;
949
949
  };
950
950
  };
@@ -956,7 +956,7 @@ export type ExternalApplicationsPutRunFeedbackErrors = {
956
956
  error: {
957
957
  code: "conflict";
958
958
  message: string;
959
- reason?: "users_create_forbidden" | "role_not_assignable" | "user_unavailable" | "target_inactive" | "user_not_found" | "user_not_created_by_app" | "application_unavailable" | "actor_not_allowed";
959
+ reason?: "users_create_forbidden" | "role_not_assignable" | "user_unavailable" | "target_inactive" | "user_not_found" | "user_not_created_by_app" | "application_unavailable" | "actor_not_allowed" | "page_depth_exceeded";
960
960
  retryable: false;
961
961
  };
962
962
  } | {
@@ -964,7 +964,7 @@ export type ExternalApplicationsPutRunFeedbackErrors = {
964
964
  error: {
965
965
  code: "run_not_settled";
966
966
  message: string;
967
- reason?: "users_create_forbidden" | "role_not_assignable" | "user_unavailable" | "target_inactive" | "user_not_found" | "user_not_created_by_app" | "application_unavailable" | "actor_not_allowed";
967
+ reason?: "users_create_forbidden" | "role_not_assignable" | "user_unavailable" | "target_inactive" | "user_not_found" | "user_not_created_by_app" | "application_unavailable" | "actor_not_allowed" | "page_depth_exceeded";
968
968
  retryable: true;
969
969
  };
970
970
  };
@@ -976,7 +976,7 @@ export type ExternalApplicationsPutRunFeedbackErrors = {
976
976
  error: {
977
977
  code: "feedback_note_required";
978
978
  message: string;
979
- reason?: "users_create_forbidden" | "role_not_assignable" | "user_unavailable" | "target_inactive" | "user_not_found" | "user_not_created_by_app" | "application_unavailable" | "actor_not_allowed";
979
+ reason?: "users_create_forbidden" | "role_not_assignable" | "user_unavailable" | "target_inactive" | "user_not_found" | "user_not_created_by_app" | "application_unavailable" | "actor_not_allowed" | "page_depth_exceeded";
980
980
  retryable: false;
981
981
  };
982
982
  };
@@ -988,7 +988,7 @@ export type ExternalApplicationsPutRunFeedbackErrors = {
988
988
  error: {
989
989
  code: "internal_error";
990
990
  message: string;
991
- reason?: "users_create_forbidden" | "role_not_assignable" | "user_unavailable" | "target_inactive" | "user_not_found" | "user_not_created_by_app" | "application_unavailable" | "actor_not_allowed";
991
+ reason?: "users_create_forbidden" | "role_not_assignable" | "user_unavailable" | "target_inactive" | "user_not_found" | "user_not_created_by_app" | "application_unavailable" | "actor_not_allowed" | "page_depth_exceeded";
992
992
  retryable: false;
993
993
  };
994
994
  };
@@ -1000,7 +1000,7 @@ export type ExternalApplicationsPutRunFeedbackErrors = {
1000
1000
  error: {
1001
1001
  code: "temporarily_unavailable";
1002
1002
  message: string;
1003
- reason?: "users_create_forbidden" | "role_not_assignable" | "user_unavailable" | "target_inactive" | "user_not_found" | "user_not_created_by_app" | "application_unavailable" | "actor_not_allowed";
1003
+ reason?: "users_create_forbidden" | "role_not_assignable" | "user_unavailable" | "target_inactive" | "user_not_found" | "user_not_created_by_app" | "application_unavailable" | "actor_not_allowed" | "page_depth_exceeded";
1004
1004
  retryable: true;
1005
1005
  };
1006
1006
  };
@@ -1029,7 +1029,7 @@ export type ExternalApplicationsGetContextErrors = {
1029
1029
  error: {
1030
1030
  code: "invalid_request";
1031
1031
  message: string;
1032
- reason?: "users_create_forbidden" | "role_not_assignable" | "user_unavailable" | "target_inactive" | "user_not_found" | "user_not_created_by_app" | "application_unavailable" | "actor_not_allowed";
1032
+ reason?: "users_create_forbidden" | "role_not_assignable" | "user_unavailable" | "target_inactive" | "user_not_found" | "user_not_created_by_app" | "application_unavailable" | "actor_not_allowed" | "page_depth_exceeded";
1033
1033
  retryable: false;
1034
1034
  };
1035
1035
  };
@@ -1041,7 +1041,7 @@ export type ExternalApplicationsGetContextErrors = {
1041
1041
  error: {
1042
1042
  code: "authentication_required";
1043
1043
  message: string;
1044
- reason?: "users_create_forbidden" | "role_not_assignable" | "user_unavailable" | "target_inactive" | "user_not_found" | "user_not_created_by_app" | "application_unavailable" | "actor_not_allowed";
1044
+ reason?: "users_create_forbidden" | "role_not_assignable" | "user_unavailable" | "target_inactive" | "user_not_found" | "user_not_created_by_app" | "application_unavailable" | "actor_not_allowed" | "page_depth_exceeded";
1045
1045
  retryable: false;
1046
1046
  };
1047
1047
  };
@@ -1053,7 +1053,7 @@ export type ExternalApplicationsGetContextErrors = {
1053
1053
  error: {
1054
1054
  code: "authorization_denied";
1055
1055
  message: string;
1056
- reason?: "users_create_forbidden" | "role_not_assignable" | "user_unavailable" | "target_inactive" | "user_not_found" | "user_not_created_by_app" | "application_unavailable" | "actor_not_allowed";
1056
+ reason?: "users_create_forbidden" | "role_not_assignable" | "user_unavailable" | "target_inactive" | "user_not_found" | "user_not_created_by_app" | "application_unavailable" | "actor_not_allowed" | "page_depth_exceeded";
1057
1057
  retryable: false;
1058
1058
  };
1059
1059
  };
@@ -1065,7 +1065,7 @@ export type ExternalApplicationsGetContextErrors = {
1065
1065
  error: {
1066
1066
  code: "operation_not_allowed";
1067
1067
  message: string;
1068
- reason?: "users_create_forbidden" | "role_not_assignable" | "user_unavailable" | "target_inactive" | "user_not_found" | "user_not_created_by_app" | "application_unavailable" | "actor_not_allowed";
1068
+ reason?: "users_create_forbidden" | "role_not_assignable" | "user_unavailable" | "target_inactive" | "user_not_found" | "user_not_created_by_app" | "application_unavailable" | "actor_not_allowed" | "page_depth_exceeded";
1069
1069
  retryable: false;
1070
1070
  };
1071
1071
  } | {
@@ -1073,7 +1073,7 @@ export type ExternalApplicationsGetContextErrors = {
1073
1073
  error: {
1074
1074
  code: "not_found";
1075
1075
  message: string;
1076
- reason?: "users_create_forbidden" | "role_not_assignable" | "user_unavailable" | "target_inactive" | "user_not_found" | "user_not_created_by_app" | "application_unavailable" | "actor_not_allowed";
1076
+ reason?: "users_create_forbidden" | "role_not_assignable" | "user_unavailable" | "target_inactive" | "user_not_found" | "user_not_created_by_app" | "application_unavailable" | "actor_not_allowed" | "page_depth_exceeded";
1077
1077
  retryable: false;
1078
1078
  };
1079
1079
  };
@@ -1085,7 +1085,7 @@ export type ExternalApplicationsGetContextErrors = {
1085
1085
  error: {
1086
1086
  code: "conflict";
1087
1087
  message: string;
1088
- reason?: "users_create_forbidden" | "role_not_assignable" | "user_unavailable" | "target_inactive" | "user_not_found" | "user_not_created_by_app" | "application_unavailable" | "actor_not_allowed";
1088
+ reason?: "users_create_forbidden" | "role_not_assignable" | "user_unavailable" | "target_inactive" | "user_not_found" | "user_not_created_by_app" | "application_unavailable" | "actor_not_allowed" | "page_depth_exceeded";
1089
1089
  retryable: false;
1090
1090
  };
1091
1091
  };
@@ -1097,7 +1097,7 @@ export type ExternalApplicationsGetContextErrors = {
1097
1097
  error: {
1098
1098
  code: "internal_error";
1099
1099
  message: string;
1100
- reason?: "users_create_forbidden" | "role_not_assignable" | "user_unavailable" | "target_inactive" | "user_not_found" | "user_not_created_by_app" | "application_unavailable" | "actor_not_allowed";
1100
+ reason?: "users_create_forbidden" | "role_not_assignable" | "user_unavailable" | "target_inactive" | "user_not_found" | "user_not_created_by_app" | "application_unavailable" | "actor_not_allowed" | "page_depth_exceeded";
1101
1101
  retryable: false;
1102
1102
  };
1103
1103
  };
@@ -1109,7 +1109,7 @@ export type ExternalApplicationsGetContextErrors = {
1109
1109
  error: {
1110
1110
  code: "temporarily_unavailable";
1111
1111
  message: string;
1112
- reason?: "users_create_forbidden" | "role_not_assignable" | "user_unavailable" | "target_inactive" | "user_not_found" | "user_not_created_by_app" | "application_unavailable" | "actor_not_allowed";
1112
+ reason?: "users_create_forbidden" | "role_not_assignable" | "user_unavailable" | "target_inactive" | "user_not_found" | "user_not_created_by_app" | "application_unavailable" | "actor_not_allowed" | "page_depth_exceeded";
1113
1113
  retryable: true;
1114
1114
  };
1115
1115
  };
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- import{ServerAccessError2,MemberSessionExchangeError2,CiError2,CiTransportError2,FederatedAuthError2,serverSdkRuntime2,createServerClient2,exchangeMemberSession2,runAsApplication2,uuidV72}from"./chunks/index-bhs224jn.js";var filterCitations=(citations,sources)=>{const returned=new Map;for(const{documentId,versionId}of sources){returned.set(documentId,(returned.get(documentId)??new Set).add(versionId))}const kept=[];const dropped=[];for(const citation of citations){const cited=returned.get(citation.documentId)?.has(citation.versionId);(cited===true?kept:dropped).push(citation)}return{dropped,kept}};var CiError=CiError2;var ServerAccessError=ServerAccessError2;var CiTransportError=CiTransportError2;var FederatedAuthError=FederatedAuthError2;export{CiError,CiTransportError,FederatedAuthError,MemberSessionExchangeError2 as MemberSessionExchangeError,ServerAccessError,createServerClient2 as createServerClient,exchangeMemberSession2 as exchangeMemberSession,filterCitations,runAsApplication2 as runAsApplication,serverSdkRuntime2 as serverSdkRuntime,uuidV72 as uuidV7};
1
+ import{ServerAccessError2,MemberSessionExchangeError2,CiError2,CiTransportError2,FederatedAuthError2,serverSdkRuntime2,createServerClient2,exchangeMemberSession2,runAsApplication2,uuidV72}from"./chunks/index-nwk5jexa.js";var filterCitations=(citations,sources)=>{const returned=new Map;for(const{documentId,versionId}of sources){returned.set(documentId,(returned.get(documentId)??new Set).add(versionId))}const kept=[];const dropped=[];for(const citation of citations){const cited=returned.get(citation.documentId)?.has(citation.versionId);(cited===true?kept:dropped).push(citation)}return{dropped,kept}};var CiError=CiError2;var ServerAccessError=ServerAccessError2;var CiTransportError=CiTransportError2;var FederatedAuthError=FederatedAuthError2;export{CiError,CiTransportError,FederatedAuthError,MemberSessionExchangeError2 as MemberSessionExchangeError,ServerAccessError,createServerClient2 as createServerClient,exchangeMemberSession2 as exchangeMemberSession,filterCitations,runAsApplication2 as runAsApplication,serverSdkRuntime2 as serverSdkRuntime,uuidV72 as uuidV7};